]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cfengine.el
; Revert "Use eldoc-documentation-functions"
[gnu-emacs] / lisp / progmodes / cfengine.el
index 27784a503bae897c15dd4c6d3568bc8f8400665a..083021472041f8e52d130f1a09014b25c605d5c5 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cfengine.el --- mode for editing Cfengine files
 
-;; Copyright (C) 2001-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
 ;; Author: Dave Love <fx@gnu.org>
 ;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
@@ -157,7 +157,7 @@ bundle agent rcfiles
   "Whether `cfengine-mode' should print debugging info.")
 
 (defvar cfengine-mode-syntax-cache nil
-  "Cache for `cfengine-mode' syntax trees obtained from 'cf-promises -s json'.")
+  "Cache for `cfengine-mode' syntax trees obtained from `cf-promises -s json'.")
 
 (defconst cfengine3-fallback-syntax
   '((functions
@@ -1005,12 +1005,12 @@ Intended as the value of `indent-line-function'."
                                   (point))))
       (let ((paragraph-start
             ;; Include start of parenthesized block.
-            "\f\\|[ \t]*$\\|.*\(")
+            "\f\\|[ \t]*$\\|.*(")
            (paragraph-separate
             ;; Include action and class lines, start and end of
             ;; bracketed blocks and end of parenthesized blocks to
             ;; avoid including these in fill.  This isn't ideal.
-            "[ \t\f]*$\\|.*#\\|.*[\){}]\\|\\s-*[[:alpha:]_().|!]+:")
+            "[ \t\f]*$\\|.*#\\|.*[){}]\\|\\s-*[[:alpha:]_().|!]+:")
            fill-paragraph-function)
        (fill-paragraph justify))
       t))
@@ -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)