* bug#16949: 24.3; [PATCH] insert-pair now leaves the point where the docstring says it should
@ 2014-03-06 7:17 Dima Kogan
2016-02-24 2:54 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Dima Kogan @ 2014-03-06 7:17 UTC (permalink / raw)
To: 16949
[-- Attachment #1: Type: text/plain, Size: 198 bytes --]
The docstring of insert-pair states that after insertion, the point ends
up after the opening character. This was not true if the pair was
inserted to surround a region. This small patch fixes it.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-insert-pair-now-behaves-like-its-docstring-says.patch --]
[-- Type: text/x-diff, Size: 1122 bytes --]
From 5ae4b68706e4a1c8daa0bb91602a62911c29a9a8 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima@secretsauce.net>
Date: Wed, 5 Mar 2014 23:10:57 -0800
Subject: [PATCH] insert-pair now behaves like its docstring says
The docstring of insert-pair states that after insertion, the point
ends up after the opening character. This was not true if the pair was
inserted to surround a region
---
lisp/emacs-lisp/lisp.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 0487515..420b205 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -536,7 +536,7 @@ This command assumes point is not in a string or comment."
(if (and transient-mark-mode mark-active)
(progn
(save-excursion (goto-char (region-end)) (insert close))
- (save-excursion (goto-char (region-beginning)) (insert open)))
+ (goto-char (region-beginning)) (insert open))
(if arg (setq arg (prefix-numeric-value arg))
(setq arg 0))
(cond ((> arg 0) (skip-chars-forward " \t"))
--
1.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#16949: 24.3; [PATCH] insert-pair now leaves the point where the docstring says it should
2014-03-06 7:17 bug#16949: 24.3; [PATCH] insert-pair now leaves the point where the docstring says it should Dima Kogan
@ 2016-02-24 2:54 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-24 2:54 UTC (permalink / raw)
To: Dima Kogan; +Cc: 16949
Dima Kogan <gnuplot@dima.secretsauce.net> writes:
> The docstring of insert-pair states that after insertion, the point ends
> up after the opening character. This was not true if the pair was
> inserted to surround a region. This small patch fixes it.
>
>>From 5ae4b68706e4a1c8daa0bb91602a62911c29a9a8 Mon Sep 17 00:00:00 2001
> From: Dima Kogan <dima@secretsauce.net>
> Date: Wed, 5 Mar 2014 23:10:57 -0800
> Subject: [PATCH] insert-pair now behaves like its docstring says
>
> The docstring of insert-pair states that after insertion, the point
> ends up after the opening character. This was not true if the pair was
> inserted to surround a region
> ---
> lisp/emacs-lisp/lisp.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
> index 0487515..420b205 100644
> --- a/lisp/emacs-lisp/lisp.el
> +++ b/lisp/emacs-lisp/lisp.el
> @@ -536,7 +536,7 @@ This command assumes point is not in a string or comment."
> (if (and transient-mark-mode mark-active)
> (progn
> (save-excursion (goto-char (region-end)) (insert close))
> - (save-excursion (goto-char (region-beginning)) (insert open)))
> + (goto-char (region-beginning)) (insert open))
> (if arg (setq arg (prefix-numeric-value arg))
> (setq arg 0))
> (cond ((> arg 0) (skip-chars-forward " \t"))
Thanks; applied to emacs-25.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-24 2:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 7:17 bug#16949: 24.3; [PATCH] insert-pair now leaves the point where the docstring says it should Dima Kogan
2016-02-24 2:54 ` Lars Ingebrigtsen
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).