Search the web
Sign In
New User? Sign Up
SubEthaEdit
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Updating the Makefile mode   Message List  
Reply | Forward Message #200 of 212 |
Re: [SubEthaEdit] Updating the Makefile mode


On 15.08.2009, at 15:16, michael_j_barber wrote:

> I've begun adding folding support to the Makefile mode, specifically
> by adding a Command state to indicate the blocks of build commands
> for a target. I have a few questions and observations.
>
> First, the keywords are not colored as I would expect. As a specific
> example of the issue, consider the following two lines:
> SHELL=/bin/sh
> SHELL = /bin/sh
> The SHELL in the first line is colored as a keyword, the SHELL in
> the second is not. Some keywords don't ever seem to be colored. This
> happens with the unmodified Makefile mode as downloaded from the
codingmonkeys.de
> website, before I make any changes. I really don't have any idea
> why this is. The definitions seem consistent with how keywords are
> given in other modes, so I suspect it may have something to do with
> the state definitions.

Is = part of <charsintokens> in your case?


> Second, where should states actually be defined? The C mode has all
> states as substates of the default state. The current Makefile mode
> has a default mode and two other modes (SingleComment and String) at
> the same level. What makes more sense, here?

Usually the default state is a parent to all other states.

> That is, a command block starts with a tab at the beginning of a
> line and ends with a linefeed or carriage return that is not
> followed by a tab. The keywords are imported from the default state,
> and the SingleComment and String states are linked. Note that a
> single <import /> wouldn't work, as it would lead to nested blocks
> instead of keeping consecutive tab-indented lines in the same block.

<import> imports the contents of a state into another. I.e. if you
want to create a state that behave like the default, but with
additional state, import is the way to go. You have to provide a frame
(state/begin/end) to import into.

<state-link> places an existing state as a child into another state.
I.e. if you want to have the string state in another state, with begin/
end conditions intact.


> Should I just accept this edge case, or is there a solution?

I tend to use .(?=[\n\r]) in these cases to have proper state
termination.

Allt the best,
Martin



Wed Aug 19, 2009 3:09 pm

martinpitten...
Offline Offline
Send Email Send Email

Forward
Message #200 of 212 |
Expand Messages Author Sort by Date

I've begun adding folding support to the Makefile mode, specifically by adding a Command state to indicate the blocks of build commands for a target. I have a...
michael_j_barber
michael_j_ba...
Offline Send Email
Aug 16, 2009
3:22 pm

... Is = part of <charsintokens> in your case? ... Usually the default state is a parent to all other states. ... <import> imports the contents of a state into...
Martin Pittenauer
martinpitten...
Offline Send Email
Aug 19, 2009
3:11 pm

... No, it is not. The contents of <charsintokens> is: <![CDATA[_0987654321abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@-.]]> It looks like SHELL...
michael_j_barber
michael_j_ba...
Offline Send Email
Aug 25, 2009
10:31 am

... Indeed I identified this as a bug we will fix for 3.5.1. It causes some keyword groups to not highlight consistently currently. Sorry for that. Took me a...
Martin Pittenauer
martinpitten...
Offline Send Email
Aug 25, 2009
11:09 am

... I noticed similar behavior in the PHP-HTML mode and I filed a bug for it (SEE-3865). As excited as I am for the code folding, I had to downgrade to 3.2.1,...
jtgroth007
Offline Send Email
Aug 19, 2009
3:12 pm

... Not sure these issues are related. I'm sorry for the bug however. We will try to address it for 3.5.1 which should be due in about 2 weeks. All the best, ...
Martin Pittenauer
martinpitten...
Offline Send Email
Aug 19, 2009
3:18 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help