diff options
author | Philip K <philip@warpmail.net> | 2020-08-05 16:07:41 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-05 16:07:41 +0200 |
commit | b22b1f935d47c71b59d59da1b6d125635470beca (patch) | |
tree | 6c815fb001a488b1cc4d4d07b933dd4b36bcc012 /lisp/skeleton.el | |
parent | 7389a9ef0954d61bf5a85221da7c919aee3451a0 (diff) | |
download | emacs-b22b1f935d47c71b59d59da1b6d125635470beca.tar.gz emacs-b22b1f935d47c71b59d59da1b6d125635470beca.tar.bz2 emacs-b22b1f935d47c71b59d59da1b6d125635470beca.zip |
Wrap skeleton logic in atomic-change-group
* lisp/skeleton.el (define-skeleton): Use an atomic change group
so that if the user `C-g's in the middle of it, we're not left
with half a skeleton in the buffer (bug#42311).
Diffstat (limited to 'lisp/skeleton.el')
-rw-r--r-- | lisp/skeleton.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 8c694c128b5..3609d6ba6a0 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -135,7 +135,8 @@ A prefix argument of -1 says to wrap around region, even if not highlighted. 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) |