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

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

Re: [make-mode.el] Multi-line font locking not working correctly


From: Daniel Pfeiffer
Subject: Re: [make-mode.el] Multi-line font locking not working correctly
Date: Mon, 06 Jun 2005 21:13:48 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

la 05.06.2005 22:26 Richard Stallman skribis:

I think the only feasible fix for this problem

Alas I got copied in without reference to the actual problem report. Please cite at least the core statement!

is to turn off the new
feature of highlighting the value assigned to the make macro, and go
back to highlighting only the macro name.

It is sort of unfortunate, but I don't know how to fix it any better
than this.
This is very unfortunate, because makefiles have a nasty syntax. The colon is very special, when it occurs at the right spot, but just about anywhere else it's just another character in a string. I help myself like this: Since regexps can hardly match that, all the more since Emacs doesn't have Perl's excluding "(?! ...)" I do this regexp last and check that a colon I find was not highlighted otherwise before. E.g.:

var := a \
b:c

${var:a=b} : x
echo yes: it works

Of these five colons only the one before "x" is special. Without highlighting the multiline string assigned to var "b:c" looks like a rule, as does the last line. And prior to my rework, the colon in ${var:a=b} was also recognized as a rule separator.

*** make-mode.el        03 Jun 2005 06:39:21 -0400      1.100
--- make-mode.el        05 Jun 2005 13:03:07 -0400      
***************
*** 291,297 ****
 ;; that if you change this regexp you might have to fix the imenu index in
 ;; makefile-imenu-generic-expression.
 (defconst makefile-macroassign-regex
!   "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ 
\t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)"
   "Regex used to find macro assignment lines in a makefile.")
(defconst makefile-var-use-regex
--- 291,297 ----
 ;; that if you change this regexp you might have to fix the imenu index in
 ;; makefile-imenu-generic-expression.
 (defconst makefile-macroassign-regex
!   "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
   "Regex used to find macro assignment lines in a makefile.")
(defconst makefile-var-use-regex


coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

--
lerne / learn / apprends / lär dig / ucz się    Esperanto:
                             http://lernu.net/





reply via email to

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