GNU bug report logs - #55234
28.1; replace-string in rectangle regio

Previous Next

Package: emacs;

Reported by: Paulo Sousa <de.sousa.paulus <at> gmail.com>

Date: Mon, 2 May 2022 23:34:02 UTC

Severity: normal

Found in version 28.1

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 55234 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Juri Linkov <juri <at> linkov.net>
Cc: Paulo Sousa <de.sousa.paulus <at> gmail.com>, 55234 <at> debbugs.gnu.org
Subject: Re: bug#55234: 28.1; replace-string in rectangle regio
Date: Sat, 04 Jun 2022 15:20:45 +0200
Juri Linkov <juri <at> linkov.net> writes:

>  (defun rectangle--extract-region (orig &optional delete)
>    (cond
>     ((not rectangle-mark-mode)
>      (funcall orig delete))
>     ((eq delete 'bounds)
> -    (extract-rectangle-bounds (region-beginning) (region-end)))
> +    (extract-rectangle-bounds
> +     ;; Avoid recursive calls
> +     (let (rectangle-mark-mode) (region-beginning))
> +     (let (rectangle-mark-mode) (region-end))))
>     (t
>      (let* ((strs (funcall (if delete
>                                #'delete-extract-rectangle
>                              #'extract-rectangle)
> -                          (region-beginning) (region-end)))
> +                          ;; Avoid recursive calls
> +                          (let (rectangle-mark-mode) (region-beginning))
> +                          (let (rectangle-mark-mode) (region-end))))
>             (str (mapconcat #'identity strs "\n")))
>        (when (eq last-command 'kill-region)
>          ;; Try to prevent kill-region from appending this to some

Is it intended to - at the end - call the original functions here?

TIA,

Michael.




This bug report was last modified 3 years and 41 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.