GNU bug report logs -
#42311
[PATCH] Wrap skeleton logic in atomic-change-group
Previous Next
Reported by: "Philip K." <philip <at> warpmail.net>
Date: Fri, 10 Jul 2020 15:44:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42311 in the body.
You can then email your comments to 42311 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#42311
; Package
emacs
.
(Fri, 10 Jul 2020 15:44:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Philip K." <philip <at> warpmail.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 10 Jul 2020 15:44:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I'm not sure if this is intended, but when expanding a skeleton
(e.g. using sgml-tag), I sometimes change my mind and press C-g. I'm
then left with a half finished HTML tag, like for example
<a id="
that is really never intended. The patch below ensures that all
skeletons are either inserted correctly, or cleaned up as part of an
atomic change group.
I didn't thoroughly investigate each instance of define-skeleton I could
find, but from skimming the places I found examples, it seems like this
change shouldn't break any expected behaviour.
--
Philip K.
[0001-Wrap-skeleton-logic-in-atomic-change-group.patch (text/x-diff, inline)]
From c6dfdffa25e3d64f78f261b4b536dfae4f02a040 Mon Sep 17 00:00:00 2001
From: Philip K <philip <at> warpmail.net>
Date: Fri, 10 Jul 2020 17:37:02 +0200
Subject: [PATCH] Wrap skeleton logic in atomic-change-group
---
lisp/skeleton.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 8c694c128b..3609d6ba6a 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -135,7 +135,8 @@ define-skeleton
A prefix argument of zero says to wrap around zero words---that is, nothing.
This is a way of overriding the use of a highlighted region.")
(interactive "*P\nP")
- (skeleton-proxy-new ',skeleton str arg))))
+ (atomic-change-group
+ (skeleton-proxy-new ',skeleton str arg)))))
;;;###autoload
(defun skeleton-proxy-new (skeleton &optional str arg)
--
2.20.1
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#42311
; Package
emacs
.
(Wed, 05 Aug 2020 14:09:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 42311 <at> debbugs.gnu.org (full text, mbox):
"Philip K." <philip <at> warpmail.net> writes:
> I'm not sure if this is intended, but when expanding a skeleton
> (e.g. using sgml-tag), I sometimes change my mind and press C-g. I'm
> then left with a half finished HTML tag, like for example
>
> <a id="
>
> that is really never intended. The patch below ensures that all
> skeletons are either inserted correctly, or cleaned up as part of an
> atomic change group.
[...]
> - (skeleton-proxy-new ',skeleton str arg))))
> + (atomic-change-group
> + (skeleton-proxy-new ',skeleton str arg)))))
Thanks.
I'm not a heavy user of skeletons, but this looks sensible to me, so
I've applied it to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 05 Aug 2020 14:09:01 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
42311 <at> debbugs.gnu.org and "Philip K." <philip <at> warpmail.net>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 05 Aug 2020 14:09:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 03 Sep 2020 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.