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

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

bug#19829: 25.0.50; query-replace in rectangle regions do not honor boun


From: Stefan Monnier
Subject: bug#19829: 25.0.50; query-replace in rectangle regions do not honor boundaries
Date: Wed, 18 Feb 2015 17:56:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> +  (lambda (delete &optional positions)

No: additional *value*, not additional *argument*.

> +  (let (start end)
> +    (move-to-column startcol)
> +    (setq start (point))
> +    (move-to-column endcol)
> +    (setq end (point))
> +    (setcdr positions (cons (cons start end) (cdr positions)))))

Aka
     (move-to-column startcol)
     (let ((start (point)))
       (move-to-column endcol)
       (push (cons start (point)) (cdr positions)))

> +    (apply-on-rectangle 'extract-rectangle-position
                          ^^^
                          #'

You could also inline this function so as to avoid the dummy (list
nil) cell.

> +         ;; Use local binding in add-function below.
> +         (isearch-filter-predicate isearch-filter-predicate)
> +         (rectangular-region-positions nil)

replace.el should not know about rectangles and shouldn't check
rectangle-mark-mode.  It should simply always call
region-extract-function to get the various elements that make up the
"region".


        Stefan





reply via email to

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