changeset 71559:e0adef75745f

(makefile-macroassign-regex): Accept preceding keyword. (makefile-gmake-statements): Reorganize, now that makepp has "override" and also handle forgotten "override define". (makefile-makepp-statements): Add new "global", "override export" and "override global".
author Daniel Pfeiffer <occitan@esperanto.org>
date Sun, 02 Jul 2006 19:01:34 +0000
parents 4252d6e24270
children 0cfdb902c318
files lisp/progmodes/make-mode.el
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/make-mode.el	Sun Jul 02 14:34:30 2006 +0000
+++ b/lisp/progmodes/make-mode.el	Sun Jul 02 19:01:34 2006 +0000
@@ -294,7 +294,8 @@
   ;; We used to match not just the varname but also the whole value
   ;; (spanning potentially several lines).
   ;; "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)"
-  "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
+  ;; What about the define statement?  What about differentiating this for makepp?
+  "\\(?:^\\|^export\\|^override\\|:\\|: *override\\) *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
   "Regex used to find macro assignment lines in a makefile.")
 
 (defconst makefile-var-use-regex
@@ -320,9 +321,9 @@
   "List of keywords understood by automake.")
 
 (defconst makefile-gmake-statements
-  `("-sinclude" "sinclude" "override" "vpath"
+  `("-sinclude" "sinclude" "vpath"	; makefile-makepp-statements takes rest
     "ifdef" "ifndef" "ifeq" "ifneq" "-include" "define" "endef" "export"
-    "unexport"
+    "override define" "override" "unexport"
     ,@(cdr makefile-automake-statements))
   "List of keywords understood by gmake.")
 
@@ -331,13 +332,14 @@
   `("and ifdef" "and ifndef" "and ifeq" "and ifneq" "and ifperl"
     "and ifmakeperl" "and ifsys" "and ifnsys" "build_cache" "build_check"
     "else ifdef" "else ifndef" "else ifeq" "else ifneq" "else ifperl"
-    "else ifmakeperl" "else ifsys" "else ifnsys" "enddef" "load_makefile"
-    "ifperl" "ifmakeperl" "ifsys" "ifnsys" "_include"  "makeperl" "makesub"
-    "no_implicit_load" "perl" "perl-begin" "perl_begin" "perl-end" "perl_end"
-    "prebuild" "or ifdef" "or ifndef" "or ifeq" "or ifneq" "or ifperl"
-    "or ifmakeperl" "or ifsys" "or ifnsys" "register_command_parser"
+    "else ifmakeperl" "else ifsys" "else ifnsys" "enddef" "global"
+    "load_makefile" "ifperl" "ifmakeperl" "ifsys" "ifnsys" "_include"
+    "makeperl" "makesub" "no_implicit_load" "perl" "perl-begin" "perl_begin"
+    "perl-end" "perl_end" "prebuild" "or ifdef" "or ifndef" "or ifeq"
+    "or ifneq" "or ifperl" "or ifmakeperl" "or ifsys" "or ifnsys"
+    "override export" "override global" "register_command_parser"
     "register_scanner" "repository" "runtime" "signature" "sub"
-    ,@(nthcdr 4 makefile-gmake-statements))
+    ,@(nthcdr 3 makefile-gmake-statements))
   "List of keywords understood by gmake.")
 
 (defconst makefile-bsdmake-statements