Re: Supress all automatic indentation in SGML mode
[email protected] Sat, 01 Aug 2026 12:47:02 -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 am not a Lisp programmer, so I need a working snippet that I can add to= my=20 > .emacs . I copied this code from a FreeBSD site=C2=A0: > > (setq sgml-mode-hook > '(lambda () > (setq fill-column 70 > indent-tabs-mode nil > next-line-add-newlines nil > standard-indent 0) > (auto-fill-mode t))) >=20=20=20=20=20=20 > but it has no effect. > Using Emacs 30.1, try the following steps: - Start Emacs without any initialization file(s), editing an SGML file: $ emacs -Q temp.sgml - Look up the function that is bound to the <Enter> (or RET) key: C-h c Describe the following key, mouse click, or menu item: RET RET (translated from <return>) runs the command newline Compare what is reported for RET in SGML mode with what is reported in your Emacs (run C-h c again) that is giving the behavior you reported. --=20 The lyf so short, the craft so long to lerne. - Geoffrey Chaucer, The Parliament of Birds.