/[emacs]/emacs/lisp/progmodes/make-mode.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/make-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.100 by pfeiffer, Fri Jun 3 08:42:33 2005 UTC revision 1.101 by rms, Mon Jun 6 12:50:01 2005 UTC
# Line 262  not be enclosed in { } or ( )." Line 262  not be enclosed in { } or ( )."
262  ;; index in makefile-imenu-generic-expression.  ;; index in makefile-imenu-generic-expression.
263  (defvar makefile-dependency-regex  (defvar makefile-dependency-regex
264    ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d)    ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d)
265    "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)"    "^\\(\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#:=]\\)+?\\)\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(bb.+\\)\\)?\\)"
266    "Regex used to find dependency lines in a makefile.")    "Regex used to find dependency lines in a makefile.")
267    
268  (defconst makefile-bsdmake-dependency-regex  (defconst makefile-bsdmake-dependency-regex
# Line 291  not be enclosed in { } or ( )." Line 291  not be enclosed in { } or ( )."
291  ;; that if you change this regexp you might have to fix the imenu index in  ;; that if you change this regexp you might have to fix the imenu index in
292  ;; makefile-imenu-generic-expression.  ;; makefile-imenu-generic-expression.
293  (defconst makefile-macroassign-regex  (defconst makefile-macroassign-regex
294    "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)"    "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
295    "Regex used to find macro assignment lines in a makefile.")    "Regex used to find macro assignment lines in a makefile.")
296    
297  (defconst makefile-var-use-regex  (defconst makefile-var-use-regex
# Line 1704  matched in a rule action." Line 1704  matched in a rule action."
1704              (when (save-excursion              (when (save-excursion
1705                      (beginning-of-line)                      (beginning-of-line)
1706                      (looking-at makefile-dependency-regex))                      (looking-at makefile-dependency-regex))
1707                  (save-excursion
1708                    (let ((deps-end (match-end 1))
1709                          (match-data (match-data)))
1710                      (goto-char deps-end)
1711                      (skip-chars-backward " \t")
1712                      (setq deps-end (point))
1713                      (beginning-of-line)
1714                      (skip-chars-forward " \t")
1715                      ;; Alter the bounds recorded for subexp 1,
1716                      ;; which is what is supposed to match the targets.
1717                      (setcar (nthcdr 2 match-data) (point))
1718                      (setcar (nthcdr 3 match-data) deps-end)
1719                      (store-match-data match-data)))
1720                (end-of-line)                (end-of-line)
1721                (throw 'found (point)))))                (throw 'found (point)))))
1722        (goto-char pt))        (goto-char pt))

Legend:
Removed from v.1.100  
changed lines
  Added in v.1.101

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26