[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-source-highlight] conditional highlight (without losing other
From: |
Lorenzo Bettini |
Subject: |
Re: [Help-source-highlight] conditional highlight (without losing other definitions) |
Date: |
Tue, 07 Feb 2012 21:48:11 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0 |
On 02/02/2012 06:09 PM, Federico Bruni wrote:
Hi,
I'm trying to find a smarter way to highlight some strings:
All the "\strings" inside \markup{ ... } should have a different colour
of \strings occurences in other parts of the input.
How can I achieve that in a smart way (i.e. without using a list of all
the \strings which can occur inside a \markup{} block)?
I want to preserve all the other highlighting definitions. Maybe
state|environment is not the right tool? Because in Doc 7.9 it says:
"When entering a state/environment, however, the definitions given
outside the state/environment are not matched. "
Let's do an example:
\markup {
\override #'(box-padding . 1.0) \override #'(baseline-skip . 2.7) \box
\center-column {
\small \line { Sheet music from \with-url #"http://www.MutopiaProject.org"
\line { \teeny www. \hspace #-0.5 MutopiaProject \hspace #-0.5 \teeny
.org \hspace #0.5 }
}
}
}
I want to match only: \override \box \center-column \small \line
\with-url \teeny \hspace
The following environment:
environment markup delim '\\markup\s*\{' "}" multiline nested begin
environment markup delim "{" "}" multiline nested begin
markup_command = '\\[[:alpha:]-]+'
end
end
Hi
what is that - '\\[[:alpha:]-]+' ?
if the strings starting with \ are fixed, you could simply list them
markup_command = "\override","\box" etc.
can see the relevant block and highlight the \strings correctly, but at
the same time it breaks something, in particular some elements lose
their highlighting (as documentations says):
1) \markup
2) {}
3) #......
I didn't understand this, could you please elaborate it?
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net