* Indenting with spaces and tabs in Emacs Lisp
@ 2019-02-28 8:38 Nicolas Petton
2019-02-28 9:44 ` Robert Pluim
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Nicolas Petton @ 2019-02-28 8:38 UTC (permalink / raw)
To: Emacs Devel
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
Hi,
I've seen that in simple.el indentation is inconsistent, sometimes using
spaces only and sometimes tabs and spaces. Some files seem to have more
consistent indenting using tabs and spaces, though some other files use
only spaces.
I thought that the convention was to use the tabs + spaces style, was I
wrong? I'm pretty sure this is documented somewhere, but I couldn't
find it.
Cheers,
Nico
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Indenting with spaces and tabs in Emacs Lisp
2019-02-28 8:38 Indenting with spaces and tabs in Emacs Lisp Nicolas Petton
@ 2019-02-28 9:44 ` Robert Pluim
2019-02-28 17:50 ` Michael Albinus
2019-02-28 10:18 ` Alan Mackenzie
2019-02-28 17:34 ` Eli Zaretskii
2 siblings, 1 reply; 6+ messages in thread
From: Robert Pluim @ 2019-02-28 9:44 UTC (permalink / raw)
To: Nicolas Petton; +Cc: Emacs Devel
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
Nicolas Petton <nicolas@petton.fr> writes:
> Hi,
>
> I've seen that in simple.el indentation is inconsistent, sometimes using
> spaces only and sometimes tabs and spaces. Some files seem to have more
> consistent indenting using tabs and spaces, though some other files use
> only spaces.
>
> I thought that the convention was to use the tabs + spaces style, was I
> wrong? I'm pretty sure this is documented somewhere, but I couldn't
> find it.
From .dir-locals.el:
(emacs-lisp-mode . ((indent-tabs-mode . nil)
(electric-quote-comment . nil)
(electric-quote-string . nil)))
(I couldn't find this documented either).
Robert
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Indenting with spaces and tabs in Emacs Lisp
2019-02-28 9:44 ` Robert Pluim
@ 2019-02-28 17:50 ` Michael Albinus
0 siblings, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2019-02-28 17:50 UTC (permalink / raw)
To: emacs-devel
Robert Pluim <rpluim@gmail.com> writes:
Hi,
>> I've seen that in simple.el indentation is inconsistent, sometimes using
>> spaces only and sometimes tabs and spaces. Some files seem to have more
>> consistent indenting using tabs and spaces, though some other files use
>> only spaces.
>>
>> I thought that the convention was to use the tabs + spaces style, was I
>> wrong? I'm pretty sure this is documented somewhere, but I couldn't
>> find it.
>
> From .dir-locals.el:
>
> (emacs-lisp-mode . ((indent-tabs-mode . nil)
> (electric-quote-comment . nil)
> (electric-quote-string . nil)))
This is valid for files edited in the Emacs source tree. If they are
merged from somewhere else, like the Tramp files, this doesn't apply.
> Robert
Best regards, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Indenting with spaces and tabs in Emacs Lisp
2019-02-28 8:38 Indenting with spaces and tabs in Emacs Lisp Nicolas Petton
2019-02-28 9:44 ` Robert Pluim
@ 2019-02-28 10:18 ` Alan Mackenzie
2019-02-28 23:09 ` Stefan Monnier
2019-02-28 17:34 ` Eli Zaretskii
2 siblings, 1 reply; 6+ messages in thread
From: Alan Mackenzie @ 2019-02-28 10:18 UTC (permalink / raw)
To: Nicolas Petton; +Cc: Emacs Devel
Hello, Nico.
On Thu, Feb 28, 2019 at 09:38:07 +0100, Nicolas Petton wrote:
> Hi,
> I've seen that in simple.el indentation is inconsistent, sometimes using
> spaces only and sometimes tabs and spaces. Some files seem to have more
> consistent indenting using tabs and spaces, though some other files use
> only spaces.
> I thought that the convention was to use the tabs + spaces style, was I
> wrong? I'm pretty sure this is documented somewhere, but I couldn't
> find it.
I think the general understanding is that there is no consistent pattern
of spaces vs. tabs+spaces in effect, and that this is not an important
thing.
Way back in history, tabs+spaces was, I believe, universal, since it
saved on characters when the amount of RAM and disk space were a minute
fraction of today's.
I would ask, however, that a systematic attempt to convert to a
consistent spaces only is NOT made. This fouls up diffs, giving the
impression of change where there is none.
> Cheers,
> Nico
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Indenting with spaces and tabs in Emacs Lisp
2019-02-28 10:18 ` Alan Mackenzie
@ 2019-02-28 23:09 ` Stefan Monnier
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2019-02-28 23:09 UTC (permalink / raw)
To: emacs-devel
> I think the general understanding is that there is no consistent pattern
> of spaces vs. tabs+spaces in effect, and that this is not an important
> thing.
>
> Way back in history, tabs+spaces was, I believe, universal, since it
> saved on characters when the amount of RAM and disk space were a minute
> fraction of today's.
>
> I would ask, however, that a systematic attempt to convert to a
> consistent spaces only is NOT made. This fouls up diffs, giving the
> impression of change where there is none.
100% agreed.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Indenting with spaces and tabs in Emacs Lisp
2019-02-28 8:38 Indenting with spaces and tabs in Emacs Lisp Nicolas Petton
2019-02-28 9:44 ` Robert Pluim
2019-02-28 10:18 ` Alan Mackenzie
@ 2019-02-28 17:34 ` Eli Zaretskii
2 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2019-02-28 17:34 UTC (permalink / raw)
To: Nicolas Petton; +Cc: emacs-devel
> From: Nicolas Petton <nicolas@petton.fr>
> Date: Thu, 28 Feb 2019 09:38:07 +0100
>
> I've seen that in simple.el indentation is inconsistent, sometimes using
> spaces only and sometimes tabs and spaces. Some files seem to have more
> consistent indenting using tabs and spaces, though some other files use
> only spaces.
We only fix whitespace when making some real changes, that's why you
see inconsistent use of TABs in some Lisp files.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-02-28 23:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-28 8:38 Indenting with spaces and tabs in Emacs Lisp Nicolas Petton
2019-02-28 9:44 ` Robert Pluim
2019-02-28 17:50 ` Michael Albinus
2019-02-28 10:18 ` Alan Mackenzie
2019-02-28 23:09 ` Stefan Monnier
2019-02-28 17:34 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).