[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/make-mode.el
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/make-mode.el |
Date: |
Mon, 06 Jun 2005 08:50:01 -0400 |
Index: emacs/lisp/progmodes/make-mode.el
diff -c emacs/lisp/progmodes/make-mode.el:1.100
emacs/lisp/progmodes/make-mode.el:1.101
*** emacs/lisp/progmodes/make-mode.el:1.100 Fri Jun 3 08:42:33 2005
--- emacs/lisp/progmodes/make-mode.el Mon Jun 6 12:50:01 2005
***************
*** 262,268 ****
;; index in makefile-imenu-generic-expression.
(defvar makefile-dependency-regex
;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d)
! "^ *\\(\\(?:
*\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|
*[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[
\t]*\\(.+\\)\\)?\\)"
"Regex used to find dependency lines in a makefile.")
(defconst makefile-bsdmake-dependency-regex
--- 262,268 ----
;; index in makefile-imenu-generic-expression.
(defvar makefile-dependency-regex
;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d)
!
"^\\(\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#:=]\\)+?\\)\\(:\\)\\(?:[
\t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(bb.+\\)\\)?\\)"
"Regex used to find dependency lines in a makefile.")
(defconst makefile-bsdmake-dependency-regex
***************
*** 291,297 ****
;; that if you change this regexp you might have to fix the imenu index in
;; makefile-imenu-generic-expression.
(defconst makefile-macroassign-regex
! "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[
\t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)"
"Regex used to find macro assignment lines in a makefile.")
(defconst makefile-var-use-regex
--- 291,297 ----
;; that if you change this regexp you might have to fix the imenu index in
;; makefile-imenu-generic-expression.
(defconst makefile-macroassign-regex
! "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
"Regex used to find macro assignment lines in a makefile.")
(defconst makefile-var-use-regex
***************
*** 1704,1709 ****
--- 1704,1722 ----
(when (save-excursion
(beginning-of-line)
(looking-at makefile-dependency-regex))
+ (save-excursion
+ (let ((deps-end (match-end 1))
+ (match-data (match-data)))
+ (goto-char deps-end)
+ (skip-chars-backward " \t")
+ (setq deps-end (point))
+ (beginning-of-line)
+ (skip-chars-forward " \t")
+ ;; Alter the bounds recorded for subexp 1,
+ ;; which is what is supposed to match the targets.
+ (setcar (nthcdr 2 match-data) (point))
+ (setcar (nthcdr 3 match-data) deps-end)
+ (store-match-data match-data)))
(end-of-line)
(throw 'found (point)))))
(goto-char pt))