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: Trudeau, John
Subject: bug#20787: 24.3; make-mode doesn't hightlight macro assignments preceeded by a TAB
Date: Tue, 23 Feb 2016 18:21:55 +0000

Here is the changed part of the REGEX:

Original:
 *override\\) *

New:
[ \t]*override\\)[ \t]*

This is important for target-specific variable assignment.
Change the `SPACES' to `[\t ]' (TAB SPACE).

Thanks,
John

-----Original Message-----
From: Lars Ingebrigtsen [mailto:address@hidden 
Sent: Tuesday, February 23, 2016 3:07 AM
To: Trudeau, John
Cc: address@hidden
Subject: Re: bug#20787: 24.3; make-mode doesn't hightlight macro assignments 
preceeded by a TAB

"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: 
https://urldefense.proofpoint.com/v2/url?u=http-3A__lars.ingebrigtsen.no&d=BQIBAg&c=wluqKIiwffOpZ6k5sqMWMBOn0vyYnlulRJmmvOXCFpM&r=g4hGb7ya7TWqP8eeUhVvlXxQ2rc8iw5TNL7JTeOc9gI&m=WNK5_pDm2RMy9qGPAFHUiAgYvBKrYL80X_PPIZncXbo&s=VxPNZRd_NEc0l0y2i6qrkcZz2wuSCK9c_Eypq7yoiiQ&e=
 

This e-mail may contain confidential or privileged information. If you think 
you have received this e-mail in error, please advise the sender by reply 
e-mail and then delete this e-mail immediately. Thank you. Aetna





reply via email to

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