On Jan 6, 12:19 pm, Erik Falor <[email protected]> wrote: > > I believe that the inclusion of the runtime! directive within > ftplugin/scheme.vim is inappropriate, and should be reconsidered. > However, the greater error is that ftplugin/scheme.vim does not > contain the traditional > > if exists("b:did_ftplugin") > finish > endif > > stanza, and its omission does not allow the user to prevent the > loading of the extra lisp scripts through the intervention of their > own ~/.vim/ftplugin/scheme.vim. >
I'm not familiar enough with either scheme or plain Lisp (Common Lisp?) to comment on whether the inclusion is appropriate. I assume the plugin author did it for a reason. > > Scheme IS Lisp. > > >http://en.wikipedia.org/wiki/Scheme_(programming_language) says, > > "Scheme is one of the two main dialects of the programming language > > Lisp." > > I don't disagree with this statement in light of Scheme's pedigree, > but from a text-editor point of view this conflation is not helpful. > > I don't know how familiar you are with Lisp and Scheme, so don't think > that I'm trying to sound at all patronizing. Some of Scheme's > primitive functions share names with Common Lisp's, and the syntax of > both are S-Expressions, but these are merely superficial similarities. > > I contend that Scheme has diverged enough from Lisp to be considered a > language in its own right. You may as well insist that all > Algol-descended imperative languages which use curly-braces to denote > blocks also source ftplugin/c.vim. > Fair enough. I am actually somewhat surprised the scheme plugin depends on some Lisp plugins, but as I said before I assume there are reasons for it to do so. > > It should be completely possible for the plugin author to set some > > global or buffer-local variable to indicate which language is actually > > being used (or maybe just check the 'filetype' option) and act > > accordingly. This is a plugin bug, not a Vim bug. > > To be clear, there is currently no acceptable way for a Scheme > programmer to avoid loading the Lisp filetype plugins. > This may be true. But the OP's issue as I understand it, is that the slimv plugin has content for both Lisp and scheme, and does not take any steps to prevent both from being used together, or to make sure both being used together does not cause problems. Since the official runtime files always source both lisp and scheme together, I maintain that the slimv author ought to have taken steps to only load one or the other based on filetype or some other method. > Even if I remain in the minority in my belief that Scheme and Lisp are > different languages, we can at the very least modify the > distribution's scheme filetype plugin to allow the user to completely > override it. > I would certainly support this. My point was not that scheme MUST source the Lisp files, only that it is not incorrect for it to do so, so the slimv plugin author should make his/her plugin work with the existing runtime, at least for the time being. > Here's the patch to do that: > > diff -r 3ee9e0ab0413 runtime/ftplugin/scheme.vim > --- a/runtime/ftplugin/scheme.vim Wed Jan 04 20:29:22 2012 +0100 > +++ b/runtime/ftplugin/scheme.vim Fri Jan 06 11:12:47 2012 -0700 > @@ -4,7 +4,12 @@ > " URL: http://iamphet.nm.ru/vim > " Original author: Dorai Sitaram <[email protected]> > " Original URL: > http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html > -" Last Change: Nov 22, 2004 > +" Last Change: Jan 06, 2012 > + > +" Only do this when not done yet for this buffer > +if exists("b:did_ftplugin") > + finish > +endif > > runtime! ftplugin/lisp.vim ftplugin/lisp_*.vim ftplugin/lisp/*.vim > > Regards, > Erik > > -- > Erik Falor -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
