From: Eric Blake Date: Mon, 3 Nov 2008 16:38:37 +0000 (-0500) Subject: Recognize new m4sugar keywords. X-Git-Tag: v2.64~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32440e1605b6f4113ee70389839fb5c2fa075c4a;p=thirdparty%2Fautoconf.git 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. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 81499131..e5ab5491 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-07-25 Eric Blake + 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. diff --git a/lib/emacs/autoconf-mode.el b/lib/emacs/autoconf-mode.el index a0aec862..7b507f6c 100644 --- a/lib/emacs/autoconf-mode.el +++ b/lib/emacs/autoconf-mode.el @@ -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