From: Lars Ingebrigtsen <larsi@gnus.org>
To: "John F. Trudeau" <JFTrudeau@aetna.com>
Cc: 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 21:07:19 +1100 [thread overview]
Message-ID: <87k2lvu4dk.fsf@gnus.org> (raw)
In-Reply-To: <tywpzaxbsa.fsf@cvty.com> (John F. Trudeau's message of "Thu, 11 Jun 2015 12:52:53 -0700")
"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: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2016-02-23 10:07 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 [this message]
2016-02-23 16:16 ` Eli Zaretskii
2016-02-23 18:21 ` Trudeau, John
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=87k2lvu4dk.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=20787@debbugs.gnu.org \
--cc=JFTrudeau@aetna.com \
/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.