emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d1ea675: (electric--sort-post-self-insertion-hook):


From: Stefan Monnier
Subject: [Emacs-diffs] master d1ea675: (electric--sort-post-self-insertion-hook): Accept non-symbol functions
Date: Mon, 21 Jan 2019 13:52:56 -0500 (EST)

branch: master
commit d1ea675d2cfccfb043c8e853c410427ca62dd921
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    (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.
---
 lisp/electric.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/electric.el b/lisp/electric.el
index f2061c2..9610b4b 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -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.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]