Brace Matching Problem
Brace Matching Problem
I'm trying to use brace matching with the M4 macro language. It works sporadically, probably due to the odd quoting used by M4. For example, in this line (actually 2 lines):
define(`procdivarglist', `ifelse(`$#', `0', , `$#', `1', ``$1'', ``$1'
procdivarglist(shift($@))')')dnl
doing a BraceMatchEx on the first open parenthesis correctly jumps to the last close parenthesis. However, doing a BraceMatchEx on the second open parenthesis jumps to the same place instead of the next-to-last close paren. The statement above is legal M4.
Bill Diener
define(`procdivarglist', `ifelse(`$#', `0', , `$#', `1', ``$1'', ``$1'
procdivarglist(shift($@))')')dnl
doing a BraceMatchEx on the first open parenthesis correctly jumps to the last close parenthesis. However, doing a BraceMatchEx on the second open parenthesis jumps to the same place instead of the next-to-last close paren. The statement above is legal M4.
Bill Diener
-
- Posts: 83
- Joined: Fri Jun 02, 2006 6:52 pm
Bracket matching
Just tried in in 3.97c. Wahoo!! I love it!
Bad news. If it would honor only the string characters defined in the properties of the current syntax (tab "Keywords") then it would be cool and make sense. But having this as a general rule is bad. I am writing code in Autolisp. Braces and single quotes are used there all the time and the single quotes are not considered to be defining a string nor a character. (They have a different purpose.) Now this issue messes up my brace matching which is also essential in that language. Without a solution to this I can not consider this editor an option anymore, which is sad because the rest is pretty good.jussij wrote:This is working as designed.
...
The brace matching code is written to ignore any brace character found inside a string
Do you have an idea for a solution?
Regards, Stephan
If it would honor only the string characters defined in the properties of the current syntax (tab "Keywords") then it would be cool and make sense.
Well that definitely is a bug

I will look to fix this so that the brace matching code honours the string settings of the documentDo you have an idea for a solution?

If you are interested in doing some beta testing on this issue please let me know.
Cheers Jussi
This issue should now be fixed in the latest version found here:
http://www.zeusedit.com/zforum/viewforum.php?f=6
Cheers Jussi
http://www.zeusedit.com/zforum/viewforum.php?f=6
Cheers Jussi
Last edited by jussij on Tue Jun 14, 2011 6:59 am, edited 2 times in total.