]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cc-langs.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / progmodes / cc-langs.el
index ed3efc66ec256d784f41ca312ca4b8956d2a22c9..f22b75218da20a7821349885c943e836e5a2af0b 100644 (file)
@@ -728,13 +728,14 @@ definition, or nil if the language doesn't have any."
        "define"))
 
 (c-lang-defconst c-opt-cpp-macro-define-start
-  ;; Regexp matching everything up to the macro body of a cpp define,
-  ;; or the end of the logical line if there is none.  Set if
-  ;; c-opt-cpp-macro-define is.
+  ;; Regexp matching everything up to the macro body of a cpp define, or the
+  ;; end of the logical line if there is none.  Submatch 1 is the name of the
+  ;; macro.  Set if c-opt-cpp-macro-define is.
   t (if (c-lang-const c-opt-cpp-macro-define)
        (concat (c-lang-const c-opt-cpp-prefix)
                (c-lang-const c-opt-cpp-macro-define)
-               "[ \t]+\\(\\sw\\|_\\)+\\(\([^\)]*\)\\)?"
+               "[ \t]+\\(\\(\\sw\\|_\\)+\\)\\(\([^\)]*\)\\)?"
+               ;;       ^                 ^ #defined name
                "\\([ \t]\\|\\\\\n\\)*")))
 (c-lang-defvar c-opt-cpp-macro-define-start
   (c-lang-const c-opt-cpp-macro-define-start))