bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20787: 24.3; make-mode doesn't hightlight macro assignments preceede


From: Lars Ingebrigtsen
Subject: bug#20787: 24.3; make-mode doesn't hightlight macro assignments preceeded by a TAB
Date: Tue, 23 Feb 2016 21:07:19 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

"John F. Trudeau" <address@hidden> writes:

> The constant makefile-macroassign-regex (used for highlighting), in
> make-mode.el, does not find an assignment that is preceded by a TAB
> character.  The attached patch corrects the regular expression to allow
> TAB as well as SPACE before an assignment, which corrects highlighting.
>
>  -rw-r--r-- trudeajo/users       158 ChangeLog
>  -rw-r--r-- trudeajo/users      2101 make-mode.el.patch
>
> This bug has endured through many emacs releases.

I've detarred the patch and included it below, but I can't really say
whether it makes sense or not.  Anybody?

diff -C7 -L /home/trudeajo/.emacs.d/lisp/make-mode.el.gz.\~1\~ -L 
/home/trudeajo/.emacs.d/lisp/make-mode.el.gz /tmp/jka-com58327184q60 
/tmp/jka-com58327184pOK
*** /home/trudeajo/.emacs.d/lisp/make-mode.el.gz.~1~
--- /home/trudeajo/.emacs.d/lisp/make-mode.el.gz
***************
*** 287,301 ****
  ;; that if you change this regexp you might have to fix the imenu index in
  ;; makefile-imenu-generic-expression.
  (defconst makefile-macroassign-regex
    ;; 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\\)*.*\\)\\)"
    ;; 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
    "[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\|address@hidden<?^+*][FD]?\\)"
    "Regex used to find $(macro) uses in a makefile.")
  
  (defconst makefile-ignored-files-in-pickup-regex
--- 287,301 ----
  ;; that if you change this regexp you might have to fix the imenu index in
  ;; makefile-imenu-generic-expression.
  (defconst makefile-macroassign-regex
    ;; 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\\)*.*\\)\\)"
    ;; What about the define statement?  What about differentiating this for 
makepp?
!   "\\(?:^\\|^export\\|^override\\|:\\|:[ \t]*override\\)[ \t]*\\([^ 
\n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
    "Regex used to find macro assignment lines in a makefile.")
  
  (defconst makefile-var-use-regex
    "[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\|address@hidden<?^+*][FD]?\\)"
    "Regex used to find $(macro) uses in a makefile.")
  
  (defconst makefile-ignored-files-in-pickup-regex



-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]