[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52864: sgml-tag inserts newlines
From: |
Lars Ingebrigtsen |
Subject: |
bug#52864: sgml-tag inserts newlines |
Date: |
Wed, 29 Dec 2021 16:32:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Juri Linkov <juri@linkov.net> writes:
>> (add-hook 'sgml-mode-hook
>> (lambda ()
>> ;; Don't insert newlines after <tag></tag>
>> (setq-local skeleton-end-newline nil)))
>>
>> Then maybe 'skeleton-end-newline' should be mentioned
>> in the docstring of 'sgml-tag', or maybe even 'sgml-mode'.
>
> Or better to add a new customizable variable
> that defaults to skeleton-end-newline, e.g.
>
> (defcustom sgml-tag-end-newline skeleton-end-newline
> ...
Doesn't it depend on what tag you're inserting whether it's likely you
want to have a newline at the end, though? The more "block"-like tags
would normally be preferably have a newline at the end, while others
don't.
On the other hand, if you're inserting a tag in the middle of the line,
you probably don't want to insert a newline, I think? So perhaps just
adding that defcustom is the right option...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no