[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs tweaks
From: |
Eric Blake |
Subject: |
emacs tweaks |
Date: |
Sat, 25 Jul 2009 20:58:22 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm pushing this, to make it easier to recognize some of the current
autoconf idioms when editing in emacs. I wish I knew enough about emacs
to make $# appear as a single entity, as in shell mode, rather than
treating the # as the start of a comment.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkprxk4ACgkQ84KuGfSFAYBLWwCbBpYldFQ8dEu6oiLRplQAj9kv
MmEAn1CnzqRiwGh7kQTpvrQnXV/lKYFH
=WOfK
-----END PGP SIGNATURE-----
>From 32440e1605b6f4113ee70389839fb5c2fa075c4a Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 3 Nov 2008 11:38:37 -0500
Subject: [PATCH] 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 <address@hidden>
---
ChangeLog | 5 +++++
lib/emacs/autoconf-mode.el | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8149913..e5ab549 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-07-25 Eric Blake <address@hidden>
+ 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 a0aec86..7b507f6 100644
--- a/lib/emacs/autoconf-mode.el
+++ b/lib/emacs/autoconf-mode.el
@@ -41,7 +41,7 @@
`(("\\bdnl \\(.*\\)" 1 font-lock-comment-face t)
("address@hidden" . 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
--
1.6.3.3.334.g916e1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs tweaks,
Eric Blake <=