111 |
'((t (:underline t))) |
'((t (:underline t))) |
112 |
"Face to use for additionally highlighting rule targets in Font-Lock mode." |
"Face to use for additionally highlighting rule targets in Font-Lock mode." |
113 |
:group 'faces |
:group 'faces |
114 |
:group 'makefile) |
:group 'makefile |
115 |
|
:version "22.1") |
116 |
|
|
117 |
(defface makefile-shell-face |
(defface makefile-shell-face |
118 |
'((((class color) (background light)) (:background "seashell1")) |
'((((class color) (background light)) (:background "seashell1")) |
120 |
(t (:reverse-video t))) |
(t (:reverse-video t))) |
121 |
"Face to use for additionally highlighting Shell commands in Font-Lock mode." |
"Face to use for additionally highlighting Shell commands in Font-Lock mode." |
122 |
:group 'faces |
:group 'faces |
123 |
:group 'makefile) |
:group 'makefile |
124 |
|
:version "22.1") |
125 |
|
|
126 |
(defface makefile-makepp-perl-face |
(defface makefile-makepp-perl-face |
127 |
'((((class color) (background light)) (:background "LightBlue1")) ; Camel Book |
'((((class color) (background light)) (:background "LightBlue1")) ; Camel Book |
129 |
(t (:reverse-video t))) |
(t (:reverse-video t))) |
130 |
"Face to use for additionally highlighting Perl code in Font-Lock mode." |
"Face to use for additionally highlighting Perl code in Font-Lock mode." |
131 |
:group 'faces |
:group 'faces |
132 |
:group 'makefile) |
:group 'makefile |
133 |
|
:version "22.1") |
134 |
|
|
135 |
(defcustom makefile-browser-buffer-name "*Macros and Targets*" |
(defcustom makefile-browser-buffer-name "*Macros and Targets*" |
136 |
"*Name of the macro- and target browser buffer." |
"*Name of the macro- and target browser buffer." |
265 |
"^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" |
"^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" |
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 |
269 |
|
(progn (string-match (regexp-quote "\\(:\\)") makefile-dependency-regex) |
270 |
|
(replace-match "\\([:!]\\)" t t makefile-dependency-regex)) |
271 |
|
"Regex used to find dependency lines in a BSD makefile.") |
272 |
|
|
273 |
(defvar makefile-dependency-skip "^:" |
(defvar makefile-dependency-skip "^:" |
274 |
"Characters to skip to find a line that might be a dependency.") |
"Characters to skip to find a line that might be a dependency.") |
275 |
|
|
277 |
"^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)" |
"^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)" |
278 |
"Regex used to highlight rule action lines in font lock mode.") |
"Regex used to highlight rule action lines in font lock mode.") |
279 |
|
|
280 |
|
(defconst makefile-makepp-rule-action-regex |
281 |
|
;; Don't care about initial tab, but I don't know how to font-lock correctly without. |
282 |
|
"^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)" |
283 |
|
"Regex used to highlight makepp rule action lines in font lock mode.") |
284 |
|
|
285 |
|
(defconst makefile-bsdmake-rule-action-regex |
286 |
|
(progn (string-match "-@" makefile-rule-action-regex) |
287 |
|
(replace-match "-+@" t t makefile-rule-action-regex)) |
288 |
|
"Regex used to highlight BSD rule action lines in font lock mode.") |
289 |
|
|
290 |
;; Note that the first and second subexpression is used by font lock. Note |
;; Note that the first and second subexpression is used by font lock. Note |
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. |
867 |
;;;###autoload |
;;;###autoload |
868 |
(define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile" |
(define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile" |
869 |
"An adapted `makefile-mode' that knows about makepp." |
"An adapted `makefile-mode' that knows about makepp." |
870 |
(set (make-local-variable 'makefile-rule-action-regex) |
(set (make-local-variable 'makefile-rule-action-regex) |
871 |
;; Don't care about initial tab, but I don't know how to font-lock correctly without. |
makefile-makepp-rule-action-regex) |
|
"^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)") |
|
|
|
|
872 |
(setq font-lock-defaults |
(setq font-lock-defaults |
873 |
`(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) |
`(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) |
874 |
imenu-generic-expression |
imenu-generic-expression |
879 |
(define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" |
(define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" |
880 |
"An adapted `makefile-mode' that knows about BSD make." |
"An adapted `makefile-mode' that knows about BSD make." |
881 |
(set (make-local-variable 'makefile-dependency-regex) |
(set (make-local-variable 'makefile-dependency-regex) |
882 |
;; Identical to default, except allows `!' instead of `:'. |
makefile-bsdmake-dependency-regex) |
|
"^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)") |
|
883 |
(set (make-local-variable 'makefile-dependency-skip) "^:!") |
(set (make-local-variable 'makefile-dependency-skip) "^:!") |
884 |
(set (make-local-variable 'makefile-rule-action-regex) |
(set (make-local-variable 'makefile-rule-action-regex) |
885 |
"^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)") |
makefile-bsdmake-rule-action-regex) |
886 |
(setq font-lock-defaults |
(setq font-lock-defaults |
887 |
`(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) |
`(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) |
888 |
|
|