]> git.eshelyaron.com Git - emacs.git/commitdiff
(electric--sort-post-self-insertion-hook): Accept non-symbol functions
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 21 Jan 2019 18:52:51 +0000 (13:52 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 21 Jan 2019 18:52:51 +0000 (13:52 -0500)
* lisp/electric.el (electric--sort-post-self-insertion-hook):
Don't burp on non-symbol functions.

lisp/electric.el

index f2061c2f52cb1fbc236bd3ca736fd7f398caa5f3..9610b4be22fe15215a6d28f0543486408a513dbc 100644 (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.