mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-08 16:52:40 -08:00
Use 'buffer-file-name' when matching 'auto-mode-alist'
* lisp/emacs-lisp/package-activate.el (package--suggestion-applies-p): The file name associated with a buffer is a better match for entries in 'auto-mode-alist', so we use that instead of the buffer name that can have additional noise to make the name unique.
This commit is contained in:
parent
6314c08c6b
commit
bc413b3507
1 changed files with 1 additions and 1 deletions
|
|
@ -588,7 +588,7 @@ what command to invoke to enable the package."
|
|||
`(,(pred package-installed-p) . ,_))
|
||||
nil)
|
||||
(`(,_ auto-mode-alist ,ext . ,_)
|
||||
(and (string-match-p ext (buffer-name)) t))
|
||||
(and (buffer-file-name) (string-match-p ext (buffer-file-name)) t))
|
||||
(`(,_ magic-mode-alist ,mag . ,_)
|
||||
(without-restriction
|
||||
(save-excursion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue