From: João Távora Date: Fri, 18 Jan 2019 22:26:29 +0000 (+0000) Subject: Revert "Remove leftover from previous electric-layout-rules API" X-Git-Tag: emacs-27.0.90~3785 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7717778e8b1a04c51e49a15481257ef0ae385d62;p=emacs.git Revert "Remove leftover from previous electric-layout-rules API" This is a backward-incompatible change, and removing it isn't really necessary. This reverts commit 942dad2b519cabddf6caea7641517507dc06944b. --- diff --git a/lisp/electric.el b/lisp/electric.el index e2f9f707436..f2061c2f52c 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -414,6 +414,7 @@ If multiple rules match, only first one is executed.") ;; Not in a string or comment. (not (nth 8 (save-excursion (syntax-ppss pos))))) (goto-char pos) + (when (functionp rule) (setq rule (funcall rule))) (dolist (sym (if (symbolp rule) (list rule) rule)) (let* ((nl-after (lambda ()