[elpa] master 9969727: Brief mode v5.87 release
branch: master commit 996972791db445eab4090660fcc9d66a4d8584ed Author: Luke Lee Commit: Luke Lee 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] [] Environment variables: -BRIEFVERSION ELPA brief version, default "5.86" -BRIEFPATHdefault path to search brief.el[c] BRIEFQUICK launch Emacs with -q, default=1 BRIEFTERMINALlaunch Emacs in terminal mode with -nw, default=0 EMACSdefault 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" "${EMACSARGS[@]}") [ "$BRIEFQUICK" == "1" ] && EMACSARGS=("-q" "${EMACSARGS[@]}") # Launch Emacs with Brief mode default settings -exec ${EMACS} --load ${BRIEFPATH}/brief --funcall brief-easy-start "${EMACSARGS[@]}" +exec ${EMACS} -f package-initialize -f brief-easy-start "${EMACSARGS[@]}" diff --git a/packages/brief/brief.el b/packages/brief/brief.el index 0
[elpa] master 44e71ff: * brief/README.org: Change some wording.
branch: master commit 44e71ff0e1a628ed883d31982c02b67f2c4abaf8 Author: Luke Lee Commit: Luke Lee * brief/README.org: Change some wording. --- packages/brief/README.org | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/brief/README.org b/packages/brief/README.org index fd2b4ca..7bbe3d1 100644 --- a/packages/brief/README.org +++ b/packages/brief/README.org @@ -327,9 +327,11 @@ this Brief Mode. changing default settings. With the quick launcher 'b' all these are fixed. The / - are rewritten to behave like other editors while 'b' changed other settings. - If you launch Emacs without using 'b' you may want to include those changes - into your ~/.emacs init script: + are rewritten in Brief while function `brief-easy-start' changed other settings + then do `(brief-mode 1)' to enable Brief mode. + + If you launch Emacs without using quick launcher 'b' or `brief-easy-start' + function, you may want to include those changes into your ~/.emacs init script: ;;--; (setq-default truncate-lines t) ;; disable line wrapping ; @@ -343,7 +345,6 @@ this Brief Mode. Or you can refer to the source code "brief.el" for function `brief-easy-start'. - * For more details like Cygwin 2.x users note, please check the comments in the source code "brief.el".
[elpa] master 4c46fa2: * crisp/crisp.el: Fix incompatibility with brief-mode; plus cleanups
branch: master commit 4c46fa2e15c3109a5e73e4b46186aa1a7197 Author: Stefan Monnier Commit: Stefan Monnier * crisp/crisp.el: Fix incompatibility with brief-mode; plus cleanups Remove redundant :group args. (brief-mode): Remove alias which conflicts with the 'brief' package. (crisp-mode): Remove defcustom. (crisp--version-or-file): Rename from crisp-version. Don't hardcode the version number. Use package-get-version when available. (crisp-version): Provide fallback when package-get-version not available. (crisp--minor-mode-map): New keymap. (crisp-mode): Use it for the minor-mode-map-alist. Put crisp-mode-map on the global map instead. --- packages/crisp/crisp.el | 95 +++-- 1 file changed, 52 insertions(+), 43 deletions(-) diff --git a/packages/crisp/crisp.el b/packages/crisp/crisp.el index 68017eb..f37affd 100644 --- a/packages/crisp/crisp.el +++ b/packages/crisp/crisp.el @@ -1,11 +1,12 @@ ;;; crisp.el --- CRiSP/Brief Emacs emulator -;; Copyright (C) 1997-1999, 2001-2014 Free Software Foundation, Inc. +;; Copyright (C) 1997-1999, 2001-2014, 2018 Free Software Foundation, Inc. ;; Author: Gary D. Foster ;; Maintainer: Luke Lee ;; Keywords: emulations brief crisp -;; Version: 1.3.4 +;; Package-Require: ((cl-lib "0.5")) +;; Version: 1.3.5 ;; This file is part of GNU Emacs. @@ -56,6 +57,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + ;; local variables (defgroup crisp nil @@ -178,31 +181,14 @@ nice to the world.") (defcustom crisp-mode-mode-line-string " *CRiSP*" "String to display in the mode line when CRiSP emulation mode is enabled." - :type 'string - :group 'crisp) - -;;;###autoload -(defcustom crisp-mode nil - "Track status of CRiSP emulation mode. -A value of nil means CRiSP mode is not enabled. A value of t -indicates CRiSP mode is enabled. - -Setting this variable directly does not take effect; -use either M-x customize or the function `crisp-mode'." - :set (lambda (symbol value) (crisp-mode (if value 1 0))) - :initialize 'custom-initialize-default - :require 'crisp - :version "20.4" - :type 'boolean - :group 'crisp) + :type 'string) (defcustom crisp-override-meta-x t "Controls overriding the normal Emacs M-x key binding in the CRiSP emulator. Normally the CRiSP emulator rebinds M-x to `save-buffers-exit-emacs', and provides the usual M-x functionality on the F10 key. If this variable is non-nil, M-x will exit Emacs." - :type 'boolean - :group 'crisp) + :type 'boolean) (defcustom crisp-load-scroll-all nil "Controls loading of the Scroll Lock in the CRiSP emulator. @@ -211,20 +197,19 @@ package when enabling the CRiSP emulator. If this variable is nil when you start the CRiSP emulator, it does not load the scroll-all package." - :type 'boolean - :group 'crisp) + :type 'boolean) (defcustom crisp-load-hook nil "Hooks to run after loading the CRiSP emulator package." - :type 'hook - :group 'crisp) + :type 'hook) (defcustom crisp-mode-hook nil "Hook run by the function `crisp-mode'." - :type 'hook - :group 'crisp) + :type 'hook) -(defconst crisp-version "1.3.4" +(defconst crisp--version-or-file + (if (fboundp 'package-get-version) (package-get-version) +(list load-file-name)) "The version of the CRiSP emulator.") (defconst crisp-mode-help-address "gfos...@suzieq.ml.org" @@ -262,7 +247,33 @@ does not load the scroll-all package." "Version number of the CRiSP emulator package. If ARG, insert results at point." (interactive "P") - (let ((foo (concat "CRiSP version " crisp-version))) + (when (consp crisp--version-or-file) +(setq crisp--version-or-file + (let ((file (car crisp--version-or-file))) +;; Copy/pasted from package-get-version: +(cond + ((null file) nil) + ;; Packages are normally installed into directories named + ;; "-", so get the version number from there. + ((string-match "/[^/]+-\\([0-9]\\(?:[0-9.]\\|pre\\|beta\\|alpha\\|snapshot\\)+\\)/[^/]+\\'" file) + (match-string 1 file)) + ;; For packages run straight from the an elpa.git clone, there's + ;; no "-" in the directory name, so we have to fetch the + ;; version the hard way. + (t + (let* ((pkgdir (file-name-directory file)) + (pkgname (file-name-nondirectory + (directory-file-name pkgdir))) + (mainfile (expand-file-name +(concat pkgname ".el") pkgdir))) +(when (file-readable-p mainfile) + (require 'lisp-mnt) + (with-temp-buffer +(insert-file-contents mainfile) +(or (lm-header "package-version") +(lm-header "version")) + (let* ((foo (concat "CRiSP version "
[elpa] master 4ad9310: * brief/README.org: Correct wording to be consistent with EmacsWiki page.
branch: master commit 4ad93106f58a751c9728314280a92dcd195f05f4 Author: Luke Lee Commit: Luke Lee * brief/README.org: Correct wording to be consistent with EmacsWiki page. --- packages/brief/README.org | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/brief/README.org b/packages/brief/README.org index 7bbe3d1..467d3b5 100644 --- a/packages/brief/README.org +++ b/packages/brief/README.org @@ -5,10 +5,10 @@ Brief Mode / Brief Emulator / Brief Editor -*- mode: org; -*- * Brief -The Brief editor is famous for its easy-to-learn. Most of the command 'K'eys are -associated with meaningful 'K'eywords. Usually, it can be mastered within an -hour and difficult to forget. Brief v3.1 was once very popular among programmers -in the MS-DOS days. +The Brief editor v3.1 was once very popular among programmers in the MS-DOS days. +It was famous for its easy-to-learn. Most of the command 'K'eys are associated +with meaningful 'K'eywords. Usually, it can be mastered within an hour and +difficult to forget. For example, the first key bring the cursor to home (beginning) of current line, a consecutive second key to the home (beginning) of the window and a
[elpa] master 67685c6 2/2: [gnus-mock] Instead of inserting strings, use princ and prin1
branch: master commit 67685c6047ceaa6ffa2385116f5fa701e70bad70 Author: Eric Abrahamsen Commit: Eric Abrahamsen [gnus-mock] Instead of inserting strings, use princ and prin1 * packages/gnus-mock/gnus-mock.el (gnus-mock-start): For Science. --- packages/gnus-mock/gnus-mock.el | 76 - 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/packages/gnus-mock/gnus-mock.el b/packages/gnus-mock/gnus-mock.el index 434e483..ff3f54b 100644 --- a/packages/gnus-mock/gnus-mock.el +++ b/packages/gnus-mock/gnus-mock.el @@ -130,45 +130,43 @@ will start a mock Gnus session." (let* ((mock-tmp-dir (make-temp-file "emacs-gnus-mock-" t)) (init-file (expand-file-name "init.el" mock-tmp-dir))) (with-temp-buffer - (insert "(setq " - (format - "gnus-home-directory \"%s\" -init-file-user \"%s\" -sendmail-program \"%s\" -message-directory \"%s\" -gnus-startup-file \"%s\" -gnus-init-file \"%s\" -nndraft-directory \"%s\" -gnus-agent-directory \"%s\" -gnus-directory \"%s\" -" - mock-tmp-dir - "mockturtle" - (expand-file-name gnus-mock-sendmail-program mock-tmp-dir) - mock-tmp-dir - (expand-file-name ".newsrc" mock-tmp-dir) - (expand-file-name ".gnus" mock-tmp-dir) - (expand-file-name "drafts/" mock-tmp-dir) - (expand-file-name "agent/" mock-tmp-dir) - (expand-file-name "News/" mock-tmp-dir)) - ")\n\n") - ;; Constant that can be checked if we need to know it's a mock - ;; session. - (insert "(defconst gnus-mock-p t)\n") - ;; Constant for use in `gnus-mock-reload', which is defined in - ;; the .gnus.el startup file. - (insert (format "(defconst gnus-mock-data-dir \"%s\")\n" - gnus-mock-data-dir)) - (when gnus-mock-cleanup-p - (insert -(format - "(add-hook 'kill-emacs-hook (lambda () (delete-directory \"%s\" t)))\n" - mock-tmp-dir))) - (when gnus-mock-use-images - (insert -(format "(add-to-list 'load-path \"%s/data\")\n" -mock-tmp-dir))) - (write-file init-file)) + (let ((standard-output (current-buffer)) + (print-circle nil)) + (prin1 +`(setq gnus-home-directory ,mock-tmp-dir + init-file-user "mockturtle" + sendmail-program + ,(expand-file-name gnus-mock-sendmail-program + mock-tmp-dir) + message-directory ,mock-tmp-dir + gnus-startup-file + ,(expand-file-name ".newsrc" mock-tmp-dir) + gnus-init-file + ,(expand-file-name ".gnus" mock-tmp-dir) + nndraft-directory + ,(expand-file-name "drafts/" mock-tmp-dir) + gnus-agent-directory + ,(expand-file-name "agent/" mock-tmp-dir) + gnus-directory + ,(expand-file-name "News/" mock-tmp-dir))) + (princ "\n\n") + ;; Constant that can be checked if we need to know it's a mock + ;; session. + (prin1 '(defconst gnus-mock-p t)) + (princ "\n") + ;; Constant for use in `gnus-mock-reload', which is defined in + ;; the .gnus.el startup file. + (prin1 `(defconst gnus-mock-data-dir ,gnus-mock-data-dir)) + (when gnus-mock-cleanup-p + (princ "\n") + (prin1 `(add-hook 'kill-emacs-hook + (lambda () (delete-directory + ,mock-tmp-dir t) + (when gnus-mock-use-images + (princ "\n") + (prin1 `(add-to-list 'load-path + ,(format "%s/data" mock-tmp-dir + (write-file init-file))) ;; Put our data and config in place. (copy-directory gnus-mock-data-dir
[elpa] master 1aa24a3 1/2: [gnus-mock] Zoop the condition-case up around the whole function
branch: master commit 1aa24a37d2bb91844892d0770bd3142945d7e59e Author: Eric Abrahamsen Commit: Eric Abrahamsen [gnus-mock] Zoop the condition-case up around the whole function * packages/gnus-mock/gnus-mock.el (gnus-mock-start): It's cleaner (especially when testing) to have the whole main function wrapped in the condition-case. --- packages/gnus-mock/gnus-mock.el | 145 1 file changed, 73 insertions(+), 72 deletions(-) diff --git a/packages/gnus-mock/gnus-mock.el b/packages/gnus-mock/gnus-mock.el index 1747272..434e483 100644 --- a/packages/gnus-mock/gnus-mock.el +++ b/packages/gnus-mock/gnus-mock.el @@ -126,12 +126,13 @@ The new Emacs process will be started as \"-Q\", with the mock Gnus settings pre-loaded. Any of the normal Gnus entry points will start a mock Gnus session." (interactive) - (let* ((mock-tmp-dir (make-temp-file "emacs-gnus-mock-" t)) -(init-file (expand-file-name "init.el" mock-tmp-dir))) -(with-temp-buffer - (insert "(setq " - (format - "gnus-home-directory \"%s\" + (condition-case nil + (let* ((mock-tmp-dir (make-temp-file "emacs-gnus-mock-" t)) +(init-file (expand-file-name "init.el" mock-tmp-dir))) + (with-temp-buffer + (insert "(setq " + (format + "gnus-home-directory \"%s\" init-file-user \"%s\" sendmail-program \"%s\" message-directory \"%s\" @@ -141,72 +142,72 @@ nndraft-directory \"%s\" gnus-agent-directory \"%s\" gnus-directory \"%s\" " - mock-tmp-dir - "mockturtle" - (expand-file-name gnus-mock-sendmail-program mock-tmp-dir) - mock-tmp-dir - (expand-file-name ".newsrc" mock-tmp-dir) - (expand-file-name ".gnus" mock-tmp-dir) - (expand-file-name "drafts/" mock-tmp-dir) - (expand-file-name "agent/" mock-tmp-dir) - (expand-file-name "News/" mock-tmp-dir)) - ")\n\n") - ;; Constant that can be checked if we need to know it's a mock - ;; session. - (insert "(defconst gnus-mock-p t)\n") - ;; Constant for use in `gnus-mock-reload', which is defined in - ;; the .gnus.el startup file. - (insert (format "(defconst gnus-mock-data-dir \"%s\")\n" - gnus-mock-data-dir)) - (when gnus-mock-cleanup-p - (insert -(format - "(add-hook 'kill-emacs-hook (lambda () (delete-directory \"%s\" t)))\n" - mock-tmp-dir))) - (when gnus-mock-use-images - (insert -(format "(add-to-list 'load-path \"%s/data\")\n" -mock-tmp-dir))) - (write-file init-file)) -;; Put our data and config in place. -(copy-directory - gnus-mock-data-dir - (file-name-as-directory mock-tmp-dir) nil nil t) -;; Git doesn't let us commit empty directories, so create our -;; necessary empty maildir bits. -(mapc (lambda (path) (make-directory path t)) - (mapcar (lambda (dir) - (format "%s/test/%s" mock-tmp-dir dir)) - '("Welcome/new" "Welcome/tmp" "Welcome/.nnmaildir/marks" - "incoming/tmp" "incoming/new" "incoming/cur" - "incoming/.nnmaildir/marks" "incoming/.nnmaildir/nov" - "mails/tmp" "mails/new" "mails/.nnmaildir/marks"))) -;; Possibly insert additional config. -(when gnus-mock-init-file - (with-temp-buffer - (insert-file-contents gnus-mock-init-file) - (append-to-file -(point-min) (point-max) init-file))) -(when gnus-mock-gnus-file - (with-temp-buffer - (insert-file-contents gnus-mock-gnus-file) - (append-to-file -(point-min) (point-max) -(expand-file-name ".gnus.el" mock-tmp-dir -;; There are absolute paths in the .newsrc.eld file, so doctor -;; that file. -(with-current-buffer (find-file-noselect - (expand-file-name ".newsrc.eld" mock-tmp-dir)) - (while (re-search-forward "REPLACE_ME" (point-max) t) - (replace-match mock-tmp-dir t)) - (basic-save-buffer)) -(condition-case nil - (make-process :name "gnus-mock" :buffer nil - :command (list gnus-mock-emacs-program - "-Q" "--load" init-file) - :stderr "*gnus mock errors*") - (error (when gnus-mock-cleanup-p - (delete-directory mock-tmp-dir t)) + mock-tmp-dir + "mockturtle" + (expand-file-name gnus-mock-sendmail-program mock-tmp-dir) + mock-tmp-dir + (expand-file-name ".newsrc" mock-tmp-dir) + (expand-file-name ".gnus" mock-tmp-dir) + (expand-file-name "drafts/" mock-tmp-dir) + (expand-file-name "agent/" mock-tmp-dir) + (expand-file-name "News/" mock-tmp-dir)) +
[elpa] master updated (4ad9310 -> 67685c6)
girzel pushed a change to branch master. from 4ad9310 * brief/README.org: Correct wording to be consistent with EmacsWiki page. new 1aa24a3 [gnus-mock] Zoop the condition-case up around the whole function new 67685c6 [gnus-mock] Instead of inserting strings, use princ and prin1 Summary of changes: packages/gnus-mock/gnus-mock.el | 161 1 file changed, 80 insertions(+), 81 deletions(-)