bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16949: 24.3; [PATCH] insert-pair now leaves the point where the docs


From: Lars Ingebrigtsen
Subject: bug#16949: 24.3; [PATCH] insert-pair now leaves the point where the docstring says it should
Date: Wed, 24 Feb 2016 13:54:47 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]