From f7ba648def727053a2da7d71150a0ee991ec4f9e Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sun, 19 Jul 2015 12:39:37 +0800 Subject: [PATCH] Fix a bug in cfengine3-mode * progmodes/cfengine.el (cfengine3-mode): Handle nil eldoc-documentation-function. --- lisp/progmodes/cfengine.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 27784a503ba..108ccb654c4 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -1390,6 +1390,10 @@ to the action header." (when buffer-file-name (shell-quote-argument buffer-file-name))))) + ;; For emacs < 25.1 where `eldoc-documentation-function' defaults to + ;; nil. + (or eldoc-documentation-function + (setq-local eldoc-documentation-function #'ignore)) (add-function :before-until (local 'eldoc-documentation-function) #'cfengine3-documentation-function) -- 2.39.2