[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9969727: Brief mode v5.87 release
From: |
Luke Lee |
Subject: |
[elpa] master 9969727: Brief mode v5.87 release |
Date: |
Mon, 22 Oct 2018 09:08:48 -0400 (EDT) |
branch: master
commit 996972791db445eab4090660fcc9d66a4d8584ed
Author: Luke Lee <address@hidden>
Commit: Luke Lee <address@hidden>
Brief mode v5.87 release
Fix quick launcher script 'b' to be more reliable.
* brief/b: Remove version dependency according to Stefan's suggestion.
* brief/brief.el: Add missing autoload declaration, also bump version
to update ELPA package.
* brief/README.org: Adjust document accordingly.
---
packages/brief/README.org | 25 +++++++++++++++----------
packages/brief/b | 30 +++++++-----------------------
packages/brief/brief.el | 26 +++++++++++++-------------
3 files changed, 35 insertions(+), 46 deletions(-)
diff --git a/packages/brief/README.org b/packages/brief/README.org
index 9d165a3..fd2b4ca 100644
--- a/packages/brief/README.org
+++ b/packages/brief/README.org
@@ -37,24 +37,30 @@ this Brief Mode.
2. Download Brief package using emacs command line:
- $ emacs -Q -eval "(progn (package-initialize) (package-refresh-contents)
(package-install 'brief) (save-buffers-kill-emacs))"
+ $ emacs --batch --eval "(progn (package-initialize)
(package-refresh-contents) (package-install 'brief))"
- 3. Now the Brief package (currently v5.86) should be presented in
- "~/.emacs.d/elpa/brief-5.86". You can either add this into PATH, or copy
- (link) the launcher bash script "~/.emacs.d/elpa/brief-5.86/b" to anywhere
- within your PATH.
+ 3. Now the Brief package should be installed in "~/.emacs.d/elpa/brief-#.##"
+ (where #.## is the version number, by the time this document is written
+ it's 5.87). You can either add this into PATH, or copy (link) the
launcher
+ bash script "~/.emacs.d/elpa/brief-#.##/b" to anywhere within your PATH
+ (notice this launcher exists only after v5.87).
Now you can start Emacs brief emulator, just run the launcher:
$ b
That's it!
- (If 'b' fail to launch, use 'b -h' and adjust the associated environment
- variables.)
+ (If 'b' fail to launch, the package might not be properly installed, try
+ step 2 and 3 again, or do it like Emacs users below.)
** For Emacs users, just install the ELPA brief package with menu -> "Options"
- -> "Manage Emacs Packages", then add "(require 'brief) (brief-mode 1)" into
- ~/.emacs to enable it.
+ -> "Manage Emacs Packages", then add
+
+ (require 'brief)
+ (brief-easy-start) ;; will do (brief-mode 1)
+
+ into ~/.emacs to enable it. (For what `brief-easy-start' does please search
+ "brief-easy-start" following.)
* Key Commands:
@@ -341,5 +347,4 @@ this Brief Mode.
* For more details like Cygwin 2.x users note, please check the comments in the
source code "brief.el".
-
Luke Lee
diff --git a/packages/brief/b b/packages/brief/b
index d0c60f8..101a9d8 100755
--- a/packages/brief/b
+++ b/packages/brief/b
@@ -1,12 +1,14 @@
#!/bin/bash
# Brief Emulator/Brief Mode Launcher with Emacs
# A support script associated with ELPA package "brief"
-# Version : 1.0
+# Version : 1.1
# Written by : Luke Lee since Brief mode 5.86
+#
+# Note that this script works only after Emacs package "brief"
+# is properly installed.
+#
# Environment variables and default values
-BRIEFVERSION=${BRIEFVERSION-"5.86"}
-BRIEFPATH=${BRIEFPATH-"~/.emacs.d/elpa/brief-${BRIEFVERSION}"}
BRIEFQUICK=${BRIEFQUICK-"1"}
BRIEFTERMINAL=${BRIEFTERMINAL-"0"}
EMACS=${EMACS-"emacs"}
@@ -25,8 +27,6 @@ usage: b [-h] [-nq] [-nw] [<emacs-args>]
Environment variables:
- BRIEFVERSION ELPA brief version, default "5.86"
- BRIEFPATH default path to search brief.el[c]
BRIEFQUICK launch Emacs with -q, default=1
BRIEFTERMINAL launch Emacs in terminal mode with -nw, default=0
EMACS default Emacs binary to launch
@@ -49,15 +49,6 @@ EOF
fi
}
-function find_brief ()
-{
- if [ -f $1/brief.el ] || [ -f $1/brief.elc ]; then
- BRIEFPATH="$1"
- return `true`
- fi
- return `false`
-}
-
# Try if $EMACS can be found and executed, if not, exit
function find_emacs ()
@@ -85,13 +76,6 @@ find_emacs
HELP=0
-find_brief ${BRIEFPATH} \
- || find_brief ~/.emacs.d/elpa/brief-${BRIEFVERSION} \
- || find_brief ~/.emacs.d/elpa/brief \
- || find_brief ~/.emacs.d/brief \
- || find_brief ~/bin/elisp/brief \
- || help notfound
-
# Scan arguments
SHOWVERSION=0
@@ -132,10 +116,10 @@ done
# Process extra arguments
[ "$HELP" != "0" ] && help
-[ "$SHOWVERSION" == "1" ] && echo -e "Brief mode/emulator version
${BRIEFVERSION} for"
+[ "$SHOWVERSION" == "1" ] && echo -e "Brief mode/emulator for"
[ "$BRIEFTERMINAL" == "1" ] && EMACSARGS=("-nw" "address@hidden")
[ "$BRIEFQUICK" == "1" ] && EMACSARGS=("-q" "address@hidden")
# Launch Emacs with Brief mode default settings
-exec ${EMACS} --load ${BRIEFPATH}/brief --funcall brief-easy-start
"address@hidden"
+exec ${EMACS} -f package-initialize -f brief-easy-start "address@hidden"
diff --git a/packages/brief/brief.el b/packages/brief/brief.el
index 08d6f3a..30c16ad 100644
--- a/packages/brief/brief.el
+++ b/packages/brief/brief.el
@@ -5,7 +5,7 @@
;; Author: Luke Lee <address@hidden>
;; Maintainer: Luke Lee <address@hidden>
;; Keywords: brief, emulations, crisp
-;; Version: 5.86
+;; Version: 5.87
;; Package-Type: multi
;; GNU Emacs is free software: you can redistribute it and/or modify
@@ -457,7 +457,7 @@
;; backward compatibility issues.
;;(require 'replace)
-(defconst brief-version "5.86"
+(defconst brief-version "5.87"
"The version of this Brief emulator.")
;;
@@ -6957,16 +6957,6 @@ Unlike [return] key, this command does not split current
line."
(brief-key [(meta z)] 'eshell)))
-;; [2016-04-01 18:20:22 +0800] Fix CUA C-v behavior which is not consistent
-;; with my brief-yank All CUA keymaps starts from `cua--keymap-alist', which
-;; exists in `emulation-mode-map-alists'. In `cua--keymap-alist', the
-;; `cua--cua-keys-keymap' was listed near the head so it got higher priority.
-
-(when (and (fboundp 'cua-paste)
- (boundp 'cua--cua-keys-keymap))
- (define-key cua--cua-keys-keymap [remap yank] 'brief-yank)
- (define-key cua--cua-keys-keymap [(control v)] 'brief-yank))
-
;;==============================================================================
;;
;; Brief mode definitions
@@ -7308,7 +7298,16 @@ toggle brief-mode."
(eval-after-load 'cua-base
'(progn
(put 'brief-home 'CUA 'move)
- (put 'brief-end 'CUA 'move)))
+ (put 'brief-end 'CUA 'move)
+ ;; [2016-04-01 18:20:22 +0800] Fix CUA C-v behavior which is not
consistent
+ ;; with my brief-yank All CUA keymaps starts from `cua--keymap-alist',
which
+ ;; exists in `emulation-mode-map-alists'. In `cua--keymap-alist', the
+ ;; `cua--cua-keys-keymap' was listed near the head so it got higher
priority.
+
+ (when (and (fboundp 'cua-paste)
+ (boundp 'cua--cua-keys-keymap))
+ (define-key cua--cua-keys-keymap [remap yank] 'brief-yank)
+ (define-key cua--cua-keys-keymap [(control v)] 'brief-yank))))
;; Support multiple-cursors package
@@ -7564,6 +7563,7 @@ matter if brief-mode is enabled or not."
'around 'brief-override-line-number-at-pos)
(ad-activate 'line-number-at-pos))))
+;;;###autoload
(defun brief-easy-start ()
"Emulate Brief by changing less favored Emacs settings for programmers.
Before enabling brief mode this sets the following:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 9969727: Brief mode v5.87 release,
Luke Lee <=