[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109358: Small tweaks for autoconf mo
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109358: Small tweaks for autoconf mode |
Date: |
Wed, 01 Aug 2012 00:34:28 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109358
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2012-08-01 00:34:28 -0700
message:
Small tweaks for autoconf mode
* lisp/progmodes/autoconf.el (autoconf-definition-regexp):
Add AH_TEMPLATE, adjust submatch numbering.
(autoconf-font-lock-keywords, autoconf-imenu-generic-expression)
(autoconf-current-defun-function): Update for above change.
(autoconf-current-defun-function): First skip to end of current word.
modified:
lisp/ChangeLog
lisp/progmodes/autoconf.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-08-01 07:15:44 +0000
+++ b/lisp/ChangeLog 2012-08-01 07:34:28 +0000
@@ -1,3 +1,11 @@
+2012-08-01 Glenn Morris <address@hidden>
+
+ * progmodes/autoconf.el (autoconf-definition-regexp):
+ Add AH_TEMPLATE, adjust submatch numbering.
+ (autoconf-font-lock-keywords, autoconf-imenu-generic-expression)
+ (autoconf-current-defun-function): Update for above change.
+ (autoconf-current-defun-function): First skip to end of current word.
+
2012-08-01 Rupert Swarbrick <address@hidden> (tiny change)
* calendar/cal-html.el (cal-html-insert-agenda-days):
=== modified file 'lisp/progmodes/autoconf.el'
--- a/lisp/progmodes/autoconf.el 2012-07-09 04:52:49 +0000
+++ b/lisp/progmodes/autoconf.el 2012-08-01 07:34:28 +0000
@@ -43,12 +43,12 @@
"Hook run by `autoconf-mode'.")
(defconst autoconf-definition-regexp
- "AC_\\(SUBST\\|DEFINE\\(_UNQUOTED\\)?\\)(\\[*\\(\\sw+\\)\\]*")
+
"A\\(?:H_TEMPLATE\\|C_\\(?:SUBST\\|DEFINE\\(?:_UNQUOTED\\)?\\)\\)(\\[*\\(\\sw+\\)\\]*")
(defvar autoconf-font-lock-keywords
`(("\\_<A[CHMS]_\\sw+" . font-lock-keyword-face)
(,autoconf-definition-regexp
- 3 font-lock-function-name-face)
+ 1 font-lock-function-name-face)
;; Are any other M4 keywords really appropriate for configure.ac,
;; given that we do `dnl'?
("changequote" . font-lock-keyword-face)))
@@ -61,7 +61,7 @@
table))
(defvar autoconf-imenu-generic-expression
- (list (list nil autoconf-definition-regexp 3)))
+ (list (list nil autoconf-definition-regexp 1)))
;; It's not clear how best to implement this.
(defun autoconf-current-defun-function ()
@@ -71,10 +71,11 @@
(save-excursion
(with-syntax-table (copy-syntax-table autoconf-mode-syntax-table)
(modify-syntax-entry ?_ "w")
+ (skip-syntax-forward "w" (line-end-position))
(if (re-search-backward autoconf-definition-regexp
(save-excursion (beginning-of-defun) (point))
t)
- (match-string-no-properties 3)))))
+ (match-string-no-properties 1)))))
;;;###autoload
(define-derived-mode autoconf-mode prog-mode "Autoconf"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109358: Small tweaks for autoconf mode,
Glenn Morris <=