commit de5f59219ac02c6502907f6a24538ddabf487839 (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Thu May 7 10:27:14 2020 +0200 Handle signals in Tramp's process-file * lisp/net/tramp-adb.el (tramp-adb-handle-process-file): * lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Handle signals. * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test. diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 7f829f1520..7ef07afb8e 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -918,6 +918,10 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (kill-buffer (tramp-get-connection-buffer v)) (setq ret 1))) + ;; Handle signals. + (when (and (natnump ret) (> ret 128)) + (setq ret (format "Signal %d" (- ret 128)))) + ;; Provide error file. (when tmpstderr (rename-file tmpstderr (cadr destination) t)) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index c6eb7a8ff4..c609f58cdd 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3159,6 +3159,10 @@ STDERR can also be a file name." (kill-buffer (tramp-get-connection-buffer v)) (setq ret 1))) + ;; Handle signals. + (when (and (natnump ret) (> ret 128)) + (setq ret (format "Signal %d" (- ret 128)))) + ;; Provide error file. (when tmpstderr (rename-file tmpstderr (cadr destination) t)) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 462539a7c1..4cacfa2f71 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4209,6 +4209,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (should-not (zerop (process-file "false"))) (should-not (zerop (process-file "binary-does-not-exist"))) (should (= 42 (process-file "sh" nil nil nil "-c" "exit 42"))) + ;; Return string in case the process is interrupted. + (should (stringp (process-file "sh" nil nil nil "-c" "kill -2 $$"))) (with-temp-buffer (write-region "foo" nil tmp-name) (should (file-exists-p tmp-name)) commit 3b5f728bffb043d623874db29869cc3adf117e43 Author: Tassilo Horn Date: Thu May 7 09:53:54 2020 +0200 Refactor browse-url handler selection into separate function. * lisp/net/browse-url.el (browse-url-select-handler): New function. (browse-url): Use it. * lisp/dnd.el (dnd-handle-one-url): Use it. diff --git a/lisp/dnd.el b/lisp/dnd.el index b649e725f2..c185794d6e 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el @@ -92,7 +92,6 @@ If no match is found here, `browse-url-handlers' and If no match is found, just call `dnd-insert-text'. WINDOW is where the drop happened, ACTION is the action for the drop, URL is what has been dropped. Returns ACTION." - (require 'browse-url) (let (ret) (or (catch 'done @@ -102,19 +101,11 @@ is what has been dropped. Returns ACTION." (throw 'done t))) nil) (catch 'done - (defvar browse-url-handlers) ;; Not autoloaded. - (dolist (bf (append - ;; The alist choice of browse-url-browser-function - ;; is deprecated since 28.1, so the (unless ...) - ;; can be removed at some point in time. - (unless (functionp browse-url-browser-function) - browse-url-browser-function) - browse-url-handlers - browse-url-default-handlers)) - (when (string-match (car bf) url) - (setq ret 'private) - (funcall (cdr bf) url action) - (throw 'done t))) + (let ((browser (browse-url-select-handler url))) + (when browser + (setq ret 'private) + (funcall browser url action) + (throw 'done t))) nil) (progn (dnd-insert-text window action url) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 67dc4cd231..b34665358c 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -635,6 +635,32 @@ match, the URL is opened using the value of :value-type (function :tag "Handler")) :version "28.1") +;;;###autoload +(defun browse-url-select-handler (url) + "Return a handler suitable for browsing URL. +This searches `browse-url-handlers', and +`browse-url-default-handlers' for a matching handler. Return nil +if no handler is found. + +Currently, it also consults `browse-url-browser-function' first +if it is set to an alist, although this usage is deprecated since +Emacs 28.1 and will be removed in a future release." + (catch 'custom-url-handler + (dolist (regex-handler + (append + ;; The alist choice of browse-url-browser-function + ;; is deprecated since 28.1, so the (unless ...) + ;; can be removed at some point in time. + (when (and (consp browse-url-browser-function) + (not (functionp browse-url-browser-function))) + (warn "Having `browse-url-browser-function' set to an +alist is deprecated. Use `browse-url-handlers' instead.") + browse-url-browser-function) + browse-url-handlers + browse-url-default-handlers)) + (when (string-match-p (car regex-handler) url) + (throw 'custom-url-handler (cdr regex-handler)))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; URL encoding @@ -828,14 +854,8 @@ If ARGS are omitted, the default is to pass (not (string-match "\\`[a-z]+:" url))) (setq url (expand-file-name url))) (let ((process-environment (copy-sequence process-environment)) - (function - (catch 'custom-url-handler - (dolist (regex-handler (append browse-url-handlers - browse-url-default-handlers)) - (when (string-match-p (car regex-handler) url) - (throw 'custom-url-handler (cdr regex-handler)))) - ;; No special handler found. - browse-url-browser-function)) + (function (or (browse-url-select-handler url) + browse-url-browser-function)) ;; Ensure that `default-directory' exists and is readable (bug#6077). (default-directory (or (unhandled-file-name-directory default-directory) (expand-file-name "~/")))) @@ -844,24 +864,9 @@ If ARGS are omitted, the default is to pass ;; which may not even exist any more. (if (stringp (frame-parameter nil 'display)) (setenv "DISPLAY" (frame-parameter nil 'display))) - (if (and (consp function) - (not (functionp function))) - ;; The `function' can be an alist; look down it for first - ;; match and apply the function (which might be a lambda). - ;; However, this usage is deprecated as of Emacs 28.1. - (progn - (warn "Having `browse-url-browser-function' set to an -alist is deprecated. Use `browse-url-handlers' instead.") - (catch 'done - (dolist (bf function) - (when (string-match (car bf) url) - (apply (cdr bf) url args) - (throw 'done t))) - (error "No browse-url-browser-function matching URL %s" - url))) - ;; Unbound symbols go down this leg, since void-function from - ;; apply is clearer than wrong-type-argument from dolist. - (apply function url args)))) + (if (functionp nil) + (apply function url args) + (error "No suitable browser for URL %s" url)))) ;;;###autoload (defun browse-url-at-point (&optional arg) commit 281b9e42a49c72be48f881f94a5ec33537508118 Author: Basil L. Contovounesios Date: Thu May 7 01:52:50 2020 +0100 ; Fix recent byte-compiler warnings in dnd.el * lisp/dnd.el (dnd-handle-one-url): Don't require browse-url twice in the same function. Declare non-autoloaded browse-url-handlers to silence byte-compiler. diff --git a/lisp/dnd.el b/lisp/dnd.el index 2f7b16c56e..b649e725f2 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el @@ -102,7 +102,7 @@ is what has been dropped. Returns ACTION." (throw 'done t))) nil) (catch 'done - (require 'browse-url) ;; browse-url-handlers is not autoloaded. + (defvar browse-url-handlers) ;; Not autoloaded. (dolist (bf (append ;; The alist choice of browse-url-browser-function ;; is deprecated since 28.1, so the (unless ...) commit 86fef6ab89ee54c6f78bc2064e55c5439e929827 Author: Tassilo Horn Date: Wed May 6 22:23:03 2020 +0200 Restore HTML rendering behavior of browse-url-of-buffer/file. * lisp/net/browse-url.el (browse-url-default-handlers): Add a browser handler for HTML page file:// URLs before the generic file:// handler. (browse-url--browser): New defun. diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 1275c15578..67dc4cd231 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -601,10 +601,17 @@ down (this *won't* always work)." "Calls `browse-url-man-function' with URL and ARGS." (funcall browse-url-man-function url args)) +(defun browse-url--browser (url &rest args) + "Calls `browse-url-browser-function' with URL and ARGS." + (funcall browse-url-browser-function url args)) + ;;;###autoload (defvar browse-url-default-handlers '(("\\`mailto:" . browse-url--mailto) ("\\`man:" . browse-url--man) + ;; Render file:// URLs if they are HTML pages, otherwise just find + ;; the file. + ("\\`file://.*\\.html?\\b" . browse-url--browser) ("\\`file://" . browse-url-emacs)) "Like `browse-url-handlers' but populated by Emacs and packages. commit 02f5a419fdcfb3fb6c8a3e4debe7224010b40227 Author: Paul Eggert Date: Wed May 6 10:57:18 2020 -0700 Pacify buggy old GCC with a cast * src/bignum.h (bignum_integer): Pacify GCC 4.8.5. Problem reported by Andreas Schwab in: https://lists.gnu.org/r/emacs-devel/2020-05/msg00781.html diff --git a/src/bignum.h b/src/bignum.h index ad9021f15f..4a906c3c0e 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -108,7 +108,8 @@ bignum_integer (mpz_t *tmp, Lisp_Object i) if (FIXNUMP (i)) { mpz_set_intmax (*tmp, XFIXNUM (i)); - return tmp; + /* The unnecessary cast pacifies a buggy GCC 4.8.5. */ + return (mpz_t const *) tmp; } return xbignum_val (i); } commit 153241d664f45d832a4564bb53d7f75a0af2c35f Merge: b16d553ecd 76516465bf Author: Glenn Morris Date: Wed May 6 09:28:36 2020 -0700 Merge from origin/emacs-27 76516465bf (origin/emacs-27) * doc/emacs/modes.texi (Major Modes): Fi... f8e6cd11b3 Fix docstring quoting commit b16d553ecd1b0478ba28dca5d898fd22aa130fd8 Merge: 3568c5d86f 1e09364d67 Author: Glenn Morris Date: Wed May 6 09:28:36 2020 -0700 ; Merge from origin/emacs-27 The following commits were skipped: 1e09364d67 ; Mark Bug#29799 tests as failing since we reverted the fix de1b33f5a8 Revert "cl-loop: Calculate the array length just once" caf155c463 Revert "cl-loop: Add missing guard condition" 79e133da03 Revert "Refix conditional step clauses in cl-loop" commit 3568c5d86fc8d37d761245c19246f76803fb1f16 Merge: 033bdd1b90 7be160d800 Author: Glenn Morris Date: Wed May 6 09:28:36 2020 -0700 Merge from origin/emacs-27 7be160d800 Improve "Help Summary" section in user manual f6d6ccc984 Clarify message-sendmail-extra-arguments docstring 95fde1a851 * src/editfns.c (Fformat): Small documentation fix. commit 033bdd1b908b7cf30ed68bb9a25df0f800832fb3 Merge: e292097f55 9f5999b08d Author: Glenn Morris Date: Wed May 6 09:28:36 2020 -0700 ; Merge from origin/emacs-27 The following commit was skipped: 9f5999b08d Remove calls to non-existent functions from edebug.el. commit e292097f55126ca2f42404f4c5c6ec7ddb62078b Merge: 29171c3a8c 4b419083f9 Author: Glenn Morris Date: Wed May 6 09:28:36 2020 -0700 Merge from origin/emacs-27 4b419083f9 Honor search-upper-case 310112fdc7 Fix eww-follow-link on URLs with #target # Conflicts: # lisp/fileloop.el commit 29171c3a8c4dcd1f740df84c759397b6ffef68ee Merge: b147e6e507 f5cb5bb828 Author: Glenn Morris Date: Wed May 6 09:22:55 2020 -0700 ; Merge from origin/emacs-27 The following commit was skipped: f5cb5bb828 Revert part of recent commit 85544f8ef5 (bug#40808) commit b147e6e50787ad8dcec93c3a7b5336f4281c78bf Merge: 4b8e6939bf f9fa726ced Author: Glenn Morris Date: Wed May 6 09:22:55 2020 -0700 Merge from origin/emacs-27 f9fa726ced Improve doc strings of makunbound and fmakunbound commit 4b8e6939bf7664fda33a7aaa03d2d8069358ff7b Author: Tassilo Horn Date: Wed May 6 16:48:57 2020 +0200 Consult browse-url-{default-,}handlers in drag&drop. * lisp/dnd.el (dnd-handle-one-url): Consult `browse-url-handlers' and `browse-url-default-handlers' for a matching handler. Adapt docstring. * doc/lispref/frames.texi (Drag and Drop): Remove the docs for the deprecated alist choice of `browse-url-browser-function' and mention `browse-url-handlers' and `browse-url-default-handlers'. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 905e5c2e6c..6bf5db2aa1 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -3875,13 +3875,15 @@ detailed knowledge of what types other applications use for drag and drop. @vindex dnd-protocol-alist +@vindex browse-url-handlers +@vindex browse-url-default-handlers When an URL is dropped on Emacs it may be a file, but it may also be another URL type (https, etc.). Emacs first checks @code{dnd-protocol-alist} to determine what to do with the URL@. If -there is no match there and if @code{browse-url-browser-function} is -an alist, Emacs looks for a match there. If no match is found the -text for the URL is inserted. If you want to alter Emacs behavior, -you can customize these variables. +there is no match there, Emacs looks for a match in +@code{browse-url-handlers} and @code{browse-url-default-handlers}. If +still no match has been found, the text for the URL is inserted. If +you want to alter Emacs behavior, you can customize these variables. @node Color Names @section Color Names diff --git a/lisp/dnd.el b/lisp/dnd.el index 905659e817..2f7b16c56e 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el @@ -87,12 +87,11 @@ and is the default except for MS-Windows." (defun dnd-handle-one-url (window action url) "Handle one dropped url by calling the appropriate handler. The handler is first located by looking at `dnd-protocol-alist'. -If no match is found here, and the value of `browse-url-browser-function' -is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. -If no match is found, just call `dnd-insert-text'. -WINDOW is where the drop happened, ACTION is the action for the drop, -URL is what has been dropped. -Returns ACTION." +If no match is found here, `browse-url-handlers' and +`browse-url-default-handlers' are searched for a match. +If no match is found, just call `dnd-insert-text'. WINDOW is +where the drop happened, ACTION is the action for the drop, URL +is what has been dropped. Returns ACTION." (require 'browse-url) (let (ret) (or @@ -102,14 +101,21 @@ Returns ACTION." (setq ret (funcall (cdr bf) url action)) (throw 'done t))) nil) - (when (not (functionp browse-url-browser-function)) - (catch 'done - (dolist (bf browse-url-browser-function) - (when (string-match (car bf) url) - (setq ret 'private) - (funcall (cdr bf) url action) - (throw 'done t))) - nil)) + (catch 'done + (require 'browse-url) ;; browse-url-handlers is not autoloaded. + (dolist (bf (append + ;; The alist choice of browse-url-browser-function + ;; is deprecated since 28.1, so the (unless ...) + ;; can be removed at some point in time. + (unless (functionp browse-url-browser-function) + browse-url-browser-function) + browse-url-handlers + browse-url-default-handlers)) + (when (string-match (car bf) url) + (setq ret 'private) + (funcall (cdr bf) url action) + (throw 'done t))) + nil) (progn (dnd-insert-text window action url) (setq ret 'private))) commit 76516465bff31d35ea93bcb2badb14c642bb5767 (refs/remotes/origin/emacs-27) Author: Eli Zaretskii Date: Wed May 6 17:13:55 2020 +0300 * doc/emacs/modes.texi (Major Modes): Fix quoting. (Bug#41110) diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index f5fb6b1e79..c1420ea13f 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -116,7 +116,7 @@ is enabled in a buffer. @xref{Hooks}, for more information about hooks. Each mode hook is named after its major mode, e.g., Fortran mode has @code{fortran-mode-hook}. Furthermore, all text-based major modes run @code{text-mode-hook}, and many programming language modes -@footnote{More specifically, the modes which are ''derived'' from +@footnote{More specifically, the modes which are ``derived'' from @code{prog-mode} (@pxref{Derived Modes,,, elisp, The Emacs Lisp Reference Manual}).} (including all those distributed with Emacs) run @code{prog-mode-hook}, prior to running their own mode hooks. Hook commit f8e6cd11b34320999aa72886ece3f32b0a8ad897 Author: Noam Postavsky Date: Tue May 5 21:11:18 2020 -0400 Fix docstring quoting * lisp/gnus/message.el (message-sendmail-extra-arguments): Fix escaping of quotes in docstring. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 5d9473f443..cbdd329f3e 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -874,7 +874,7 @@ If this is nil, use `user-mail-address'. If it is the symbol (defcustom message-sendmail-extra-arguments nil "Additional arguments to `sendmail-program'. -A list of strings, e.g. '("-a" "account") for msmtp." +A list of strings, e.g. (\"-a\" \"account\") for msmtp." :version "23.1" ;; No Gnus :type '(repeat string) ;; :link '(custom-manual "(message)Mail Variables") commit 1e09364d677b0fb57efd18369c55e8c2d0e826f5 Author: Noam Postavsky Date: Thu Apr 30 19:35:45 2020 -0400 ; Mark Bug#29799 tests as failing since we reverted the fix * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-for-as-equals-and) (cl-macs-loop-conditional-step-clauses): Set :expected-result to :failed. Don't merge to master. The mentioned reverts are a safe-for-release fix for Bug#40727. diff --git a/test/lisp/emacs-lisp/cl-macs-tests.el b/test/lisp/emacs-lisp/cl-macs-tests.el index 9ca84f156a..c357ecde95 100644 --- a/test/lisp/emacs-lisp/cl-macs-tests.el +++ b/test/lisp/emacs-lisp/cl-macs-tests.el @@ -498,6 +498,7 @@ collection clause." (ert-deftest cl-macs-loop-for-as-equals-and () "Test for https://debbugs.gnu.org/29799 ." + :expected-result :failed (let ((arr (make-vector 3 0))) (should (equal '((0 0) (1 1) (2 2)) (cl-loop for k below 3 for x = k and z = (elt arr k) @@ -531,6 +532,7 @@ collection clause." (ert-deftest cl-macs-loop-conditional-step-clauses () "These tests failed under the initial fixes in #bug#29799." + :expected-result :failed (should (cl-loop for i from 1 upto 100 and j = 1 then (1+ j) if (not (= i j)) return nil commit de1b33f5a8c6ceee9be59285f70370c3cb2efd34 Author: Noam Postavsky Date: Thu Apr 30 19:33:51 2020 -0400 Revert "cl-loop: Calculate the array length just once" Don't merge to master. This is a safe-for-release fix for Bug#40727. diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 00f34d3fb6..78d083fcc6 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1322,13 +1322,11 @@ For more details, see Info node `(cl)Loop Facility'. ((memq word '(across across-ref)) (let ((temp-vec (make-symbol "--cl-vec--")) - (temp-len (make-symbol "--cl-len--")) (temp-idx (make-symbol "--cl-idx--"))) (push (list temp-vec (pop cl--loop-args)) loop-for-bindings) - (push (list temp-len `(length ,temp-vec)) loop-for-bindings) (push (list temp-idx -1) loop-for-bindings) (push `(< (setq ,temp-idx (1+ ,temp-idx)) - ,temp-len) + (length ,temp-vec)) cl--loop-body) (if (eq word 'across-ref) (push (list var `(aref ,temp-vec ,temp-idx)) @@ -1343,7 +1341,6 @@ For more details, see Info node `(cl)Loop Facility'. (error "Expected `of'")))) (seq (cl--pop2 cl--loop-args)) (temp-seq (make-symbol "--cl-seq--")) - (temp-len (make-symbol "--cl-len--")) (temp-idx (if (eq (car cl--loop-args) 'using) (if (and (= (length (cadr cl--loop-args)) 2) @@ -1354,19 +1351,16 @@ For more details, see Info node `(cl)Loop Facility'. (push (list temp-seq seq) loop-for-bindings) (push (list temp-idx 0) loop-for-bindings) (if ref - (progn + (let ((temp-len (make-symbol "--cl-len--"))) (push (list temp-len `(length ,temp-seq)) loop-for-bindings) (push (list var `(elt ,temp-seq ,temp-idx)) cl--loop-symbol-macs) (push `(< ,temp-idx ,temp-len) cl--loop-body)) - ;; Evaluate seq length just if needed, that is, when seq is not a cons. - (push (list temp-len (or (consp seq) `(length ,temp-seq))) - loop-for-bindings) (push (list var nil) loop-for-bindings) (push `(and ,temp-seq (or (consp ,temp-seq) - (< ,temp-idx ,temp-len))) + (< ,temp-idx (length ,temp-seq)))) cl--loop-body) (push (list var `(if (consp ,temp-seq) (pop ,temp-seq) commit caf155c4638d4704b2a099657153c9abc115720b Author: Noam Postavsky Date: Thu Apr 30 19:33:50 2020 -0400 Revert "cl-loop: Add missing guard condition" Don't merge to master. This is a safe-for-release fix for Bug#40727. diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index cda25d186f..00f34d3fb6 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -897,7 +897,7 @@ This is compatible with Common Lisp, but note that `defun' and (defvar cl--loop-name) (defvar cl--loop-result) (defvar cl--loop-result-explicit) (defvar cl--loop-result-var) (defvar cl--loop-steps) -(defvar cl--loop-symbol-macs) (defvar cl--loop-guard-cond) +(defvar cl--loop-symbol-macs) (defun cl--loop-set-iterator-function (kind iterator) (if cl--loop-iterator-function @@ -966,7 +966,7 @@ For more details, see Info node `(cl)Loop Facility'. (cl--loop-accum-var nil) (cl--loop-accum-vars nil) (cl--loop-initially nil) (cl--loop-finally nil) (cl--loop-iterator-function nil) (cl--loop-first-flag nil) - (cl--loop-symbol-macs nil) (cl--loop-guard-cond nil)) + (cl--loop-symbol-macs nil)) ;; Here is more or less how those dynbind vars are used after looping ;; over cl--parse-loop-clause: ;; @@ -1001,24 +1001,7 @@ For more details, see Info node `(cl)Loop Facility'. (list (or cl--loop-result-explicit cl--loop-result)))) (ands (cl--loop-build-ands (nreverse cl--loop-body))) - (while-body - (nconc - (cadr ands) - (if (or (not cl--loop-guard-cond) (not cl--loop-first-flag)) - (nreverse cl--loop-steps) - ;; Right after update the loop variable ensure that the loop - ;; condition, i.e. (car ands), is still satisfied; otherwise, - ;; set `cl--loop-first-flag' nil and skip the remaining - ;; body forms (#Bug#29799). - ;; - ;; (last cl--loop-steps) updates the loop var - ;; (car (butlast cl--loop-steps)) sets `cl--loop-first-flag' nil - ;; (nreverse (cdr (butlast cl--loop-steps))) are the - ;; remaining body forms. - (append (last cl--loop-steps) - `((and ,(car ands) - ,@(nreverse (cdr (butlast cl--loop-steps))))) - `(,(car (butlast cl--loop-steps))))))) + (while-body (nconc (cadr ands) (nreverse cl--loop-steps))) (body (append (nreverse cl--loop-initially) (list (if cl--loop-iterator-function @@ -1528,11 +1511,10 @@ For more details, see Info node `(cl)Loop Facility'. ,(cl--loop-let (nreverse loop-for-sets) 'setq ands) t) cl--loop-body)) - (when loop-for-steps - (setq cl--loop-guard-cond t) - (push (cons (if ands 'cl-psetq 'setq) - (apply 'append (nreverse loop-for-steps))) - cl--loop-steps)))) + (if loop-for-steps + (push (cons (if ands 'cl-psetq 'setq) + (apply 'append (nreverse loop-for-steps))) + cl--loop-steps)))) ((eq word 'repeat) (let ((temp (make-symbol "--cl-var--"))) commit 79e133da034cd2d7cccfc5a6eb7db340f2dc45a8 Author: Noam Postavsky Date: Thu Apr 30 19:33:34 2020 -0400 Revert "Refix conditional step clauses in cl-loop" Don't merge to master. This is a safe-for-release fix for Bug#40727. diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index d56f4151df..cda25d186f 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -889,7 +889,7 @@ This is compatible with Common Lisp, but note that `defun' and ;;; The "cl-loop" macro. (defvar cl--loop-args) (defvar cl--loop-accum-var) (defvar cl--loop-accum-vars) -(defvar cl--loop-bindings) (defvar cl--loop-body) (defvar cl--loop-conditions) +(defvar cl--loop-bindings) (defvar cl--loop-body) (defvar cl--loop-finally) (defvar cl--loop-finish-flag) ;Symbol set to nil to exit the loop? (defvar cl--loop-first-flag) @@ -897,7 +897,7 @@ This is compatible with Common Lisp, but note that `defun' and (defvar cl--loop-name) (defvar cl--loop-result) (defvar cl--loop-result-explicit) (defvar cl--loop-result-var) (defvar cl--loop-steps) -(defvar cl--loop-symbol-macs) +(defvar cl--loop-symbol-macs) (defvar cl--loop-guard-cond) (defun cl--loop-set-iterator-function (kind iterator) (if cl--loop-iterator-function @@ -966,8 +966,7 @@ For more details, see Info node `(cl)Loop Facility'. (cl--loop-accum-var nil) (cl--loop-accum-vars nil) (cl--loop-initially nil) (cl--loop-finally nil) (cl--loop-iterator-function nil) (cl--loop-first-flag nil) - (cl--loop-symbol-macs nil) - (cl--loop-conditions nil)) + (cl--loop-symbol-macs nil) (cl--loop-guard-cond nil)) ;; Here is more or less how those dynbind vars are used after looping ;; over cl--parse-loop-clause: ;; @@ -1002,7 +1001,24 @@ For more details, see Info node `(cl)Loop Facility'. (list (or cl--loop-result-explicit cl--loop-result)))) (ands (cl--loop-build-ands (nreverse cl--loop-body))) - (while-body (nconc (cadr ands) (nreverse cl--loop-steps))) + (while-body + (nconc + (cadr ands) + (if (or (not cl--loop-guard-cond) (not cl--loop-first-flag)) + (nreverse cl--loop-steps) + ;; Right after update the loop variable ensure that the loop + ;; condition, i.e. (car ands), is still satisfied; otherwise, + ;; set `cl--loop-first-flag' nil and skip the remaining + ;; body forms (#Bug#29799). + ;; + ;; (last cl--loop-steps) updates the loop var + ;; (car (butlast cl--loop-steps)) sets `cl--loop-first-flag' nil + ;; (nreverse (cdr (butlast cl--loop-steps))) are the + ;; remaining body forms. + (append (last cl--loop-steps) + `((and ,(car ands) + ,@(nreverse (cdr (butlast cl--loop-steps))))) + `(,(car (butlast cl--loop-steps))))))) (body (append (nreverse cl--loop-initially) (list (if cl--loop-iterator-function @@ -1035,12 +1051,6 @@ For more details, see Info node `(cl)Loop Facility'. (list `(cl-symbol-macrolet ,cl--loop-symbol-macs ,@body)))) `(cl-block ,cl--loop-name ,@body))))) -(defmacro cl--push-clause-loop-body (clause) - "Apply CLAUSE to both `cl--loop-conditions' and `cl--loop-body'." - `(progn - (push ,clause cl--loop-conditions) - (push ,clause cl--loop-body))) - ;; Below is a complete spec for cl-loop, in several parts that correspond ;; to the syntax given in CLtL2. The specs do more than specify where ;; the forms are; it also specifies, as much as Edebug allows, all the @@ -1191,6 +1201,8 @@ For more details, see Info node `(cl)Loop Facility'. ;; (def-edebug-spec loop-d-type-spec ;; (&or (loop-d-type-spec . [&or nil loop-d-type-spec]) cl-type-spec)) + + (defun cl--parse-loop-clause () ; uses loop-* (let ((word (pop cl--loop-args)) (hash-types '(hash-key hash-keys hash-value hash-values)) @@ -1269,11 +1281,11 @@ For more details, see Info node `(cl)Loop Facility'. (if end-var (push (list end-var end) loop-for-bindings)) (if step-var (push (list step-var step) loop-for-bindings)) - (when end - (cl--push-clause-loop-body - (list - (if down (if excl '> '>=) (if excl '< '<=)) - var (or end-var end)))) + (if end + (push (list + (if down (if excl '> '>=) (if excl '< '<=)) + var (or end-var end)) + cl--loop-body)) (push (list var (list (if down '- '+) var (or step-var step 1))) loop-for-steps))) @@ -1283,7 +1295,7 @@ For more details, see Info node `(cl)Loop Facility'. (temp (if (and on (symbolp var)) var (make-symbol "--cl-var--")))) (push (list temp (pop cl--loop-args)) loop-for-bindings) - (cl--push-clause-loop-body `(consp ,temp)) + (push `(consp ,temp) cl--loop-body) (if (eq word 'in-ref) (push (list var `(car ,temp)) cl--loop-symbol-macs) (or (eq temp var) @@ -1306,19 +1318,24 @@ For more details, see Info node `(cl)Loop Facility'. ((eq word '=) (let* ((start (pop cl--loop-args)) (then (if (eq (car cl--loop-args) 'then) - (cl--pop2 cl--loop-args) start)) - (first-assign (or cl--loop-first-flag - (setq cl--loop-first-flag - (make-symbol "--cl-var--"))))) + (cl--pop2 cl--loop-args) start))) (push (list var nil) loop-for-bindings) (if (or ands (eq (car cl--loop-args) 'and)) (progn - (push `(,var (if ,first-assign ,start ,var)) loop-for-sets) - (push `(,var (if ,(car (cl--loop-build-ands - (nreverse cl--loop-conditions))) - ,then ,var)) - loop-for-steps)) - (push `(,var (if ,first-assign ,start ,then)) loop-for-sets)))) + (push `(,var + (if ,(or cl--loop-first-flag + (setq cl--loop-first-flag + (make-symbol "--cl-var--"))) + ,start ,var)) + loop-for-sets) + (push (list var then) loop-for-steps)) + (push (list var + (if (eq start then) start + `(if ,(or cl--loop-first-flag + (setq cl--loop-first-flag + (make-symbol "--cl-var--"))) + ,start ,then))) + loop-for-sets)))) ((memq word '(across across-ref)) (let ((temp-vec (make-symbol "--cl-vec--")) @@ -1327,8 +1344,9 @@ For more details, see Info node `(cl)Loop Facility'. (push (list temp-vec (pop cl--loop-args)) loop-for-bindings) (push (list temp-len `(length ,temp-vec)) loop-for-bindings) (push (list temp-idx -1) loop-for-bindings) - (cl--push-clause-loop-body - `(< (setq ,temp-idx (1+ ,temp-idx)) ,temp-len)) + (push `(< (setq ,temp-idx (1+ ,temp-idx)) + ,temp-len) + cl--loop-body) (if (eq word 'across-ref) (push (list var `(aref ,temp-vec ,temp-idx)) cl--loop-symbol-macs) @@ -1358,14 +1376,15 @@ For more details, see Info node `(cl)Loop Facility'. loop-for-bindings) (push (list var `(elt ,temp-seq ,temp-idx)) cl--loop-symbol-macs) - (cl--push-clause-loop-body `(< ,temp-idx ,temp-len))) + (push `(< ,temp-idx ,temp-len) cl--loop-body)) ;; Evaluate seq length just if needed, that is, when seq is not a cons. (push (list temp-len (or (consp seq) `(length ,temp-seq))) loop-for-bindings) (push (list var nil) loop-for-bindings) - (cl--push-clause-loop-body `(and ,temp-seq - (or (consp ,temp-seq) - (< ,temp-idx ,temp-len)))) + (push `(and ,temp-seq + (or (consp ,temp-seq) + (< ,temp-idx ,temp-len))) + cl--loop-body) (push (list var `(if (consp ,temp-seq) (pop ,temp-seq) (aref ,temp-seq ,temp-idx))) @@ -1461,8 +1480,9 @@ For more details, see Info node `(cl)Loop Facility'. (push (list var '(selected-frame)) loop-for-bindings) (push (list temp nil) loop-for-bindings) - (cl--push-clause-loop-body `(prog1 (not (eq ,var ,temp)) - (or ,temp (setq ,temp ,var)))) + (push `(prog1 (not (eq ,var ,temp)) + (or ,temp (setq ,temp ,var))) + cl--loop-body) (push (list var `(next-frame ,var)) loop-for-steps))) @@ -1483,8 +1503,9 @@ For more details, see Info node `(cl)Loop Facility'. (push (list minip `(minibufferp (window-buffer ,var))) loop-for-bindings) (push (list temp nil) loop-for-bindings) - (cl--push-clause-loop-body `(prog1 (not (eq ,var ,temp)) - (or ,temp (setq ,temp ,var)))) + (push `(prog1 (not (eq ,var ,temp)) + (or ,temp (setq ,temp ,var))) + cl--loop-body) (push (list var `(next-window ,var ,minip)) loop-for-steps))) @@ -1508,6 +1529,7 @@ For more details, see Info node `(cl)Loop Facility'. t) cl--loop-body)) (when loop-for-steps + (setq cl--loop-guard-cond t) (push (cons (if ands 'cl-psetq 'setq) (apply 'append (nreverse loop-for-steps))) cl--loop-steps)))) commit 7be160d80002cd000f33da38d3a2f7a2920c1bf5 Author: Eli Zaretskii Date: Tue May 5 17:47:33 2020 +0300 Improve "Help Summary" section in user manual * doc/emacs/help.texi (Help Summary): Add cross-references to sections with details of each Help command. diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index fce6720b93..06ddc11158 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -89,91 +89,97 @@ following sections. @table @kbd @item C-h a @var{topics} @key{RET} Display a list of commands whose names match @var{topics} -(@code{apropos-command}). +(@code{apropos-command}). @xref{Apropos}. @item C-h b Display all active key bindings; minor mode bindings first, then those of the major mode, then global bindings (@code{describe-bindings}). +@xref{Misc Help}. @item C-h c @var{key} Show the name of the command that the key sequence @var{key} is bound to (@code{describe-key-briefly}). Here @kbd{c} stands for ``character''. For more extensive information on @var{key}, use -@kbd{C-h k}. +@kbd{C-h k}. @xref{Key Help}. @item C-h d @var{topics} @key{RET} Display the commands and variables whose documentation matches -@var{topics} (@code{apropos-documentation}). +@var{topics} (@code{apropos-documentation}). @xref{Apropos}. @item C-h e Display the @file{*Messages*} buffer -(@code{view-echo-area-messages}). +(@code{view-echo-area-messages}). @xref{Misc Help}. @item C-h f @var{function} @key{RET} Display documentation on the Lisp function named @var{function} (@code{describe-function}). Since commands are Lisp functions, -this works for commands too. +this works for commands too. @xref{Name Help}. @item C-h h Display the @file{HELLO} file, which shows examples of various character sets. @item C-h i Run Info, the GNU documentation browser (@code{info}). The Emacs -manual is available in Info. +manual is available in Info. @xref{Misc Help}. @item C-h k @var{key} Display the name and documentation of the command that @var{key} runs -(@code{describe-key}). +(@code{describe-key}). @xref{Key Help}. @item C-h l Display a description of your last 300 keystrokes -(@code{view-lossage}). +(@code{view-lossage}). @xref{Misc Help}. @item C-h m Display documentation of the current major mode and minor modes -(@code{describe-mode}). +(@code{describe-mode}). @xref{Misc Help}. @item C-h n Display news of recent Emacs changes (@code{view-emacs-news}). +@xref{Help Files}. @item C-h o @var{symbol} Display documentation of the Lisp symbol named @var{symbol} (@code{describe-symbol}). This will show the documentation of all -kinds of symbols: functions, variables, and faces. +kinds of symbols: functions, variables, and faces. @xref{Name Help}. @item C-h p -Find packages by topic keyword (@code{finder-by-keyword}). This lists -packages using a package menu buffer. @xref{Packages}. +Find packages by topic keyword (@code{finder-by-keyword}). +@xref{Package Keywords}. This lists packages using a package menu +buffer. @xref{Packages}. @item C-h P @var{package} @key{RET} Display documentation about the specified package -(@code{describe-package}). +(@code{describe-package}). @xref{Package Keywords}. @item C-h r Display the Emacs manual in Info (@code{info-emacs-manual}). @item C-h s Display the contents of the current @dfn{syntax table} -(@code{describe-syntax}). The syntax table says which characters are -opening delimiters, which are parts of words, and so on. @xref{Syntax -Tables,, Syntax Tables, elisp, The Emacs Lisp Reference Manual}, for -details. +(@code{describe-syntax}). @xref{Misc Help}. The syntax table says +which characters are opening delimiters, which are parts of words, and +so on. @xref{Syntax Tables,, Syntax Tables, elisp, The Emacs Lisp +Reference Manual}, for details. @item C-h t Enter the Emacs interactive tutorial (@code{help-with-tutorial}). @item C-h v @var{var} @key{RET} Display the documentation of the Lisp variable @var{var} -(@code{describe-variable}). +(@code{describe-variable}). @xref{Name Help}. @item C-h w @var{command} @key{RET} Show which keys run the command named @var{command} (@code{where-is}). +@xref{Key Help}. @item C-h C @var{coding} @key{RET} Describe the coding system @var{coding} -(@code{describe-coding-system}). +(@code{describe-coding-system}). @xref{Coding Systems}. @item C-h C @key{RET} Describe the coding systems currently in use. @item C-h F @var{command} @key{RET} Enter Info and go to the node that documents the Emacs command -@var{command} (@code{Info-goto-emacs-command-node}). +@var{command} (@code{Info-goto-emacs-command-node}). @xref{Name Help}. @item C-h I @var{method} @key{RET} Describe the input method @var{method} (@code{describe-input-method}). +@xref{Select Input Method}. @item C-h K @var{key} Enter Info and go to the node that documents the key sequence -@var{key} (@code{Info-goto-emacs-key-command-node}). +@var{key} (@code{Info-goto-emacs-key-command-node}). @xref{Key Help}. @item C-h L @var{language-env} @key{RET} Display information on the character sets, coding systems, and input methods used in language environment @var{language-env} -(@code{describe-language-environment}). +(@code{describe-language-environment}). @xref{Language Environments}. @item C-h S @var{symbol} @key{RET} Display the Info documentation on symbol @var{symbol} according to the programming language you are editing (@code{info-lookup-symbol}). +@xref{Misc Help}. @item C-h . Display the help message for a special text area, if point is in one (@code{display-local-help}). (These include, for example, links in -@file{*Help*} buffers.) +@file{*Help*} buffers.) @xref{Help Echo}. @end table @node Key Help commit f6d6ccc984ac241e1a5f61d770bf77c15f30ad07 Author: Stefan Kangas Date: Tue May 5 16:44:02 2020 +0200 Clarify message-sendmail-extra-arguments docstring * lisp/gnus/message.el (message-sendmail-extra-arguments): Clarify docstring. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index adefa0efd6..5d9473f443 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -873,8 +873,8 @@ If this is nil, use `user-mail-address'. If it is the symbol message-sendmail-envelope-from)) (defcustom message-sendmail-extra-arguments nil - "Additional arguments to `sendmail-program'." - ;; E.g. '("-a" "account") for msmtp + "Additional arguments to `sendmail-program'. +A list of strings, e.g. '("-a" "account") for msmtp." :version "23.1" ;; No Gnus :type '(repeat string) ;; :link '(custom-manual "(message)Mail Variables") commit 95fde1a851a88e782aaa812ea9370e1e4b889904 Author: Philipp Stephani Date: Tue May 5 14:58:24 2020 +0200 * src/editfns.c (Fformat): Small documentation fix. diff --git a/src/editfns.c b/src/editfns.c index ddf190b175..fe1feaf1e7 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3057,7 +3057,7 @@ printed representation. The padding, if any, normally goes on the left, but it goes on the right if the - flag is present. The padding character is normally a space, but it is 0 if the 0 flag is present. The 0 flag is ignored if the - flag is present, or the format sequence -is something other than %d, %e, %f, and %g. +is something other than %d, %o, %x, %e, %f, and %g. For %e and %f sequences, the number after the "." in the precision specifier says how many decimal places to show; if zero, the decimal commit 9f5999b08d4c9cfa37f19acec1c874db519e5705 Author: Alan Mackenzie Date: Mon May 4 18:26:38 2020 +0000 Remove calls to non-existent functions from edebug.el. Do not merge to master. *lisp/emacs-lisp/edebug.el (edebug--display-1) (edebug-toggle-disable-breakpoint): Remove calls to edebug--overlay-breakpoints and edebug--overlay-breakpoints-removed which had been overlooked in a recent changed to edebug. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index dd1a17eb51..a0bc6562bc 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -2844,7 +2844,6 @@ See `edebug-behavior-alist' for implementations.") (goto-char edebug-buffer-outside-point)) ;; ... nothing more. ) - (edebug--overlay-breakpoints-remove (point-min) (point-max)) ;; Could be an option to keep eval display up. (if edebug-eval-buffer (kill-buffer edebug-eval-buffer)) (with-timeout-unsuspend edebug-with-timeout-suspend) @@ -3274,8 +3273,7 @@ With prefix argument, make it a temporary breakpoint." (unless breakpoint (user-error "No breakpoint near point")) (setf (nth 4 breakpoint) - (not (nth 4 breakpoint))) - (edebug--overlay-breakpoints name)))) + (not (nth 4 breakpoint)))))) (defun edebug-set-global-break-condition (expression) "Set `edebug-global-break-condition' to EXPRESSION." commit 4b419083f92dc4b4313ae0d9991b825331c2f651 Author: Dmitry Gutov Date: Mon May 4 02:56:10 2020 +0300 Honor search-upper-case * lisp/fileloop.el (fileloop--case-fold): Extract from existing code. Honor search-upper-case (bug#40940). (fileloop-initialize-replace, fileloop-initialize-search): Use it. Update the docstring. diff --git a/lisp/fileloop.el b/lisp/fileloop.el index 543963feaf..833bb0401c 100644 --- a/lisp/fileloop.el +++ b/lisp/fileloop.el @@ -181,8 +181,7 @@ operating on the next file and nil otherwise." (fileloop-initialize files (lambda () - (let ((case-fold-search - (if (memq case-fold '(t nil)) case-fold case-fold-search))) + (let ((case-fold-search (fileloop--case-fold regexp case-fold))) (re-search-forward regexp nil t))) (lambda () (unless (eq last-buffer (current-buffer)) @@ -190,28 +189,42 @@ operating on the next file and nil otherwise." (message "Scanning file %s...found" buffer-file-name)) nil)))) +(defun fileloop--case-fold (regexp case-fold) + (let ((value + (if (memql case-fold '(nil t)) + case-fold + case-fold-search))) + (if (and value search-upper-case) + (isearch-no-upper-case-p regexp t) + value))) + ;;;###autoload (defun fileloop-initialize-replace (from to files case-fold &optional delimited) "Initialize a new round of query&replace on several files. -FROM is a regexp and TO is the replacement to use. -FILES describes the file, as in `fileloop-initialize'. -CASE-FOLD can be t, nil, or `default', the latter one meaning to obey -the default setting of `case-fold-search'. -DELIMITED if non-nil means replace only word-delimited matches." + FROM is a regexp and TO is the replacement to use. + FILES describes the files, as in `fileloop-initialize'. + CASE-FOLD can be t, nil, or `default': + if it is nil, matching of FROM is case-sensitive. + if it is t, matching of FROM is case-insensitive, except + when `search-upper-case' is non-nil and FROM includes + upper-case letters. + if it is `default', the function uses the value of + `case-fold-search' instead. + DELIMITED if non-nil means replace only word-delimited matches." ;; FIXME: Not sure how the delimited-flag interacts with the regexp-flag in ;; `perform-replace', so I just try to mimic the old code. (fileloop-initialize files (lambda () - (let ((case-fold-search - (if (memql case-fold '(nil t)) case-fold case-fold-search))) + (let ((case-fold-search (fileloop--case-fold from case-fold))) (if (re-search-forward from nil t) ;; When we find a match, move back ;; to the beginning of it so perform-replace ;; will see it. (goto-char (match-beginning 0))))) (lambda () - (perform-replace from to t t delimited nil multi-query-replace-map)))) + (let ((case-fold-search (fileloop--case-fold from case-fold))) + (perform-replace from to t t delimited nil multi-query-replace-map))))) (provide 'fileloop) ;;; fileloop.el ends here commit 310112fdc7448a9297085333fcd4bf4088e634bf Author: Basil L. Contovounesios Date: Wed Apr 22 11:42:17 2020 +0100 Fix eww-follow-link on URLs with #target * lisp/net/eww.el (eww-display-html): Ensure shr-target-id is set as callers depend on this (bug#28441, bug#40532). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 811d7c6920..568b96f4d5 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -518,6 +518,10 @@ Currently this means either text/html or application/xhtml+xml." (plist-put eww-data :dom document) (let ((inhibit-read-only t) (inhibit-modification-hooks t) + ;; Possibly set by the caller, e.g., `eww-render' which + ;; preserves the old URL #target before chasing redirects. + (shr-target-id (or shr-target-id + (url-target (url-generic-parse-url url)))) (shr-external-rendering-functions (append shr-external-rendering-functions commit f5cb5bb8281ee17b013a3b9187e92fda4b1047a9 Author: Juri Linkov Date: Mon May 4 01:31:44 2020 +0300 Revert part of recent commit 85544f8ef5 (bug#40808) * lisp/isearch.el (isearch-lazy-highlight-search): Remove recent fix of lazy-highlighting of hidden matches. In emacs-27 leave only the fix for lazy-counting of hidden matches when isearch-lazy-count is non-nil. ; Do not merge to master. diff --git a/lisp/isearch.el b/lisp/isearch.el index 1a414830ee..57b13a38d6 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -3866,10 +3866,9 @@ Attempt to do the search exactly the way the pending Isearch would." (isearch-regexp-lax-whitespace isearch-lazy-highlight-regexp-lax-whitespace) (isearch-forward isearch-lazy-highlight-forward) - ;; Don't match invisible text unless it can be opened - ;; or when counting matches and user can visit hidden matches - (search-invisible (or (eq search-invisible 'open) - (and isearch-lazy-count search-invisible))) + ;; Match invisible text only when counting matches + ;; and user can visit invisible matches + (search-invisible (and isearch-lazy-count search-invisible t)) (retry t) (success nil)) ;; Use a loop like in `isearch-search'. commit f9fa726cede2d90501e5b8f0d93bfa4ce134868d Author: Stefan Kangas Date: Sun May 3 22:00:02 2020 +0200 Improve doc strings of makunbound and fmakunbound * src/data.c (Fmakunbound, Ffmakunbound): Improve doc strings. (Bug#41026) diff --git a/src/data.c b/src/data.c index 5ce5e360ab..0f3ac8c657 100644 --- a/src/data.c +++ b/src/data.c @@ -701,8 +701,14 @@ DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, } DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0, - doc: /* Make SYMBOL's value be void. -Return SYMBOL. */) + doc: /* Empty out the value cell of SYMBOL, making it void as a variable. +Return SYMBOL. + +If a variable is void, trying to evaluate the variable signals a +`void-variable' error, instead of returning a value. For more +details, see Info node `(elisp) Void Variables'. + +See also `fmakunbound'. */) (register Lisp_Object symbol) { CHECK_SYMBOL (symbol); @@ -713,8 +719,14 @@ Return SYMBOL. */) } DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, - doc: /* Make SYMBOL's function definition be nil. -Return SYMBOL. */) + doc: /* Make SYMBOL's function definition be void. +Return SYMBOL. + +If a function definition is void, trying to call a function by that +name will cause a `void-function' error. For more details, see Info +node `(elisp) Function Cells'. + +See also `makunbound'. */) (register Lisp_Object symbol) { CHECK_SYMBOL (symbol);