Re: Supress all automatic indentation in SGML mode
[email protected] Sun, 02 Aug 2026 00:35:00 -0400
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
Roger Price <[email protected]> writes: > I use Gnu Emacs 1:30.1 to edit SGML files on Debian 13. Whenever I press= =20 > "Enter" for a new line, the Emacs SGML mode adds two spaces. I find this = useless=20 > and irritating. I would like to suppress all automatic indentation in SG= ML=20 > mode. > I might have misread your post. Where you wrote "...adds two spaces", I interpreted that as two (vertical) spaces, that is, two newlines. The user option =E2=80=98sgml-basic-offset=E2=80=99 likely affects what you want to change. Its description is: sgml-basic-offset is a variable defined in =E2=80=98sgml-mode.el=E2=80= =99. Its value is 2 Specifies the basic indentation level for =E2=80=98sgml-indent-line=E2= =80=99. Try adding: (setopt sgml-basic-offset 0) to your .emacs file. You can also try it in a running Emacs without restarting using: M-: (setopt sgml-basic-offset 0) --=20 The lyf so short, the craft so long to lerne. - Geoffrey Chaucer, The Parliament of Birds.