commit a4ba426d25bd6a5cbe11d81b82a789b8a2c948ed (HEAD, refs/remotes/origin/master) Author: Robert Cochran Date: Fri Aug 19 14:53:07 2016 -0700 * lisp/emacs-lisp/map.el (map--dispatch): Fix docstring The docstring referenced a non-existant parameter, as well as a parameter that has been renamed since the docstring was written. Fix both errors, fixing (Bug#24182). diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index 98a8871..0a0f64a 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -79,14 +79,14 @@ MAP can be a list, hash-table or array." (eval-when-compile (defmacro map--dispatch (map-var &rest args) - "Evaluate one of the forms specified by ARGS based on the type of MAP. + "Evaluate one of the forms specified by ARGS based on the type of MAP-VAR. The following keyword types are meaningful: `:list', `:hash-table' and `:array'. -An error is thrown if MAP is neither a list, hash-table nor array. +An error is thrown if MAP-VAR is neither a list, hash-table nor array. -Return RESULT if non-nil or the result of evaluation of the form." +Returns the result of evaluating the form associated with MAP-VAR's type." (declare (debug t) (indent 1)) `(cond ((listp ,map-var) ,(plist-get args :list)) ((hash-table-p ,map-var) ,(plist-get args :hash-table)) commit 4a80c8bb276de0fdb1f9ddb8f1c1cf7d57d30918 Author: Alan Mackenzie Date: Fri Aug 19 16:03:05 2016 +0000 Amend hack-local-variables-prop-line not always to return any mode on line 1. This fixes bug #24266. * lisp/files.el (hack-local-variables-prop-line): Change the name of the parameter mode-only to handle-mode. Change its meaning, such that it being set to a value non-nil and not t removes any mode parameter from the result list. Leave its values nil and t with the same meanings they had. (hack-local-variables): Call hack-local-variables-prop-line appropriately. diff --git a/lisp/files.el b/lisp/files.el index b93cc79..ff39008 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3223,16 +3223,21 @@ n -- to ignore the local variables list.") (defconst hack-local-variable-regexp "[ \t]*\\([^][;\"'?()\\ \t\n]+\\)[ \t]*:[ \t]*") -(defun hack-local-variables-prop-line (&optional mode-only) +(defun hack-local-variables-prop-line (&optional handle-mode) "Return local variables specified in the -*- line. -Returns an alist of elements (VAR . VAL), where VAR is a variable -and VAL is the specified value. Ignores any specification for -`mode:' and `coding:' (which should have already been handled -by `set-auto-mode' and `set-auto-coding', respectively). -Return nil if the -*- line is malformed. - -If MODE-ONLY is non-nil, just returns the symbol specifying the -mode, if there is one, otherwise nil." +Usually returns an alist of elements (VAR . VAL), where VAR is a +variable and VAL is the specified value. Ignores any +specification for `coding:', and sometimes for `mode' (which +should have already been handled by `set-auto-coding' and +`set-auto-mode', respectively). Return nil if the -*- line is +malformed. + +If HANDLE-MODE is nil, we return the alist of all the local +variables in the line except `coding' as described above. If it +is neither nil nor t, we do the same, except that any settings of +`mode' and `coding' are ignored. If HANDLE-MODE is t, we ignore +all settings in the line except for `mode', which \(if present) we +return as the symbol specifying the mode." (catch 'malformed-line (save-excursion (goto-char (point-min)) @@ -3242,14 +3247,14 @@ mode, if there is one, otherwise nil." nil) ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)") ;; Simple form: "-*- MODENAME -*-". - (if mode-only + (if (memq handle-mode '(nil t)) (intern (concat (match-string 1) "-mode")))) (t ;; Hairy form: '-*-' [ ':' ';' ]* '-*-' ;; (last ";" is optional). - ;; If MODE-ONLY, just check for `mode'. + ;; If HANDLE-MODE is t, just check for `mode'. ;; Otherwise, parse the -*- line into the RESULT alist. - (while (not (or (and mode-only result) + (while (not (or (and (eq handle-mode t) result) (>= (point) end))) (unless (looking-at hack-local-variable-regexp) (message "Malformed mode-line: %S" @@ -3270,19 +3275,24 @@ mode, if there is one, otherwise nil." ;; That is inconsistent, but we're stuck with it. ;; The same can be said for `coding' in set-auto-coding. (keyname (downcase (symbol-name key)))) - (if mode-only - (and (equal keyname "mode") - (setq result - (intern (concat (downcase (symbol-name val)) - "-mode")))) - (or (equal keyname "coding") - (condition-case nil - (push (cons (cond ((eq key 'eval) 'eval) - ;; Downcase "Mode:". - ((equal keyname "mode") 'mode) - (t (indirect-variable key))) - val) result) - (error nil)))) + (cond + ((eq handle-mode t) + (and (equal keyname "mode") + (setq result + (intern (concat (downcase (symbol-name val)) + "-mode"))))) + ((equal keyname "coding")) + (t + (when (or (not handle-mode) + (not (equal keyname "mode"))) + (condition-case nil + (push (cons (cond ((eq key 'eval) 'eval) + ;; Downcase "Mode:". + ((equal keyname "mode") 'mode) + (t (indirect-variable key))) + val) + result) + (error nil))))) (skip-chars-forward " \t;"))) result)))))) @@ -3393,7 +3403,7 @@ local variables, but directory-local variables may still be applied." ;; If HANDLE-MODE is t, and the prop line specifies a ;; mode, then we're done, and have no need to scan further. (and (setq result (hack-local-variables-prop-line - (eq handle-mode t))) + handle-mode)) (eq handle-mode t))) ;; Look for "Local variables:" line in last page. (save-excursion commit 72ef0c8b2ffe13aa3f11534b23613c51f99bb64b Author: Daiki Ueno Date: Fri Aug 19 11:18:41 2016 +0200 Improve doc string of epg-*-program * lisp/epg-config.el (epg-gpg-program, epg-gpgsm-program): Suggest to use Customize when setting. (Bug#24229) diff --git a/lisp/epg-config.el b/lisp/epg-config.el index 9179e04..02b9e45 100644 --- a/lisp/epg-config.el +++ b/lisp/epg-config.el @@ -44,13 +44,17 @@ (defcustom epg-gpg-program (if (executable-find "gpg2") "gpg2" "gpg") - "The `gpg' executable." + "The `gpg' executable. +Setting this variable directly does not take effect; +instead use \\[customize] (see the info node `Easy Customization')." :version "25.1" :group 'epg :type 'string) (defcustom epg-gpgsm-program "gpgsm" - "The `gpgsm' executable." + "The `gpgsm' executable. +Setting this variable directly does not take effect; +instead use \\[customize] (see the info node `Easy Customization')." :group 'epg :type 'string)