1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

(electric--sort-post-self-insertion-hook): Accept non-symbol functions

* lisp/electric.el (electric--sort-post-self-insertion-hook):
Don't burp on non-symbol functions.
This commit is contained in:
Stefan Monnier 2019-01-21 13:52:51 -05:00
parent 6e5ac1d1ff
commit d1ea675d2c

View file

@ -198,8 +198,8 @@ relative order must be maintained within it."
(setq-default post-self-insert-hook
(sort (default-value 'post-self-insert-hook)
#'(lambda (fn1 fn2)
(< (or (get fn1 'priority) 0)
(or (get fn2 'priority) 0))))))
(< (or (if (symbol fn1) (get fn1 'priority)) 0)
(or (if (symbol fn2) (get fn2 'priority)) 0))))))
;;; Electric indentation.