aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2019-07-20 12:34:02 +0300
committerEli Zaretskii2019-07-20 12:34:02 +0300
commit0731273facdab36b34fc4d1c22eb1bcc4b93fadc (patch)
tree23f80a4c2d97c034edd5b63b082b38d8441ed572
parente6bfc6753cac7d8eaf67ff3adea0087eb19e7f6e (diff)
downloademacs-0731273facdab36b34fc4d1c22eb1bcc4b93fadc.tar.gz
emacs-0731273facdab36b34fc4d1c22eb1bcc4b93fadc.zip
Fix last change
* etc/NEWS: Call out the change in matching REGEXP. * lisp/files.el (magic-mode-alist) (magic-fallback-mode-alist): Doc fix. (Bug#36401)
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/files.el4
2 files changed, 6 insertions, 2 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 5cbe60c6d8a..9b7cfd7bb7e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1747,6 +1747,10 @@ immediately. Type 'M-x so-long-commentary' for full documentation.
1747 1747
1748* Incompatible Lisp Changes in Emacs 27.1 1748* Incompatible Lisp Changes in Emacs 27.1
1749 1749
1750---
1751** The REGEXP in 'magic-mode-alist' is now matched case-sensitively.
1752Likewise for 'magic-fallback-mode-alist'.
1753
1750+++ 1754+++
1751** add-hook does not always add to the front or the end any more. 1755** add-hook does not always add to the front or the end any more.
1752The replacement of `append` with `depth` implies that the function is not 1756The replacement of `append` with `depth` implies that the function is not
diff --git a/lisp/files.el b/lisp/files.el
index 34fdc3031a9..89e9a693d11 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2964,7 +2964,7 @@ associated with that interpreter in `interpreter-mode-alist'.")
2964 "Alist of buffer beginnings vs. corresponding major mode functions. 2964 "Alist of buffer beginnings vs. corresponding major mode functions.
2965Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION). 2965Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
2966After visiting a file, if REGEXP matches the text at the beginning of the 2966After visiting a file, if REGEXP matches the text at the beginning of the
2967buffer (respecting case), or calling MATCH-FUNCTION returns non-nil, 2967buffer (case-sensitively), or calling MATCH-FUNCTION returns non-nil,
2968`normal-mode' will call FUNCTION rather than allowing `auto-mode-alist' to 2968`normal-mode' will call FUNCTION rather than allowing `auto-mode-alist' to
2969decide the buffer's major mode. 2969decide the buffer's major mode.
2970 2970
@@ -2998,7 +2998,7 @@ If FUNCTION is nil, then it is not called. (That is a way of saying
2998 "Like `magic-mode-alist' but has lower priority than `auto-mode-alist'. 2998 "Like `magic-mode-alist' but has lower priority than `auto-mode-alist'.
2999Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION). 2999Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
3000After visiting a file, if REGEXP matches the text at the beginning of the 3000After visiting a file, if REGEXP matches the text at the beginning of the
3001buffer (respecting case), or calling MATCH-FUNCTION returns non-nil, 3001buffer (case-sensitively), or calling MATCH-FUNCTION returns non-nil,
3002`normal-mode' will call FUNCTION, provided that `magic-mode-alist' and 3002`normal-mode' will call FUNCTION, provided that `magic-mode-alist' and
3003`auto-mode-alist' have not specified a mode for this file. 3003`auto-mode-alist' have not specified a mode for this file.
3004 3004