all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Trudeau, John" <JFTrudeau@aetna.com>
To: "'Lars Ingebrigtsen'" <larsi@gnus.org>
Cc: "'20787@debbugs.gnu.org'" <20787@debbugs.gnu.org>
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	[thread overview]
Message-ID: <2C1A2EF90F50254289D2DED9A26B61090E20FD31@PDCPMBXD405.aeth.aetna.com> (raw)
In-Reply-To: <87k2lvu4dk.fsf@gnus.org>

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:larsi@gnus.org] 
Sent: Tuesday, February 23, 2016 3:07 AM
To: Trudeau, John
Cc: 20787@debbugs.gnu.org
Subject: Re: bug#20787: 24.3; make-mode doesn't hightlight macro assignments preceeded by a TAB

"John F. Trudeau" <JFTrudeau@aetna.com> 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_.]+\\|[@%<?^+*][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_.]+\\|[@%<?^+*][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





  parent reply	other threads:[~2016-02-23 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 19:52 bug#20787: 24.3; make-mode doesn't hightlight macro assignments preceeded by a TAB John F. Trudeau
2016-02-23 10:07 ` Lars Ingebrigtsen
2016-02-23 16:16   ` Eli Zaretskii
2016-02-23 18:21   ` Trudeau, John [this message]
2016-02-24  1:21     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2C1A2EF90F50254289D2DED9A26B61090E20FD31@PDCPMBXD405.aeth.aetna.com \
    --to=jftrudeau@aetna.com \
    --cc=20787@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.