From: Eli Zaretskii Date: Sat, 20 Jul 2019 09:34:02 +0000 (+0300) Subject: Fix last change X-Git-Tag: emacs-27.0.90~1850 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0731273facdab36b34fc4d1c22eb1bcc4b93fadc;p=emacs.git 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) --- 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. * Incompatible Lisp Changes in Emacs 27.1 +--- +** The REGEXP in 'magic-mode-alist' is now matched case-sensitively. +Likewise for 'magic-fallback-mode-alist'. + +++ ** add-hook does not always add to the front or the end any more. The 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'.") "Alist of buffer beginnings vs. corresponding major mode functions. Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION). After visiting a file, if REGEXP matches the text at the beginning of the -buffer (respecting case), or calling MATCH-FUNCTION returns non-nil, +buffer (case-sensitively), or calling MATCH-FUNCTION returns non-nil, `normal-mode' will call FUNCTION rather than allowing `auto-mode-alist' to decide the buffer's major mode. @@ -2998,7 +2998,7 @@ If FUNCTION is nil, then it is not called. (That is a way of saying "Like `magic-mode-alist' but has lower priority than `auto-mode-alist'. Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION). After visiting a file, if REGEXP matches the text at the beginning of the -buffer (respecting case), or calling MATCH-FUNCTION returns non-nil, +buffer (case-sensitively), or calling MATCH-FUNCTION returns non-nil, `normal-mode' will call FUNCTION, provided that `magic-mode-alist' and `auto-mode-alist' have not specified a mode for this file.