]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Recognize new m4sugar keywords.
authorEric Blake <ebb9@byu.net>
Mon, 3 Nov 2008 16:38:37 +0000 (11:38 -0500)
committerEric Blake <ebb9@byu.net>
Sun, 26 Jul 2009 02:56:52 +0000 (20:56 -0600)
* lib/emacs/autoconf-mode.el (autoconf-current-defun): Recognize
m4_define_default, m4_defun_init, m4_defun_once.
(autoconf-font-lock-keywords):  Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/emacs/autoconf-mode.el

index 81499131c5ec33c3545178c4c23185fdcb6c5386..e5ab549169a0128b82cbb1d4f66c8225ccf4676b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-07-25  Eric Blake  <ebb9@byu.net>
 
+       Recognize new m4sugar keywords.
+       * lib/emacs/autoconf-mode.el (autoconf-current-defun): Recognize
+       m4_define_default, m4_defun_init, m4_defun_once.
+       (autoconf-font-lock-keywords):  Likewise.
+
        Require m4 1.4.6, and fix testsuite to support this version.
        * m4/m4.m4 (AC_PROG_GNU_M4): Reject m4 1.4.5, now that we use
        regexp it can't handle.
index a0aec86286036fcc18c7204266efc7ef51983e7e..7b507f6c56d4e150a51f30f30199fb312f06c193 100644 (file)
@@ -41,7 +41,7 @@
   `(("\\bdnl \\(.*\\)"  1 font-lock-comment-face t)
     ("\\$[0-9*#@]" . font-lock-variable-name-face)
     ("\\b\\(m4_\\)?\\(builtin\\|change\\(com\\|quote\\|word\\)\\|d\\(e\\(bug\\(file\\|mode\\)\\|cr\\|f\\(ine\\|n\\)\\)\\|iv\\(ert\\|num\\)\\|nl\\|umpdef\\)\\|e\\(rrprint\\|syscmd\\|val\\)\\|f\\(ile\\|ormat\\)\\|gnu\\|i\\(f\\(def\\|else\\)\\|n\\(c\\(lude\\|r\\)\\|d\\(ex\\|ir\\)\\)\\)\\|l\\(en\\|ine\\)\\|m\\(4\\(exit\\|wrap\\)\\|aketemp\\|kstemp\\)\\|p\\(atsubst\\|opdef\\|ushdef\\)\\|regexp\\|s\\(hift\\|include\\|ubstr\\|ys\\(cmd\\|val\\)\\)\\|tra\\(ceo\\(ff\\|n\\)\\|nslit\\)\\|un\\(d\\(efine\\|ivert\\)\\|ix\\)\\)\\b" . font-lock-keyword-face)
-    ("^\\(\\(m4_\\)?define\\|A._DEFUN\\|m4_defun\\)(\\[?\\([A-Za-z0-9_]+\\)" 3 font-lock-function-name-face)
+    ("^\\(\\(m4_\\)?define\\(_default\\)?\\|A._DEFUN\\|m4_defun\\(_once\\|_init\\)?\\)(\\[?\\([A-Za-z0-9_]+\\)" 5 font-lock-function-name-face)
     "default font-lock-keywords")
 )
 
@@ -68,9 +68,9 @@
   "Autoconf value for `add-log-current-defun-function'.
 This tells add-log.el how to find the current macro."
   (save-excursion
-    (if (re-search-backward "^\\(m4_define\\|m4_defun\\|A._DEFUN\\)(\\[*\\([A-Za-z0-9_]+\\)" nil t)
-       (buffer-substring (match-beginning 2)
-                         (match-end 2))
+    (if (re-search-backward "^\\(m4_define\\(_default\\)?\\|m4_defun\\(_once\\|_init\\)?\\|A._DEFUN\\)(\\[*\\([A-Za-z0-9_]+\\)" nil t)
+       (buffer-substring (match-beginning 4)
+                         (match-end 4))
       nil)))
 
 ;;;###autoload