Alonso Andres wrote:
> While editing Scheme code with the Lisp mode enabled (:set lisp), I > have noticed that the command % does not work with parentheses inside > single line comments. This is good, since you might have just one > parenthesis in a commented line and you don't want it to mess up the > matching of parentheses in the source code. > > But vim has a problem when you use an S-expression comment, a style of > comment defined in the Scheme extension SRFI-62 (http:// > srfi.schemers.org/srfi-62/srfi-62.html). It's a straightforward way to > comment a whole expression in Scheme, without the need of commenting > every line. For example, with S-expression comments, you can do this: > > (this is #;(some s-expression > with a commented (expression))) > > Instead of this: > > (this is ;(some s-expression > ;with a commented (expression)) > ) > > Both excerpts will result in the following expression: > > (this is) > > If you position the cursor on the parenthesis right after the '#;' > token and press the key %, Vim won't recognize it as a match and will > mess up the matching of other parentheses. This is because Vim thinks > the parenthesis is inside a comment line, while in fact it is not > (note that '#;' does *not* produce a comment line, while ';' alone > does). > > So I went ahead and tried to find the source of this inconvenience and > fix the code. I created a patch and I'm posting it here. > > I also wondered if this might affect Common Lisp code somehow, but a > line like "#;is this a comment line?" seems to be invalid and triggers > an error in CLISP. > > I hope this might be useful. It makes sense. I don't know Lisp, thus find it difficult to check that this change doesn't break any existing situation. Could you please add some code in a test, or create a new test, so that we can verify it works OK in most situations? -- Send $25.00 for handy leaflet on how to make money by selling leaflets /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
