unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Juri Linkov <juri@linkov.net>
Cc: 52864@debbugs.gnu.org, "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Subject: bug#52864: sgml-tag inserts newlines
Date: Wed, 29 Dec 2021 16:32:56 +0100	[thread overview]
Message-ID: <87wnjn5suv.fsf@gnus.org> (raw)
In-Reply-To: <86bl0z3i81.fsf@mail.linkov.net> (Juri Linkov's message of "Wed,  29 Dec 2021 10:53:18 +0200")

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





  reply	other threads:[~2021-12-29 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-29  2:06 bug#52864: sgml-tag inserts newlines 積丹尼 Dan Jacobson
2021-12-29  8:38 ` Juri Linkov
2021-12-29  8:53   ` Juri Linkov
2021-12-29 15:32     ` Lars Ingebrigtsen [this message]
2021-12-29 17:58       ` Juri Linkov
2021-12-29 18:06         ` Lars Ingebrigtsen
2021-12-29 18:52           ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnjn5suv.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=52864@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).