aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2020-02-06 07:50:29 -0800
committerGlenn Morris2020-02-06 07:50:29 -0800
commit68d43392a65186a944c839dc576b2b01deafbb0d (patch)
tree2392fb385569e10ad9d4d0ab2a48a1771131bf4e /lisp
parentcf14fa0427d6f490972521f7a55134e7139117c6 (diff)
parent09eed01afb4968a93247fb8eb7b5301a5bfb6342 (diff)
downloademacs-68d43392a65186a944c839dc576b2b01deafbb0d.tar.gz
emacs-68d43392a65186a944c839dc576b2b01deafbb0d.zip
Merge from origin/emacs-27
09eed01afb Wrap some set-auto-mode calls with delay-mode-hooks (bug#3... 4a0a114505 Support ido-vertical-mode better ef5fba9f40 Fix faces tab-bar and tab-line. 831508422e Cater for 3-argument version of pthread_setname_np f27187f963 Clarify lexvar restrictions for add-to-ordered-list, add-t... 32763dac46 Replace add-to-list to lexical variable with push (bug#39373) d07f177382 Clarify add-to-list documentation (bug#39373) d3d2ea927c MH-E: alter content in mh-display-msg, not mh-show-mode db7fa2546f Update documentation for mh-show-mode-hook d10be6bf28 Example goto-addr hook: MH-E already uses goto-address # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp')
-rw-r--r--lisp/autoinsert.el2
-rw-r--r--lisp/cedet/mode-local.el14
-rw-r--r--lisp/gnus/mm-view.el4
-rw-r--r--lisp/ido.el3
-rw-r--r--lisp/mh-e/mh-e.el9
-rw-r--r--lisp/mh-e/mh-show.el8
-rw-r--r--lisp/net/goto-addr.el8
-rw-r--r--lisp/net/tramp-cache.el4
-rw-r--r--lisp/net/zeroconf.el12
-rw-r--r--lisp/org/org.el5
-rw-r--r--lisp/subr.el5
-rw-r--r--lisp/tab-bar.el4
-rw-r--r--lisp/tab-line.el4
-rw-r--r--lisp/vc/diff-mode.el4
-rw-r--r--lisp/vc/vc.el4
-rw-r--r--lisp/whitespace.el2
16 files changed, 52 insertions, 40 deletions
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index 9bc3aad2785..25961d41089 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -171,7 +171,7 @@ If this contains a %s, that will be replaced by the matching rule."
171 (mapatoms (lambda (mode) 171 (mapatoms (lambda (mode)
172 (let ((name (symbol-name mode))) 172 (let ((name (symbol-name mode)))
173 (when (string-match "-mode$" name) 173 (when (string-match "-mode$" name)
174 (add-to-list 'modes name))))) 174 (push name modes)))))
175 (sort modes 'string<))) 175 (sort modes 'string<)))
176 (completing-read "Local variables for mode: " v1 nil t) 176 (completing-read "Local variables for mode: " v1 nil t)
177 " . ((" 177 " . (("
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index a6e143cfcd6..a1aea30c20d 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -819,14 +819,12 @@ META-NAME is a cons (OVERLOADABLE-SYMBOL . MAJOR-MODE)."
819 ) 819 )
820 ;; Order symbols by type 820 ;; Order symbols by type
821 (mapatoms 821 (mapatoms
822 #'(lambda (s) 822 (lambda (s) (push s (cond
823 (add-to-list (cond 823 ((get s 'mode-variable-flag)
824 ((get s 'mode-variable-flag) 824 (if (get s 'constant-flag) mc mv))
825 (if (get s 'constant-flag) 'mc 'mv)) 825 ((get s 'override-flag)
826 ((get s 'override-flag) 826 (if (get s 'constant-flag) fo ov))
827 (if (get s 'constant-flag) 'fo 'ov)) 827 (t us))))
828 ('us))
829 s))
830 table) 828 table)
831 ;; Print symbols by type 829 ;; Print symbols by type
832 (when us 830 (when us
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index a6be04e313d..828ac633dc5 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -497,7 +497,9 @@ If MODE is not set, try to find mode automatically."
497 (let ((auto-mode-alist 497 (let ((auto-mode-alist
498 (delq (rassq 'doc-view-mode-maybe auto-mode-alist) 498 (delq (rassq 'doc-view-mode-maybe auto-mode-alist)
499 (copy-sequence auto-mode-alist)))) 499 (copy-sequence auto-mode-alist))))
500 (set-auto-mode) 500 ;; Don't run hooks that might assume buffer-file-name
501 ;; really associates buffer with a file (bug#39190).
502 (delay-mode-hooks (set-auto-mode))
501 (setq mode major-mode))) 503 (setq mode major-mode)))
502 ;; Do not fontify if the guess mode is fundamental. 504 ;; Do not fontify if the guess mode is fundamental.
503 (unless (eq major-mode 'fundamental-mode) 505 (unless (eq major-mode 'fundamental-mode)
diff --git a/lisp/ido.el b/lisp/ido.el
index 355be5eaa66..6707d814077 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -4732,6 +4732,9 @@ For details of keybindings, see `ido-find-file'."
4732 (delete-overlay ido--overlay)) 4732 (delete-overlay ido--overlay))
4733 (let ((o (make-overlay (point-max) (point-max) nil t t))) 4733 (let ((o (make-overlay (point-max) (point-max) nil t t)))
4734 (when (> (length inf) 0) 4734 (when (> (length inf) 0)
4735 ;; For hacks that redefine ido-completions function (bug#39379)
4736 (when (eq (aref inf 0) ?\n)
4737 (setq inf (concat " " inf)))
4735 (put-text-property 0 1 'cursor t inf)) 4738 (put-text-property 0 1 'cursor t inf))
4736 (overlay-put o 'after-string inf) 4739 (overlay-put o 'after-string inf)
4737 (setq ido--overlay o))) 4740 (setq ido--overlay o)))
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 5c85b3907e6..dd05d691c91 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -3380,13 +3380,14 @@ used to affect the behavior of MH-E in general or when
3380(defcustom-mh mh-show-mode-hook nil 3380(defcustom-mh mh-show-mode-hook nil
3381 "Hook run upon entry to `mh-show-mode'. 3381 "Hook run upon entry to `mh-show-mode'.
3382 3382
3383This hook is called early on in the process of the message 3383This hook is called early on in the process of the message display,
3384display. It is usually used to perform some action on the 3384before the message contents have been inserted into the buffer.
3385message's content. See `mh-show-hook'." 3385It is usually used to perform some action on the
3386buffer itself. See also `mh-show-hook'."
3386 :type 'hook 3387 :type 'hook
3387 :group 'mh-hooks 3388 :group 'mh-hooks
3388 :group 'mh-show 3389 :group 'mh-show
3389 :package-version '(MH-E . "6.0")) 3390 :package-version '(MH-E . "8.7"))
3390 3391
3391(defcustom-mh mh-unseen-updated-hook nil 3392(defcustom-mh mh-unseen-updated-hook nil
3392 "Hook run after the unseen sequence has been updated. 3393 "Hook run after the unseen sequence has been updated.
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index 952579fd3dd..3c07d426b7d 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -63,7 +63,7 @@ you wish to see all of them, use the command \\[mh-header-display].
63Two hooks can be used to control how messages are displayed. The 63Two hooks can be used to control how messages are displayed. The
64first hook, `mh-show-mode-hook', is called early on in the 64first hook, `mh-show-mode-hook', is called early on in the
65process of the message display. It is usually used to perform 65process of the message display. It is usually used to perform
66some action on the message's content. The second hook, 66some action on the message's buffer. The second hook,
67`mh-show-hook', is the last thing called after messages are 67`mh-show-hook', is the last thing called after messages are
68displayed. It's used to affect the behavior of MH-E in general or 68displayed. It's used to affect the behavior of MH-E in general or
69when `mh-show-mode-hook' is too early. 69when `mh-show-mode-hook' is too early.
@@ -234,6 +234,9 @@ Sets the current buffer to the show buffer."
234 (mh-add-missing-mime-version-header) 234 (mh-add-missing-mime-version-header)
235 (setf (mh-buffer-data) (mh-make-buffer-data)) 235 (setf (mh-buffer-data) (mh-make-buffer-data))
236 (mh-mime-display)) 236 (mh-mime-display))
237 (mh-show-unquote-From)
238 (mh-show-xface)
239 (mh-show-addr)
237 ;; Header cleanup 240 ;; Header cleanup
238 (goto-char (point-min)) 241 (goto-char (point-min))
239 (cond (clean-message-header 242 (cond (clean-message-header
@@ -840,9 +843,6 @@ See also `mh-folder-mode'.
840 (mh-tool-bar-init :show)) 843 (mh-tool-bar-init :show))
841 (set (make-local-variable 'mail-header-separator) mh-mail-header-separator) 844 (set (make-local-variable 'mail-header-separator) mh-mail-header-separator)
842 (setq paragraph-start (default-value 'paragraph-start)) 845 (setq paragraph-start (default-value 'paragraph-start))
843 (mh-show-unquote-From)
844 (mh-show-xface)
845 (mh-show-addr)
846 (setq buffer-invisibility-spec '((vanish . t) t)) 846 (setq buffer-invisibility-spec '((vanish . t) t))
847 (set (make-local-variable 'line-move-ignore-invisible) t) 847 (set (make-local-variable 'line-move-ignore-invisible) t)
848 (make-local-variable 'font-lock-defaults) 848 (make-local-variable 'font-lock-defaults)
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index 7dd778dc8d5..9436f45aa32 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -5,7 +5,7 @@
5;; Author: Eric Ding <ericding@alum.mit.edu> 5;; Author: Eric Ding <ericding@alum.mit.edu>
6;; Maintainer: emacs-devel@gnu.org 6;; Maintainer: emacs-devel@gnu.org
7;; Created: 15 Aug 1995 7;; Created: 15 Aug 1995
8;; Keywords: mh-e, www, mouse, mail 8;; Keywords: www, mouse, mail
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -32,10 +32,10 @@
32 32
33;; INSTALLATION 33;; INSTALLATION
34;; 34;;
35;; To use goto-address in a particular mode (for example, while 35;; To use goto-address in a particular mode (this example uses
36;; reading mail in mh-e), add this to your init file: 36;; the fictional rich-text-mode), add this to your init file:
37;; 37;;
38;; (add-hook 'mh-show-mode-hook 'goto-address) 38;; (add-hook 'rich-text-mode-hook 'goto-address)
39;; 39;;
40;; The mouse click method is bound to [mouse-2] on highlighted URLs or 40;; The mouse click method is bound to [mouse-2] on highlighted URLs or
41;; e-mail addresses only; it functions normally everywhere else. To bind 41;; e-mail addresses only; it functions normally everywhere else. To bind
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 92c98486f46..1998042d699 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -368,7 +368,7 @@ used to cache connection properties of the local machine."
368 (let ((hash (gethash key tramp-cache-data)) 368 (let ((hash (gethash key tramp-cache-data))
369 properties) 369 properties)
370 (when (hash-table-p hash) 370 (when (hash-table-p hash)
371 (maphash (lambda (x _y) (add-to-list 'properties x 'append)) hash)) 371 (maphash (lambda (x _y) (push x properties)) hash))
372 properties)) 372 properties))
373 (setq tramp-cache-data-changed t) 373 (setq tramp-cache-data-changed t)
374 (remhash key tramp-cache-data)) 374 (remhash key tramp-cache-data))
@@ -417,7 +417,7 @@ used to cache connection properties of the local machine."
417 (when (and (tramp-file-name-p key) 417 (when (and (tramp-file-name-p key)
418 (null (tramp-file-name-localname key)) 418 (null (tramp-file-name-localname key))
419 (tramp-connection-property-p key "process-buffer")) 419 (tramp-connection-property-p key "process-buffer"))
420 (add-to-list 'result key))) 420 (push key result)))
421 tramp-cache-data) 421 tramp-cache-data)
422 result)) 422 result))
423 423
diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el
index b8becd712f5..cb3c0f2a7ee 100644
--- a/lisp/net/zeroconf.el
+++ b/lisp/net/zeroconf.el
@@ -256,17 +256,17 @@ supported keys depend on the service type.")
256 "Return all discovered Avahi service names as list." 256 "Return all discovered Avahi service names as list."
257 (let (result) 257 (let (result)
258 (maphash 258 (maphash
259 (lambda (_key value) (add-to-list 'result (zeroconf-service-name value))) 259 (lambda (_key value) (push (zeroconf-service-name value) result))
260 zeroconf-services-hash) 260 zeroconf-services-hash)
261 result)) 261 (delete-dups result)))
262 262
263(defun zeroconf-list-service-types () 263(defun zeroconf-list-service-types ()
264 "Return all discovered Avahi service types as list." 264 "Return all discovered Avahi service types as list."
265 (let (result) 265 (let (result)
266 (maphash 266 (maphash
267 (lambda (_key value) (add-to-list 'result (zeroconf-service-type value))) 267 (lambda (_key value) (push (zeroconf-service-type value) result))
268 zeroconf-services-hash) 268 zeroconf-services-hash)
269 result)) 269 (delete-dups result)))
270 270
271(defun zeroconf-list-services (type) 271(defun zeroconf-list-services (type)
272 "Return all discovered Avahi services for a given service type TYPE. 272 "Return all discovered Avahi services for a given service type TYPE.
@@ -278,9 +278,9 @@ format of SERVICE."
278 (maphash 278 (maphash
279 (lambda (_key value) 279 (lambda (_key value)
280 (when (equal type (zeroconf-service-type value)) 280 (when (equal type (zeroconf-service-type value))
281 (add-to-list 'result value))) 281 (push value result)))
282 zeroconf-services-hash) 282 zeroconf-services-hash)
283 result)) 283 (delete-dups result)))
284 284
285(defvar zeroconf-service-added-hooks-hash (make-hash-table :test 'equal) 285(defvar zeroconf-service-added-hooks-hash (make-hash-table :test 'equal)
286 "Hash table of hooks for newly added services. 286 "Hash table of hooks for newly added services.
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 1581625a8e5..e8e1ef99f26 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -18682,13 +18682,14 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
18682 (and (string= org-dir contrib-dir) 18682 (and (string= org-dir contrib-dir)
18683 (org-load-noerror-mustsuffix (concat contrib-dir f))) 18683 (org-load-noerror-mustsuffix (concat contrib-dir f)))
18684 (and (org-load-noerror-mustsuffix (concat (org-find-library-dir f) f)) 18684 (and (org-load-noerror-mustsuffix (concat (org-find-library-dir f) f))
18685 (add-to-list 'load-uncore f 'append) 18685 (push f load-uncore)
18686 't) 18686 't)
18687 f)) 18687 f))
18688 lfeat))) 18688 lfeat)))
18689 (when load-uncore 18689 (when load-uncore
18690 (message "The following feature%s found in load-path, please check if that's correct:\n%s" 18690 (message "The following feature%s found in load-path, please check if that's correct:\n%s"
18691 (if (> (length load-uncore) 1) "s were" " was") load-uncore)) 18691 (if (> (length load-uncore) 1) "s were" " was")
18692 (reverse load-uncore)))
18692 (if load-misses 18693 (if load-misses
18693 (message "Some error occurred while reloading Org feature%s\n%s\nPlease check *Messages*!\n%s" 18694 (message "Some error occurred while reloading Org feature%s\n%s\nPlease check *Messages*!\n%s"
18694 (if (> (length load-misses) 1) "s" "") load-misses (org-version nil 'full)) 18695 (if (> (length load-misses) 1) "s" "") load-misses (org-version nil 'full))
diff --git a/lisp/subr.el b/lisp/subr.el
index 0e09228f6f6..b5ec0de156a 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1845,6 +1845,7 @@ COMPARE-FN if that's non-nil.
1845If ELEMENT is added, it is added at the beginning of the list, 1845If ELEMENT is added, it is added at the beginning of the list,
1846unless the optional argument APPEND is non-nil, in which case 1846unless the optional argument APPEND is non-nil, in which case
1847ELEMENT is added at the end. 1847ELEMENT is added at the end.
1848LIST-VAR should not refer to a lexical variable.
1848 1849
1849The return value is the new value of LIST-VAR. 1850The return value is the new value of LIST-VAR.
1850 1851
@@ -1934,6 +1935,7 @@ of ELEMENT if it has one.
1934 1935
1935The list order for each element is stored in LIST-VAR's 1936The list order for each element is stored in LIST-VAR's
1936`list-order' property. 1937`list-order' property.
1938LIST-VAR cannot refer to a lexical variable.
1937 1939
1938The return value is the new value of LIST-VAR." 1940The return value is the new value of LIST-VAR."
1939 (let ((ordering (get list-var 'list-order))) 1941 (let ((ordering (get list-var 'list-order)))
@@ -1962,7 +1964,8 @@ variable. The possible values of maximum length have the same meaning as
1962the values of `history-length'. 1964the values of `history-length'.
1963Remove duplicates of NEWELT if `history-delete-duplicates' is non-nil. 1965Remove duplicates of NEWELT if `history-delete-duplicates' is non-nil.
1964If optional fourth arg KEEP-ALL is non-nil, add NEWELT to history even 1966If optional fourth arg KEEP-ALL is non-nil, add NEWELT to history even
1965if it is empty or duplicates the most recent entry in the history." 1967if it is empty or duplicates the most recent entry in the history.
1968HISTORY-VAR cannot refer to a lexical variable."
1966 (unless maxelt 1969 (unless maxelt
1967 (setq maxelt (or (get history-var 'history-length) 1970 (setq maxelt (or (get history-var 'history-length)
1968 history-length))) 1971 history-length)))
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index ebb0c566ad1..fac27f41ba9 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -51,11 +51,11 @@
51 :version "27.1") 51 :version "27.1")
52 52
53(defface tab-bar 53(defface tab-bar
54 '((((type x w32 ns) (class color)) 54 '((((class color) (min-colors 88))
55 :inherit variable-pitch 55 :inherit variable-pitch
56 :background "grey85" 56 :background "grey85"
57 :foreground "black") 57 :foreground "black")
58 (((type x) (class mono)) 58 (((class mono))
59 :background "grey") 59 :background "grey")
60 (t 60 (t
61 :inverse-video t)) 61 :inverse-video t))
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 149fe8289c4..8f1221abe41 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -42,12 +42,12 @@
42 :version "27.1") 42 :version "27.1")
43 43
44(defface tab-line 44(defface tab-line
45 '((((type x w32 ns) (class color)) 45 '((((class color) (min-colors 88))
46 :inherit variable-pitch 46 :inherit variable-pitch
47 :height 0.9 47 :height 0.9
48 :background "grey85" 48 :background "grey85"
49 :foreground "black") 49 :foreground "black")
50 (((type x) (class mono)) 50 (((class mono))
51 :background "grey") 51 :background "grey")
52 (t 52 (t
53 :inverse-video t)) 53 :inverse-video t))
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 2dbab802086..d61c363c821 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2719,7 +2719,9 @@ hunk text is not found in the source file."
2719 (cl-assert (null buffer-file-name)) 2719 (cl-assert (null buffer-file-name))
2720 (let ((enable-local-variables :safe) ;; to find `mode:' 2720 (let ((enable-local-variables :safe) ;; to find `mode:'
2721 (buffer-file-name file)) 2721 (buffer-file-name file))
2722 (set-auto-mode) 2722 ;; Don't run hooks that might assume buffer-file-name
2723 ;; really associates buffer with a file (bug#39190).
2724 (delay-mode-hooks (set-auto-mode))
2723 ;; FIXME: Is this really worth the trouble? 2725 ;; FIXME: Is this really worth the trouble?
2724 (when (and (fboundp 'generic-mode-find-file-hook) 2726 (when (and (fboundp 'generic-mode-find-file-hook)
2725 (memq #'generic-mode-find-file-hook 2727 (memq #'generic-mode-find-file-hook
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index f64b6c06310..ec252b74d47 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2098,7 +2098,9 @@ Unlike `vc-find-revision-save', doesn't save the buffer to the file."
2098 ;; For non-interactive, skip any questions 2098 ;; For non-interactive, skip any questions
2099 (let ((enable-local-variables :safe) ;; to find `mode:' 2099 (let ((enable-local-variables :safe) ;; to find `mode:'
2100 (buffer-file-name file)) 2100 (buffer-file-name file))
2101 (ignore-errors (set-auto-mode))) 2101 ;; Don't run hooks that might assume buffer-file-name
2102 ;; really associates buffer with a file (bug#39190).
2103 (ignore-errors (delay-mode-hooks (set-auto-mode))))
2102 (normal-mode)) 2104 (normal-mode))
2103 (set-buffer-modified-p nil) 2105 (set-buffer-modified-p nil)
2104 (setq buffer-read-only t)) 2106 (setq buffer-read-only t))
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index fde73295233..0137ddcf04f 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -1684,7 +1684,7 @@ cleaning up these problems."
1684 (mapcar 1684 (mapcar
1685 #'(lambda (option) 1685 #'(lambda (option)
1686 (when force 1686 (when force
1687 (add-to-list 'style (car option))) 1687 (push (car option) style))
1688 (goto-char rstart) 1688 (goto-char rstart)
1689 (let ((regexp 1689 (let ((regexp
1690 (cond 1690 (cond