[Openmcl-devel] Tab character in indented Lisp code, turn it off how?
hans at huebner.org
Mon Nov 26 22:14:45 PST 2007
All code style guides that I have come accross in commercial projects
during the years require that no Tabs are present in source files. I
would make indenting using spaces the default.
On Nov 26, 2007 7:08 PM, Gary Byers <gb at clozure.com> wrote:
> On Mon, 26 Nov 2007, Rainer Joswig wrote:
> > Hi,
> > I see that indenting Lisp code inserts tab characters for spaces.
> > I'll guess that there is a switch to turn that off?
> There's a Hemlock variable that contains a function used
> to insert whitespace for indentation. (Somewhat confusingly,
> the name of the variable suggests that tabs would be used
> for indentation; whether they are or not depends on the
> value of that variable):
> ? (hemlock::variable-value hemlock::indent-with-tabs)
> #<Compiled-function HEMLOCK::INDENT-USING-TABS #x3000416FD4EF>
> ? (setf (hemlock::variable-value hemlock::indent-with-tabs) #'hemlock::indent-using-spaces)
> #<Compiled-function HEMLOCK::INDENT-USING-SPACES #x3000416FCF1F>
> ? (hemlock::variable-value hemlock::spaces-per-tab)
> Hemlock variables can be buffer-local (the examples above just
> accessd the global values.) Whatever one may think of the way
> that they're implemented in Hemlock, the concept of buffer-local
> variables (or something very much like them) is certainly useful.
> > Personally I would prefer to not have tab characters
> > in a Lisp file. What do you think?
> It's been about 10 years since I cared either way (long enough that
> I've forgotten why I ever did.)
> I think that most of the reasons for this blissful indifference had
> to do with using an editor that provided a rich set of features
> ("entab", "detab", "set tab width", "use/don't-use tabs", ...)
> for dealing with this. (Even if I rarely had occasion to deal
> with any of it.)
> I don't have any strong opinion about whether the default behavior
> should involve using tabs or not; I do believe that it should be
> easy to change the default behavior and to override the default
> as needed.
> > Tab characters are inserted at least by
> > * Hemlock command: Indent Region
> > * Pressing Tab in a Hemlock window
> > Regards,
> > Rainer Joswig
> > _______________________________________________
> > Openmcl-devel mailing list
> > Openmcl-devel at clozure.com
> > http://clozure.com/mailman/listinfo/openmcl-devel
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel