summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/hierarchy.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-03-14 22:15:41 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2024-03-14 22:15:41 -0400
commit9422a6737447b186ca017929da79985cef7898a8 (patch)
treed7c71c1153159360a53486036398687b937f6d3e /lisp/emacs-lisp/hierarchy.el
parentc8c0d0a9550620adb111bf5d9e0155332498a6bf (diff)
downloademacs-9422a6737447b186ca017929da79985cef7898a8.tar.gz
emacs-9422a6737447b186ca017929da79985cef7898a8.tar.bz2
emacs-9422a6737447b186ca017929da79985cef7898a8.zip
(set-auto-mode): Streamline to fix bug#67795
The old code tested if the mode function is `fboundp` but in an inconsistent way and without paying attention to `major-mode-remap`. * lisp/files.el (set-auto-mode-0): Return `:keep` rather than nil if the mode was already set. And emit a warning when the mode function doesn't exist. (set-auto-mode): Remove checks that the mode function exists now that `set-auto-mode-0` does it for us. Adjust to the new return values of that function, and simplify the code using a big `or` instead of a sequence of steps each setting&testing `done`. (hack-local-variables--find-variables): Use `major-mode-remap` when skipping the "mode:" entries that specify modes we don't have. Also, when (eq handle-mode t), don't bother building a list of results only to return a single element in the end.
Diffstat (limited to 'lisp/emacs-lisp/hierarchy.el')
0 files changed, 0 insertions, 0 deletions