help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to avoid newline insertion / reindentation by sgml-tag (C-c C-t) in


From: David Madore
Subject: How to avoid newline insertion / reindentation by sgml-tag (C-c C-t) in html-mode
Date: Wed, 2 Jan 2019 01:18:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

Dear group,

I only recently upgraded from Emacs 24.5 to 25.1. One of the changes which is causing me considerable pain is that the html-mode (which I use a lot to edit XHTML files) now tries to perform some kind of reindentation whenever a tag is inserted by the sgml-tag (C-c C-t) function. In particular, a line break appears to be inserted whenever there is a following closed tag.

I would like no such reindentation to occur. For example, if I type "C-c C-t em" between <p> and </p> (say), I would just like for "<em>" to be inserted before the point and "</em>" after, with no changes to indentation or anything else, and certainly no extra newline character.

I tried understanding sgml-mode.el but it is way beyond my knowledge of Emacs Lisp; and I don't see in the diff between the 24.5 and 25.1 versions anything pertaining to identation that would explain the difference. I even tried using the 24.5 version of sgml-mode.el but it did not revert to the previous behavior (so I assume the difference comes from somewhere else but I don't even know where to start looking).

Does anybody know how I can revert to the previous behaviour and avoid the spurious insertion of newlines by the sgml-tag function?

Failing that, can anybody suggest some way to get help on this particular issue?

Many thanks in advance for any advice,

--
     David A. Madore
WWW: http://www.madore.org/~david/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]