diff options
author | Daniel Pfeiffer <[email protected]> | 2005-05-21 02:46:37 +0000 |
---|---|---|
committer | Daniel Pfeiffer <[email protected]> | 2005-05-21 02:46:37 +0000 |
commit | 774cd45416f0d0bfb5b69ace8d10d35ea7e288ee (patch) | |
tree | 825f5d5157c219d72ec4559565a0b051409ad1b0 /lisp/progmodes/make-mode.el | |
parent | fb50d1e9db15111b5952a8709e4a5774ae34624b (diff) |
(makefile-imenu-generic-expression): Use function to find dependencies, because regexp alone is so complex, it easily goes into an endless loop.
(makefile-makepp-mode): Also add submenu for Perl functions defined in the makefile.
(makefile-bsdmake-mode): Special imenu-generic-expression no longer needed, due to function call.
(makefile-match-dependency): Take BOUND into account when checking if we're through.
Diffstat (limited to 'lisp/progmodes/make-mode.el')
-rw-r--r-- | lisp/progmodes/make-mode.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 8600276875..05c3ac5078 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -484,7 +484,7 @@ not be enclosed in { } or ( )." ("\\\\\n" 0 "."))) (defvar makefile-imenu-generic-expression - `(("Dependencies" ,makefile-dependency-regex 1) + `(("Dependencies" makefile-previous-dependency 1) ("Macro Assignment" ,makefile-macroassign-regex 1)) "Imenu generic expression for Makefile mode. See `imenu-generic-expression'.") @@ -854,7 +854,10 @@ Makefile mode can be configured by modifying the following variables: "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.+\\\\\n\\)*.+\\)") (setq font-lock-defaults - `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)))) + `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) + imenu-generic-expression + `(("Functions" "^[ \t]*\\(?:make\\)?sub[ \t]+\\([A-Za-z0-9_]+\\)" 1) + ,@imenu-generic-expression))) ;;;###autoload (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" @@ -866,10 +869,7 @@ Makefile mode can be configured by modifying the following variables: (set (make-local-variable 'makefile-rule-action-regex) "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)") (setq font-lock-defaults - `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)) - imenu-generic-expression - `(("Dependencies" ,makefile-dependency-regex 1) - ,@(cdr imenu-generic-expression)))) + `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) @@ -1682,7 +1682,7 @@ matched in a rule action." (catch 'found (let ((pt (point))) (while (progn (skip-chars-forward makefile-dependency-skip bound) - (not (eobp))) + (< (point) (or bound (point-max)))) (forward-char) (or (eq (char-after) ?=) (get-text-property (1- (point)) 'face) |