commit a566e409d0d962d3c2870691175836da22c31111 (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Wed Aug 19 20:53:29 2020 +0100 ; NEWS fix diff --git a/etc/NEWS b/etc/NEWS index 77f3ff5651..bbd34a5d6f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -465,7 +465,7 @@ key binding / / package-menu-filter-clear --- -+++ Column widths in 'list-packages' display can now be customized. +*** Column widths in 'list-packages' display can now be customized. See the new user options 'package-name-column-width', 'package-version-column-width', 'package-status-column-width', and 'package-archive-column-width'. commit 6e3bc3c68466c470e1b33c56d9571823fc2b9367 Author: Stefan Kangas Date: Wed Aug 19 20:31:29 2020 +0200 Fix minor issues after recent world-clock rename * lisp/time.el (world-clock-mode): Set 'revert-buffer-function' buffer-locally rather than globally. (display-time-world): Unobsolete alias for 'world-clock'. Some users might be used to the old name. diff --git a/lisp/time.el b/lisp/time.el index 96b49ddabd..1ab992adb4 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -421,8 +421,6 @@ runs the normal hook `display-time-hook' after each update." #'world-clock-mode "28.1") (define-obsolete-function-alias 'display-time-world-display #'world-clock-display "28.1") -(define-obsolete-function-alias 'display-time-world - #'world-clock "28.1") (define-obsolete-function-alias 'display-time-world-timer #'world-clock-update "28.1") @@ -522,7 +520,7 @@ If the value is t instead of an alist, use the value of (define-derived-mode world-clock-mode special-mode "World clock" "Major mode for buffer that displays times in various time zones. See `world-clock'." - (setq revert-buffer-function #'world-clock-update) + (setq-local revert-buffer-function #'world-clock-update) (setq show-trailing-whitespace nil)) (defun world-clock-display (alist) @@ -551,6 +549,10 @@ See `world-clock'." (delete-char -1)) (goto-char (point-min))) +;; Old name -- preserved for backwards compatibility. +;;;###autoload +(defalias 'display-time-world #'world-clock) + ;;;###autoload (defun world-clock () "Display a world clock buffer with times in various time zones. commit 8c6765b37a111148675ea8ff8cbc57bde2a8d8ee Author: Eli Zaretskii Date: Wed Aug 19 20:47:21 2020 +0300 ; * etc/NEWS: Fix a recently added entry. diff --git a/etc/NEWS b/etc/NEWS index 34d078b485..77f3ff5651 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -260,9 +260,10 @@ invoke 'C-u C-x v s' ('vc-create-tag'). *** 'vc-hg' now uses 'hg summary' to populate extra 'vc-dir' headers. --- -*** New variable 'vc-git-revision-complete-only-branches' +*** New variable 'vc-git-revision-complete-only-branches'. If non-nil, only branches and remotes are considered when doing -completion over branch names. +completion over Git branch names. The default is nil, which causes +tags to be considered as well. ** Gnus commit f8d3d18168a742691d095a3f0c83512f19621725 Author: Basil L. Contovounesios Date: Wed Aug 19 14:43:11 2020 +0100 ; Minor simplification of two recent changes diff --git a/lisp/simple.el b/lisp/simple.el index 5f1338abb0..f08015372a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1852,7 +1852,7 @@ to get different commands to edit and resubmit." (and (commandp (function-called-at-point)) (format "%S" (function-called-at-point))))) (all (sort (minibuffer-default-add-completions) - (lambda (a b) (string< a b))))) + #'string<))) (if def (cons def (delete def all)) all))))) diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index f62427305a..834e3b6d91 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -479,8 +479,7 @@ Subtests signal errors if something goes wrong." (ert-deftest bytecomp-tests--warnings () (with-current-buffer (get-buffer-create "*Compile-Log*") (let ((inhibit-read-only t)) (erase-buffer))) - (dolist (f '(my-test0 my--test11 my--test12 my--test2)) - (fset f nil)) + (mapc #'fmakunbound '(my-test0 my--test11 my--test12 my--test2)) (test-byte-comp-compile-and-load t '(progn (defun my-test0 () commit 90e65c826fab2092ad2099d7763538194c93e021 Author: Noah Friedman Date: Wed Aug 19 15:59:59 2020 +0200 Make shell-resync-dirs handle whitespace in directory names * lisp/shell.el (shell-resync-dirs): Correctly handle whitespace in directory names (bug#23324). diff --git a/lisp/shell.el b/lisp/shell.el index 301a8cb083..9667dab2af 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -1035,25 +1035,41 @@ command again." (accept-process-output proc) (goto-char pt))) (goto-char pmark) (delete-char 1) ; remove the extra newline - ;; That's the dirlist. grab it & parse it. - (let* ((dl (buffer-substring (match-beginning 2) (1- (match-end 2)))) - (dl-len (length dl)) - (ds '()) ; new dir stack - (i 0)) - (while (< i dl-len) - ;; regexp = optional whitespace, (non-whitespace), optional whitespace - (string-match "\\s *\\(\\S +\\)\\s *" dl i) ; pick off next dir - (setq ds (cons (concat comint-file-name-prefix - (substring dl (match-beginning 1) - (match-end 1))) - ds)) - (setq i (match-end 0))) - (let ((ds (nreverse ds))) - (with-demoted-errors "Couldn't cd: %s" - (shell-cd (car ds)) - (setq shell-dirstack (cdr ds) - shell-last-dir (car shell-dirstack)) - (shell-dirstack-message))))) + ;; That's the dirlist. Grab it & parse it. + (let* ((dls (buffer-substring-no-properties + (match-beginning 0) (1- (match-end 0)))) + (dlsl nil) + (pos 0) + (ds nil)) + ;; Split the dirlist into whitespace and non-whitespace chunks. + ;; dlsl will be a reversed list of tokens. + (while (string-match "\\(\\S-+\\|\\s-+\\)" dls pos) + (push (match-string 1 dls) dlsl) + (setq pos (match-end 1))) + + ;; Prepend trailing entries until they form an existing directory, + ;; whitespace and all. Discard the next whitespace and repeat. + (while dlsl + (let ((newelt "") + tem1 tem2) + (while newelt + ;; We need tem1 because we don't want to prepend + ;; `comint-file-name-prefix' repeatedly into newelt via tem2. + (setq tem1 (pop dlsl) + tem2 (concat comint-file-name-prefix tem1 newelt)) + (cond ((file-directory-p tem2) + (push tem2 ds) + (when (string= " " (car dlsl)) + (pop dlsl)) + (setq newelt nil)) + (t + (setq newelt (concat tem1 newelt))))))) + + (with-demoted-errors "Couldn't cd: %s" + (shell-cd (car ds)) + (setq shell-dirstack (cdr ds) + shell-last-dir (car shell-dirstack)) + (shell-dirstack-message)))) (if started-at-pmark (goto-char (marker-position pmark))))) ;; For your typing convenience: commit 33a72465b53fd1dc71856ea4ad3376a05da35c73 Author: Juri Linkov Date: Wed Aug 19 15:52:08 2020 +0200 Allow searching interactively over completions in `M-x' * lisp/simple.el (read-extended-command): Allow doing interactive searches over the completions (bug#12490). This restores the behaviour from Emacs 23 that was lost in Emacs 24. diff --git a/etc/NEWS b/etc/NEWS index a1255a6f42..34d078b485 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -819,6 +819,12 @@ window after starting). This variable defaults to nil. ** Miscellaneous +--- +*** 'C-s' in 'M-x' now searches over completions again. +In Emacs 23, typing 'M-x' ('read-extended-command') and then 'C-s' (to +do an interactive search) would search over possible completions. +This was lost in Emacs 24, but is now back again. + --- *** 'M-x report-emacs-bug' will no longer include "Recent messages" section. These were taken from the "*Messages*" buffer, and may inadvertently diff --git a/lisp/simple.el b/lisp/simple.el index 755d700cd4..5f1338abb0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1847,9 +1847,15 @@ to get different commands to edit and resubmit." (lambda () ;; Get a command name at point in the original buffer ;; to propose it after M-n. - (with-current-buffer (window-buffer (minibuffer-selected-window)) - (and (commandp (function-called-at-point)) - (format "%S" (function-called-at-point))))))) + (let ((def (with-current-buffer + (window-buffer (minibuffer-selected-window)) + (and (commandp (function-called-at-point)) + (format "%S" (function-called-at-point))))) + (all (sort (minibuffer-default-add-completions) + (lambda (a b) (string< a b))))) + (if def + (cons def (delete def all)) + all))))) ;; Read a string, completing from and restricting to the set of ;; all defined commands. Don't provide any initial input. ;; Save the command read on the extended-command history list. commit bdc5d38c7cdff3e5a66ca6369f1027d550afc7a7 Author: Grégoire Jadi Date: Wed Aug 19 15:36:08 2020 +0200 Ensure `bibtex-set-dialect' is executed in bibtex buffers * lisp/textmodes/bibtex.el (bibtex-mode): Call `bibtex-set-dialect'. * test/automated/bibtex-tests.el: Add regression tests (bug#21764). diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 0018b89d85..910bd7dbb9 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -3445,6 +3445,7 @@ if that value is non-nil. (set (make-local-variable 'syntax-propertize-function) (syntax-propertize-via-font-lock bibtex-font-lock-syntactic-keywords)) + (bibtex-set-dialect nil t) ;; Allow `bibtex-dialect' as a file-local variable. (add-hook 'hack-local-variables-hook #'bibtex-set-dialect nil t)) diff --git a/test/lisp/textmodes/bibtex-tests.el b/test/lisp/textmodes/bibtex-tests.el new file mode 100644 index 0000000000..b3858de9e6 --- /dev/null +++ b/test/lisp/textmodes/bibtex-tests.el @@ -0,0 +1,57 @@ +;;; bibtex-tests.el --- Test suite for bibtex. + +;; Copyright (C) 2013-2020 Free Software Foundation, Inc. + +;; Keywords: bibtex + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'ert) +(require 'bibtex) + +(ert-deftest bibtex-test-set-dialect () + "Tests if `bibtex-set-dialect' is executed." + (with-temp-buffer + (insert "@article{someID, + author = {some author}, + title = {some title}, +}") + (bibtex-mode) + (should-not (null bibtex-dialect)) + (should-not (null bibtex-entry-type)) + (should-not (null bibtex-entry-head)) + (should-not (null bibtex-reference-key)) + (should-not (null bibtex-entry-head)) + (should-not (null bibtex-entry-maybe-empty-head)) + (should-not (null bibtex-any-valid-entry-type)))) + +(ert-deftest bibtex-test-parse-buffers-stealthily () + "Tests if `bibtex-parse-buffers-stealthily' can be executed." + (with-temp-buffer + (insert "@article{someID, + author = {some author}, + title = {some title}, +}") + (bibtex-mode) + (should (progn (bibtex-parse-buffers-stealthily) t)))) + +(provide 'bibtex-tests) + +;;; bibtex-tests.el ends here commit 3d0e0d9e77ac59725cffe89fdef9388bde39888c Author: Robert Weiner Date: Wed Aug 19 15:28:32 2020 +0200 Make etags-list-tags work with Exuberant ctags * lisp/progmodes/etags.el (etags-list-tags): Make the function work with Exuberant ctags (bug#23400). diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index edadbbdafc..2c5c36504a 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1424,6 +1424,10 @@ hits the start of file." (goto-func goto-tag-location-function) tag tag-info pt) (forward-line 1) + ;; Exuberant ctags add a line starting with the DEL character; + ;; skip past it. + (when (looking-at "\177") + (forward-line 1)) (while (not (or (eobp) (looking-at "\f"))) ;; We used to use explicit tags when available, but the current goto-func ;; can only handle implicit tags. commit dd6fa00fa3108ffd9d9848310a51575aae85e25d Author: Anders Lindgren Date: Wed Aug 19 14:19:12 2020 +0200 Fix #'(lambda ...) font locking * lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Fontize #'(lambda ...) better (bug#23465). diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index d0c28ec5dc..584ed8c6f9 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -200,7 +200,9 @@ (save-excursion (ignore-errors (goto-char pos) - (or (eql (char-before) ?\') + ;; '(lambda ..) is not a funcall position, but #'(lambda ...) is. + (or (and (eql (char-before) ?\') + (not (eql (char-before (1- (point))) ?#))) (let* ((ppss (syntax-ppss)) (paren-posns (nth 9 ppss)) (parent commit a7291a9fb979e117c3286d3cfa6d0d15557edace Author: Doug Gilmore Date: Wed Aug 19 14:04:46 2020 +0200 Fix a segfault in daemon mode Emacs when detaching an X session * src/xterm.c (x_uncatch_errors): Add a sanity check for x_error_message (bug#23939). diff --git a/src/xterm.c b/src/xterm.c index 2a99c46927..2e0407aff4 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9921,6 +9921,13 @@ x_uncatch_errors (void) { struct x_error_message_stack *tmp; + /* In rare situations when running Emacs run in daemon mode, + shutting down an emacsclient via delete-frame can cause + x_uncatch_errors to be called when x_error_message is set to + NULL. */ + if (x_error_message == NULL) + return; + block_input (); /* The display may have been closed before this function is called. commit 1aacdf5aab09c7d0f7de648e55df7305ac1b87eb Author: Mattias Engdegård Date: Wed Aug 19 13:42:31 2020 +0200 Distinguish errors in bytecomp-tests * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-check-1) (test-byte-opt-arithmetic, bytecomp-lexbind-check-1) (bytecomp-lexbind-explain-1): When comparing interpreted with compiled results, don't consider all errors to be equal; take the error type into account. (The error arguments may differ, but there may be good reasons for that.) diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 27acdffa53..f62427305a 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -365,24 +365,24 @@ bytecompiled code, and their results compared.") (defun bytecomp-check-1 (pat) "Return non-nil if PAT is the same whether directly evalled or compiled." (let ((warning-minimum-log-level :emergency) - (byte-compile-warnings nil) - (v0 (condition-case nil + (byte-compile-warnings nil) + (v0 (condition-case err (eval pat) - (error 'bytecomp-check-error))) - (v1 (condition-case nil + (error (list 'bytecomp-check-error (car err))))) + (v1 (condition-case err (funcall (byte-compile (list 'lambda nil pat))) - (error 'bytecomp-check-error)))) + (error (list 'bytecomp-check-error (car err)))))) (equal v0 v1))) (put 'bytecomp-check-1 'ert-explainer 'bytecomp-explain-1) (defun bytecomp-explain-1 (pat) - (let ((v0 (condition-case nil + (let ((v0 (condition-case err (eval pat) - (error 'bytecomp-check-error))) - (v1 (condition-case nil + (error (list 'bytecomp-check-error (car err))))) + (v1 (condition-case err (funcall (byte-compile (list 'lambda nil pat))) - (error 'bytecomp-check-error)))) + (error (list 'bytecomp-check-error (car err)))))) (format "Expression `%s' gives `%s' if directly evalled, `%s' if compiled." pat v0 v1))) @@ -405,12 +405,12 @@ Subtests signal errors if something goes wrong." (print-quoted t) v0 v1) (dolist (pat byte-opt-testsuite-arith-data) - (condition-case nil + (condition-case err (setq v0 (eval pat)) - (error (setq v0 'bytecomp-check-error))) - (condition-case nil + (error (setq v0 (list 'bytecomp-check-error (car err))))) + (condition-case err (setq v1 (funcall (byte-compile (list 'lambda nil pat)))) - (error (setq v1 'bytecomp-check-error))) + (error (setq v1 (list 'bytecomp-check-error (car err))))) (insert (format "%s" pat)) (indent-to-column 65) (if (equal v0 v1) @@ -566,25 +566,25 @@ bytecompiled code, and their results compared.") "Return non-nil if PAT is the same whether directly evalled or compiled." (let ((warning-minimum-log-level :emergency) (byte-compile-warnings nil) - (v0 (condition-case nil + (v0 (condition-case err (eval pat t) - (error 'bytecomp-check-error))) - (v1 (condition-case nil + (error (list 'bytecomp-check-error (car err))))) + (v1 (condition-case err (funcall (let ((lexical-binding t)) (byte-compile `(lambda nil ,pat)))) - (error 'bytecomp-check-error)))) + (error (list 'bytecomp-check-error (car err)))))) (equal v0 v1))) (put 'bytecomp-lexbind-check-1 'ert-explainer 'bytecomp-lexbind-explain-1) (defun bytecomp-lexbind-explain-1 (pat) - (let ((v0 (condition-case nil + (let ((v0 (condition-case err (eval pat t) - (error 'bytecomp-check-error))) - (v1 (condition-case nil + (error (list 'bytecomp-check-error (car err))))) + (v1 (condition-case err (funcall (let ((lexical-binding t)) (byte-compile (list 'lambda nil pat)))) - (error 'bytecomp-check-error)))) + (error (list 'bytecomp-check-error (car err)))))) (format "Expression `%s' gives `%s' if directly evalled, `%s' if compiled." pat v0 v1))) commit a8fc4f7dcae84757b61a2189faad7659e875e42f Author: Mattias Engdegård Date: Wed Aug 19 13:39:18 2020 +0200 Make bytecomp-tests re-runnable * test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-macro-expand-lexical-override): Remove functions before testing so that the test can be run twice without failing. diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 894914300a..27acdffa53 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -479,6 +479,8 @@ Subtests signal errors if something goes wrong." (ert-deftest bytecomp-tests--warnings () (with-current-buffer (get-buffer-create "*Compile-Log*") (let ((inhibit-read-only t)) (erase-buffer))) + (dolist (f '(my-test0 my--test11 my--test12 my--test2)) + (fset f nil)) (test-byte-comp-compile-and-load t '(progn (defun my-test0 () commit 6a61d5edd029f214384d3de95aee49fe43c83559 Author: Tino Calancha Date: Wed Aug 19 13:52:21 2020 +0200 Make thingatpt recognise files names with @ in them * lisp/thingatpt.el (thing-at-point-file-name-chars): Add @ (Bug#24606). diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 483a2c9bd8..3c2d766ffb 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -258,7 +258,7 @@ E.g.: ;; Filenames -(defvar thing-at-point-file-name-chars "-~/[:alnum:]_.${}#%,:" +(defvar thing-at-point-file-name-chars "-@~/[:alnum:]_.${}#%,:" "Characters allowable in filenames.") (define-thing-chars filename thing-at-point-file-name-chars) commit bd3e2e848712bf4197000e02d832947b1f7928b6 Author: Basil L. Contovounesios Date: Wed Aug 19 12:37:03 2020 +0100 ; Fix last change to comint.el * lisp/comint.el (comint-highlight-input): Add :version tag. (comint-send-input): Fix indentation. diff --git a/lisp/comint.el b/lisp/comint.el index 4094969ae8..092902d865 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -226,6 +226,7 @@ This variable is buffer-local." (defcustom comint-highlight-input t "If non-nil, highlight input with `comint-highlight-input' face. Otherwise keep the original highlighting untouched." + :version "28.1" :type 'boolean :group 'comint) @@ -1904,9 +1905,9 @@ Similarly for Soar, Scheme, etc." (with-silent-modifications (when (> end beg) (when comint-highlight-input - (add-text-properties beg end - '(front-sticky t - font-lock-face comint-highlight-input))) + (add-text-properties beg end + '( font-lock-face comint-highlight-input + front-sticky t ))) (unless comint-use-prompt-regexp ;; Give old user input a field property of `input', to ;; distinguish it from both process output and unsent commit ed96a2121de61390d7acce6f2f03521b47b7d978 Author: Tom Tromey Date: Wed Aug 19 13:38:44 2020 +0200 Add a variable to control VC completion over branch names * lisp/vc/vc-git.el (vc-git-revision-complete-only-branches): New variable (bug#25710). (vc-git-revision-table): Use it. diff --git a/etc/NEWS b/etc/NEWS index 14101b41d9..a1255a6f42 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -259,6 +259,10 @@ invoke 'C-u C-x v s' ('vc-create-tag'). --- *** 'vc-hg' now uses 'hg summary' to populate extra 'vc-dir' headers. +--- +*** New variable 'vc-git-revision-complete-only-branches' +If non-nil, only branches and remotes are considered when doing +completion over branch names. ** Gnus diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 78a2fa0879..84aeb0a110 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -210,6 +210,16 @@ toggle display of the entire list." widget)))) :version "27.1") +(defcustom vc-git-revision-complete-only-branches nil + "Control whether tags are returned by revision completion for Git. + +When non-nil, only branches and remotes will be returned by +`vc-git-revision-completion-table'. This is used by various VC +commands when completing branch names. When nil, tags are also +included in the completions." + :type 'boolean + :version "28.1") + ;; History of Git commands. (defvar vc-git-history nil) @@ -1415,9 +1425,11 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (with-temp-buffer (vc-git-command t nil nil "for-each-ref" "--format=%(refname)") (goto-char (point-min)) - (while (re-search-forward "^refs/\\(heads\\|tags\\|remotes\\)/\\(.*\\)$" - nil t) - (push (match-string 2) table))) + (let ((regexp (if vc-git-revision-complete-only-branches + "^refs/\\(heads\\|remotes\\)/\\(.*\\)$" + "^refs/\\(heads\\|tags\\|remotes\\)/\\(.*\\)$"))) + (while (re-search-forward regexp nil t) + (push (match-string 2) table)))) table)) (defun vc-git-revision-completion-table (files) commit 3b8dfc46ce95ae657b4c33af12ad46827f29084d Author: Michael Albinus Date: Wed Aug 19 13:19:19 2020 +0200 Better check for multi-hops when calling direct async processes * lisp/net/tramp-sh.el (tramp-multi-hop-p, tramp-compute-multi-hops): Move them from here ... * lisp/net/tramp.el (tramp-multi-hop-p, tramp-compute-multi-hops): ... here. (tramp-direct-async-process-p): Use `tramp-compute-multi-hops'. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index ca43475f45..fae15fe6a8 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4781,104 +4781,6 @@ Goes through the list `tramp-inline-compress-commands'." (tramp-message vec 2 "Couldn't find an inline transfer compress command"))))) -;;;###tramp-autoload -(defun tramp-multi-hop-p (vec) - "Whether the method of VEC is capable of multi-hops." - (and (tramp-sh-file-name-handler-p vec) - (not (tramp-get-method-parameter vec 'tramp-copy-program)))) - -(defun tramp-compute-multi-hops (vec) - "Expands VEC according to `tramp-default-proxies-alist'." - (let ((saved-tdpa tramp-default-proxies-alist) - (target-alist `(,vec)) - (hops (or (tramp-file-name-hop vec) "")) - (item vec) - choices proxy) - - ;; Ad-hoc proxy definitions. - (dolist (proxy (reverse (split-string hops tramp-postfix-hop-regexp 'omit))) - (let* ((host-port (tramp-file-name-host-port item)) - (user-domain (tramp-file-name-user-domain item)) - (proxy (concat - tramp-prefix-format proxy tramp-postfix-host-format)) - (entry - (list (and (stringp host-port) - (concat "^" (regexp-quote host-port) "$")) - (and (stringp user-domain) - (concat "^" (regexp-quote user-domain) "$")) - (propertize proxy 'tramp-ad-hoc t)))) - (tramp-message vec 5 "Add %S to `tramp-default-proxies-alist'" entry) - ;; Add the hop. - (add-to-list 'tramp-default-proxies-alist entry) - (setq item (tramp-dissect-file-name proxy)))) - ;; Save the new value. - (when (and hops tramp-save-ad-hoc-proxies) - (customize-save-variable - 'tramp-default-proxies-alist tramp-default-proxies-alist)) - - ;; Look for proxy hosts to be passed. - (setq choices tramp-default-proxies-alist) - (while choices - (setq item (pop choices) - proxy (eval (nth 2 item))) - (when (and - ;; Host. - (string-match-p - (or (eval (nth 0 item)) "") - (or (tramp-file-name-host-port (car target-alist)) "")) - ;; User. - (string-match-p - (or (eval (nth 1 item)) "") - (or (tramp-file-name-user-domain (car target-alist)) ""))) - (if (null proxy) - ;; No more hops needed. - (setq choices nil) - ;; Replace placeholders. - (setq proxy - (format-spec - proxy - (format-spec-make - ?u (or (tramp-file-name-user (car target-alist)) "") - ?h (or (tramp-file-name-host (car target-alist)) "")))) - (with-parsed-tramp-file-name proxy l - ;; Add the hop. - (push l target-alist) - ;; Start next search. - (setq choices tramp-default-proxies-alist))))) - - ;; Foreign and out-of-band methods are not supported for multi-hops. - (when (cdr target-alist) - (setq choices target-alist) - (while (setq item (pop choices)) - (unless (tramp-multi-hop-p item) - (setq tramp-default-proxies-alist saved-tdpa) - (tramp-user-error - vec "Method `%s' is not supported for multi-hops." - (tramp-file-name-method item))))) - - ;; Some methods ("su", "sg", "sudo", "doas", "ksu") do not use the - ;; host name in their command template. In this case, the remote - ;; file name must use either a local host name (first hop), or a - ;; host name matching the previous hop. - (let ((previous-host (or tramp-local-host-regexp ""))) - (setq choices target-alist) - (while (setq item (pop choices)) - (let ((host (tramp-file-name-host item))) - (unless - (or - ;; The host name is used for the remote shell command. - (member - '("%h") (tramp-get-method-parameter item 'tramp-login-args)) - ;; The host name must match previous hop. - (string-match-p previous-host host)) - (setq tramp-default-proxies-alist saved-tdpa) - (tramp-user-error - vec "Host name `%s' does not match `%s'" host previous-host)) - (setq previous-host (concat "^" (regexp-quote host) "$"))))) - - ;; Result. - target-alist)) - (defun tramp-ssh-controlmaster-options (vec) "Return the Control* arguments of the local ssh." (cond diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index ab52bec39e..83ade66ee1 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3634,12 +3634,109 @@ User is always nil." (delete-file local-copy))))) t))) +(defun tramp-multi-hop-p (vec) + "Whether the method of VEC is capable of multi-hops." + (and (tramp-sh-file-name-handler-p vec) + (not (tramp-get-method-parameter vec 'tramp-copy-program)))) + +(defun tramp-compute-multi-hops (vec) + "Expands VEC according to `tramp-default-proxies-alist'." + (let ((saved-tdpa tramp-default-proxies-alist) + (target-alist `(,vec)) + (hops (or (tramp-file-name-hop vec) "")) + (item vec) + choices proxy) + + ;; Ad-hoc proxy definitions. + (dolist (proxy (reverse (split-string hops tramp-postfix-hop-regexp 'omit))) + (let* ((host-port (tramp-file-name-host-port item)) + (user-domain (tramp-file-name-user-domain item)) + (proxy (concat + tramp-prefix-format proxy tramp-postfix-host-format)) + (entry + (list (and (stringp host-port) + (concat "^" (regexp-quote host-port) "$")) + (and (stringp user-domain) + (concat "^" (regexp-quote user-domain) "$")) + (propertize proxy 'tramp-ad-hoc t)))) + (tramp-message vec 5 "Add %S to `tramp-default-proxies-alist'" entry) + ;; Add the hop. + (add-to-list 'tramp-default-proxies-alist entry) + (setq item (tramp-dissect-file-name proxy)))) + ;; Save the new value. + (when (and hops tramp-save-ad-hoc-proxies) + (customize-save-variable + 'tramp-default-proxies-alist tramp-default-proxies-alist)) + + ;; Look for proxy hosts to be passed. + (setq choices tramp-default-proxies-alist) + (while choices + (setq item (pop choices) + proxy (eval (nth 2 item))) + (when (and + ;; Host. + (string-match-p + (or (eval (nth 0 item)) "") + (or (tramp-file-name-host-port (car target-alist)) "")) + ;; User. + (string-match-p + (or (eval (nth 1 item)) "") + (or (tramp-file-name-user-domain (car target-alist)) ""))) + (if (null proxy) + ;; No more hops needed. + (setq choices nil) + ;; Replace placeholders. + (setq proxy + (format-spec + proxy + (format-spec-make + ?u (or (tramp-file-name-user (car target-alist)) "") + ?h (or (tramp-file-name-host (car target-alist)) "")))) + (with-parsed-tramp-file-name proxy l + ;; Add the hop. + (push l target-alist) + ;; Start next search. + (setq choices tramp-default-proxies-alist))))) + + ;; Foreign and out-of-band methods are not supported for multi-hops. + (when (cdr target-alist) + (setq choices target-alist) + (while (setq item (pop choices)) + (unless (tramp-multi-hop-p item) + (setq tramp-default-proxies-alist saved-tdpa) + (tramp-user-error + vec "Method `%s' is not supported for multi-hops." + (tramp-file-name-method item))))) + + ;; Some methods ("su", "sg", "sudo", "doas", "ksu") do not use the + ;; host name in their command template. In this case, the remote + ;; file name must use either a local host name (first hop), or a + ;; host name matching the previous hop. + (let ((previous-host (or tramp-local-host-regexp ""))) + (setq choices target-alist) + (while (setq item (pop choices)) + (let ((host (tramp-file-name-host item))) + (unless + (or + ;; The host name is used for the remote shell command. + (member + '("%h") (tramp-get-method-parameter item 'tramp-login-args)) + ;; The host name must match previous hop. + (string-match-p previous-host host)) + (setq tramp-default-proxies-alist saved-tdpa) + (tramp-user-error + vec "Host name `%s' does not match `%s'" host previous-host)) + (setq previous-host (concat "^" (regexp-quote host) "$"))))) + + ;; Result. + target-alist)) + (defun tramp-direct-async-process-p (&rest args) "Whether direct async `make-process' can be called." (let ((v (tramp-dissect-file-name default-directory))) - (and (tramp-get-connection-property v"direct-async-process" nil) - (not (tramp-multi-hop-p v)) - (not (plist-get args :stderr))))) + (and (tramp-get-connection-property v "direct-async-process" nil) + (= (length (tramp-compute-multi-hops v)) 1) + (not (plist-get args :stderr))))) ;; We use BUFFER also as connection buffer during setup. Because of ;; this, its original contents must be saved, and restored once commit 18e6a0b5c0d47c5ee98b95f9312909e0f978da89 Merge: 10b997f8f5 c570a79a77 Author: Michael Albinus Date: Wed Aug 19 13:18:08 2020 +0200 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit c570a79a77add5482826b42912d3fe95edc9b146 Author: Carlos Pita Date: Wed Aug 19 13:13:46 2020 +0200 Don't override python font locking in comint * lisp/comint.el (comint-highlight-input): New variable (bug#32344). (comint-send-input): Use it. * lisp/progmodes/python.el (inferior-python-mode): Set it. diff --git a/lisp/comint.el b/lisp/comint.el index df4937a7d6..4094969ae8 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -223,6 +223,12 @@ This variable is buffer-local." (other :tag "on" t)) :group 'comint) +(defcustom comint-highlight-input t + "If non-nil, highlight input with `comint-highlight-input' face. +Otherwise keep the original highlighting untouched." + :type 'boolean + :group 'comint) + (defface comint-highlight-input '((t (:weight bold))) "Face to use to highlight user input." :group 'comint) @@ -1897,9 +1903,10 @@ Similarly for Soar, Scheme, etc." (end (if no-newline (point) (1- (point))))) (with-silent-modifications (when (> end beg) - (add-text-properties beg end - '(front-sticky t - font-lock-face comint-highlight-input)) + (when comint-highlight-input + (add-text-properties beg end + '(front-sticky t + font-lock-face comint-highlight-input))) (unless comint-use-prompt-regexp ;; Give old user input a field property of `input', to ;; distinguish it from both process output and unsent diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f8c18021ff..d83af83b32 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2791,6 +2791,7 @@ variable. python-shell-comint-watch-for-first-prompt-output-filter python-comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt)) + (setq-local comint-highlight-input nil) (set (make-local-variable 'compilation-error-regexp-alist) python-shell-compilation-regexp-alist) (add-hook 'completion-at-point-functions commit 10b997f8f5073187bf6b68ae26c3cc4781ac837a Author: Michael Albinus Date: Wed Aug 19 13:12:14 2020 +0200 ; * etc/NEWS: Fix typos. diff --git a/etc/NEWS b/etc/NEWS index 89fc12ab6d..14101b41d9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -199,7 +199,7 @@ and variables. displayed and which are kept hidden. --- -*** New command bound to 'C': 'archive-copy-file' +*** New command bound to 'C': 'archive-copy-file'. This command extracts the file under point and writes the data to a file. @@ -216,16 +216,16 @@ as a data list rather than as a piece of code. +++ *** New user option 'calendar-time-zone-style'. -If 'numeric, calendar functions (eg calendar-sunrise-sunset) that display +If 'numeric', calendar functions (eg 'calendar-sunrise-sunset') that display time zones will use a form like "+0100" instead of "CET". ** Dired +++ *** New user option 'dired-copy-dereference'. -If set, Dired will dereferences symbolic links when copying. This can -be switched off on a per-usage basis by providing 'dired-do-copy' with -a 'C-u' prefix. +If set to non-nil, Dired will dereference symbolic links when copying. +This can be switched off on a per-usage basis by providing +'dired-do-copy' with a 'C-u' prefix. *** New user option 'dired-mark-region' affects all Dired commands that mark files. When non-nil and the region is active in Transient @@ -300,23 +300,23 @@ To generate these headers, add the new function be generated according to the new 'message-openpgp-header' variable. --- -*** A change to how Mail-Copies-To: never is handled. -If a user has specified Mail-Copies-To: never, and Message was asked +*** A change to how "Mail-Copies-To: never" is handled. +If a user has specified "Mail-Copies-To: never", and Message was asked to do a "wide reply", some other arbitrary recipient would end up in -the resulting To header, while the remaining recipients would be put -in the Cc header. This is somewhat misleading, as it looks like +the resulting "To" header, while the remaining recipients would be put +in the "Cc" header. This is somewhat misleading, as it looks like you're responding to a specific person in particular. This has been -changed so that all the recipients are put in the To header in these +changed so that all the recipients are put in the "To" header in these instances. +++ *** New function to start Emacs in Message mode to send an email. Emacs can be defined as a handler for the "x-scheme-handler/mailto" MIME type with the following command: "emacs -f message-mailto %u". -An emacs-mail.desktop file has been included, suitable for installing -in desktop directories like /usr/share/applications. Clicking on a -mailto: link in other applications will then open Emacs with headers -filled out according to the link, e.g. +An "emacs-mail.desktop" file has been included, suitable for +installing in desktop directories like "/usr/share/applications". +Clicking on a 'mailto:' link in other applications will then open +Emacs with headers filled out according to the link, e.g. "mailto:larsi@gnus.org?subject=This+is+a+test". --- @@ -331,7 +331,7 @@ this user option. *** New command to take screenshots. In Message mode buffers, the 'C-c C-p' ('message-insert-screenshot') command has been added. It depends on using an external program to -take the actual screenshot, and defaults to ImageMagick "import". +take the actual screenshot, and defaults to "ImageMagick import". ** Help @@ -352,7 +352,7 @@ This file was a compatibility kludge which is no longer needed. --- ** Lisp mode now uses 'common-lisp-indent-function'. -To revert to the previous behaviour, +To revert to the previous behavior, '(setq lisp-indent-function 'lisp-indent-function)' from 'lisp-mode-hook'. ** Edebug @@ -498,7 +498,7 @@ Defaults to 'libravatar', with 'unicornify' and 'gravatar' as options. *** Regexp matching of messages is now case-sensitive by default. The variable 'compilation-error-case-fold-search' can be set for -case-insensitive matching of messages when the old behaviour is +case-insensitive matching of messages when the old behavior is required, but the recommended solution is to use a correctly matching regexp instead. @@ -530,10 +530,10 @@ This is used when invoking 'texi2dvi' from 'texinfo-tex-buffer'. --- *** New commands for moving in and between environments. -An "environment" is something that ends with @end. The commands are +An "environment" is something that ends with '@end'. The commands are 'C-c C-c C-f' (next end), 'C-c C-c C-b' (previous end), 'C-c C-c C-n' (next start) and 'C-c C-c C-p' (previous start), as well -as 'C-c .', which will alternate between the start end the end of the +as 'C-c .', which will alternate between the start and the end of the current environment. ** Rmail @@ -657,8 +657,8 @@ mode buffer. +++ *** New Emacs command line convenience function. The 'eww-browse' command has been added, which allows you to register -Emacs as a MIME handler for "text/x-uri", and will call eww on the -supplied URL. Usage example: emacs -f eww-browse https://gnu.org +Emacs as a MIME handler for "text/x-uri", and will call 'eww' on the +supplied URL. Usage example: "emacs -f eww-browse https://gnu.org". +++ *** 'eww-download-directory' will now use the XDG location, if defined. @@ -721,11 +721,11 @@ https://www.w3.org/TR/xml/#charsets). Now it rejects such strings. ** erc --- -*** The /ignore command will now ask for a timeout to stop ignoring the user. +*** The '/ignore' command will now ask for a timeout to stop ignoring the user. Allowed inputs are seconds or ISO8601-like periods like "1h" or "4h30m". --- -*** ERC now recognizes C-] for italic text. +*** ERC now recognizes 'C-]' for italic text. Italic text is displayed in the new 'erc-italic-face'. --- @@ -790,7 +790,7 @@ The recentf files are no longer backed up. ** Calc --- -*** The behaviour when doing forward-delete has been changed. +*** The behavior when doing forward-delete has been changed. Previously, using the 'C-d' command would delete the final number in the input field, no matter where point was. This has been changed to work more traditionally, with 'C-d' deleting the next character. @@ -807,7 +807,7 @@ user option to nil inhibits this behavior. --- *** New user option 'term-set-terminal-size' -If non-nil, the LINES and COLUMNS environment variables will be set +If non-nil, the 'LINES' and 'COLUMNS' environment variables will be set based on the current window size. In previous versions of Emacs, this was always done (and that could lead to odd displays when resizing the window after starting). This variable defaults to nil. @@ -844,13 +844,9 @@ horizontally and vertically, respectively. --- *** Change in meaning of 'icomplete-show-matches-on-no-input'. Previously, choosing a different completion with commands like 'C-.' -and then hitting RET would choose the default completion. Doing this +and then hitting 'RET' would choose the default completion. Doing this will now choose the completion under point instead. -*** The new library hierarchy.el has been added. -It's a library to create, query, navigate and display hierarchy -structures. - --- *** The width of the buffer-name column in 'list-buffers' is now dynamic. The width now depends of the width of the window, but will never be @@ -858,23 +854,23 @@ wider than the length of the longest buffer name, except that it will never be narrower than 19 characters. *** Bookmarks can now be targets for new tabs. -When the 'bookmark.el' library is loaded, a customize choice is added +When the bookmark.el library is loaded, a customize choice is added to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list. ** xwidget-webkit mode -*** New xwidget functions +*** New xwidget functions. 'xwidget-webkit-uri' (return the current URL), 'xwidget-webkit-title' (return the current title), and 'xwidget-webkit-goto-history' (goto a point in history). -*** Pixel-based scrolling +*** Pixel-based scrolling. The 'xwidget-webkit-scroll-up', 'xwidget-webkit-scroll-down' commands now supports scrolling arbitrary pixel values. It now treats the optional 2nd argument as the pixel values to scroll. -*** New commands for scrolling +*** New commands for scrolling. The new commands 'xwidget-webkit-scroll-up-line', 'xwidget-webkit-scroll-down-line', 'xwidget-webkit-scroll-forward', 'xwidget-webkit-scroll-backward' can be used to scroll webkit by the @@ -887,11 +883,11 @@ Otherwise, it will use 'xwidget-webkit-last-session'. ** Flyspell mode +++ -*** Corrections and actions menu can be optionally bound to mouse-3. +*** Corrections and actions menu can be optionally bound to 'mouse-3'. When Flyspell mode highlights a word as misspelled, you can click on it to display a menu of possible corrections and actions. You can now -easily bind this menu to down-mouse-3 (usually the right mouse button) -instead of mouse-2 (the default) by customizing the new option +easily bind this menu to 'down-mouse-3' (usually the right mouse button) +instead of 'mouse-2' (the default) by customizing the new user option 'flyspell-use-mouse-3-for-menu'. ** Time @@ -909,7 +905,7 @@ The following functions have been renamed: 'display-time-world-display' to 'world-clock-display' 'display-time-world-timer' to 'world-clock-update' -The following options have been renamed: +The following user options have been renamed: 'display-time-world-list' to 'world-clock-list' 'display-time-world-time-format' to 'world-clock-time-format' @@ -929,6 +925,10 @@ composed of Lisp symbolic expressions that do not form a computer program. The ".dir-locals.el" file is automatically set to use this mode, as are other data files produced by Emacs. +** hierarchy.el + +It's a library to create, query, navigate and display hierarchy structures. + * Incompatible Editing Changes in Emacs 28.1 @@ -991,7 +991,7 @@ have now been removed. --- ** Some libraries obsolete since Emacs 23 have been removed: -'ledit.el', 'lmenu.el', 'lucid.el and 'old-whitespace.el'. +ledit.el, lmenu.el, lucid.el and old-whitespace.el. --- ** Some functions and variables obsolete since Emacs 23 have been removed: @@ -1181,7 +1181,6 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . - Local variables: coding: utf-8 commit 9e586ac1d1b3bbabbd73a119698df742c0bfa523 Author: Lars Ingebrigtsen Date: Wed Aug 19 12:55:46 2020 +0200 Signal an end-of-file error upon errors when reading from stdin * src/minibuf.c (read_minibuf_noninteractive): Signal an `end-of-file' error when reading from stdin instead of a general error (bug#34123). This makes it easier to write code that recovers from this situation. Suggested by Noam Postavsky . diff --git a/src/minibuf.c b/src/minibuf.c index cb302c5a60..e18ff17abb 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -251,7 +251,7 @@ read_minibuf_noninteractive (Lisp_Object prompt, bool expflag, else { xfree (line); - error ("Error reading from stdin"); + xsignal1 (Qend_of_file, build_string ("Error reading from stdin")); } /* If Lisp form desired instead of string, parse it. */ commit dc90e62276da36af14305e0dbe1076e2d041ac4f Author: Noam Postavsky Date: Wed Aug 19 12:49:11 2020 +0200 Let ido-everywhere turn on ido-mode * lisp/ido.el (ido-everywhere): Turn on ido-mode, if it's not already on. Otherwise, having ido-everywhere enabled messes all file and buffer reading interactive commands (bug#34292). diff --git a/lisp/ido.el b/lisp/ido.el index ad7500c0a1..c83b700e65 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1523,8 +1523,10 @@ Removes badly formatted data and ignored directories." (remove-function read-file-name-function #'ido-read-file-name) (remove-function read-buffer-function #'ido-read-buffer) (when ido-everywhere - (add-function :override read-file-name-function #'ido-read-file-name) - (add-function :override read-buffer-function #'ido-read-buffer))) + (if (not ido-mode) + (ido-mode 'both) + (add-function :override read-file-name-function #'ido-read-file-name) + (add-function :override read-buffer-function #'ido-read-buffer)))) (defvar ido-minor-mode-map-entry nil) commit ba8cce26c83c195972a6952dd9546f7153bf93d3 Author: Lars Ingebrigtsen Date: Wed Aug 19 12:45:05 2020 +0200 Fix the [ command in speedbar mode * lisp/speedbar.el (speedbar-expand-line-descendants): Expand only the current line -- not all subsequent lines in the speedbar buffer (bug#35014). diff --git a/lisp/speedbar.el b/lisp/speedbar.el index e9c15b71ce..5b98eb36bb 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -3240,19 +3240,21 @@ With universal argument ARG, flush cached data." "Expand the line under the cursor and all descendants. Optional argument ARG indicates that any cache should be flushed." (interactive "P") - (speedbar-expand-line arg) - ;; Now, inside the area expanded here, expand all subnodes of - ;; the same descendant type. - (save-excursion - (speedbar-next 1) ;; Move into the list. - (let ((err nil)) - (while (not err) - (condition-case nil - (progn - (speedbar-expand-line-descendants arg) - (speedbar-restricted-next 1)) - (error (setq err t)))))) - ) + (save-restriction + (narrow-to-region (line-beginning-position) + (line-beginning-position 2)) + (speedbar-expand-line arg) + ;; Now, inside the area expanded here, expand all subnodes of + ;; the same descendant type. + (save-excursion + (speedbar-next 1) ;; Move into the list. + (let ((err nil)) + (while (not err) + (condition-case nil + (progn + (speedbar-expand-line-descendants arg) + (speedbar-restricted-next 1)) + (error (setq err t)))))))) (defun speedbar-contract-line-descendants () "Expand the line under the cursor and all descendants." commit b4e76ac077fabbdaad56223ff885ba4264c32534 Author: Sebastian Urban Date: Wed Aug 19 12:15:07 2020 +0200 Fix a page-break in the middle of a keystroke in basic.texi * doc/emacs/basic.texi (Inserting Text): Avoid having the C-x 8 ] keystroke broken over two pages in the PDF version (bug#35885). diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index abb385f53d..0b685fafe9 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -115,7 +115,7 @@ just like digits. Case is ignored. starting with @kbd{C-x 8}. For example, @kbd{C-x 8 [} inserts @t{‘} which is Unicode code-point U+2018 @sc{left single quotation mark}, sometimes called a left single ``curved quote'' or ``curly quote''. -Similarly, @kbd{C-x 8 ]}, @kbd{C-x 8 @{} and @kbd{C-x 8 @}} insert the +Similarly, @w{@kbd{C-x 8 ]}}, @kbd{C-x 8 @{} and @kbd{C-x 8 @}} insert the curved quotes @t{’}, @t{“} and @t{”}, respectively. Also, a working @key{Alt} key acts like @kbd{C-x 8} (unless followed by @key{RET}); e.g., @kbd{A-[} acts like @kbd{C-x 8 [} and inserts @t{‘}. To see commit 9c17df59a38b71166c8e4644ab525e791f7ff21c Author: Lars Ingebrigtsen Date: Wed Aug 19 11:37:26 2020 +0200 Remove some compat code from viper-cmd.el diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 9ae7523b43..dd7648c2b7 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -1564,7 +1564,7 @@ invokes the command before that, etc." ;; Hook used in viper-undo (defun viper-after-change-undo-hook (beg end _len) - (if (and (boundp 'undo-in-progress) undo-in-progress) + (if undo-in-progress (setq undo-beg-posn beg undo-end-posn (or end beg)) ;; some other hooks may be changing various text properties in commit c23fddbc3041f41bd050d569b4a051dd9b6735c8 Author: Lars Ingebrigtsen Date: Wed Aug 19 11:34:54 2020 +0200 Remove some compat code from ispell.el * lisp/textmodes/ispell.el (ispell): transient-mark-mode and mark-active are always bound, so remove the check. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index f5af392f94..b2ccbc8da2 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -3723,8 +3723,7 @@ looking for a dictionary, please see the distribution of the GNU ispell program, or do an Internet search; there are various dictionaries available on the net." (interactive) - (if (and (boundp 'transient-mark-mode) transient-mark-mode - (boundp 'mark-active) mark-active) + (if (and transient-mark-mode mark-active) (ispell-region (region-beginning) (region-end)) (ispell-buffer))) commit 87ded4c96d70dbe6841244a959e2969f8b1e2ec4 Author: Lars Ingebrigtsen Date: Wed Aug 19 11:32:56 2020 +0200 Remove some compat code from erc * lisp/erc/erc.el (erc-mode): next-line-add-newlines is always defined, so remove the check. diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index b4800053da..8712113790 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1489,8 +1489,7 @@ Defaults to the server buffer." (define-derived-mode erc-mode fundamental-mode "ERC" "Major mode for Emacs IRC." (setq local-abbrev-table erc-mode-abbrev-table) - (when (boundp 'next-line-add-newlines) - (set (make-local-variable 'next-line-add-newlines) nil)) + (set (make-local-variable 'next-line-add-newlines) nil) (setq line-move-ignore-invisible t) (set (make-local-variable 'paragraph-separate) (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)"))