[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Invalid search bound (wrong side of point)
From: |
Juri Linkov |
Subject: |
Invalid search bound (wrong side of point) |
Date: |
Mon, 31 May 2004 19:33:38 +0300 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
`perform-replace' signals an error even during normal operation such
as replacing a string in the active region with transient mark mode
enabled. This bug can be reproduced by evaluating in the *scratch* buffer:
(progn
(transient-mark-mode 1)
(insert "\na\n\n\n")
(perform-replace "^" " " nil t nil nil nil (- (point) 4) (- (point) 2)))
`perform-replace' uses nil value returned from `re-search-forward'
as a condition to terminate the loop, but when the value of point
becomes greater than limit, "Invalid search bound" error is signalled,
even though `noerror' argument of `re-search-forward' is t.
Generally, this error can be observed by evaluating in this buffer by C-x C-e:
(re-search-forward "abc" (point-min) t)
whereas evaluating the following expression simply returns nil:
(re-search-forward "def" (point-max) t)
It seems that `search_command' should be changed to not signal an
"Invalid search bound" error if its `noerror' argument is non-nil.
--
Juri Linkov
http://www.jurta.org/emacs/
- Invalid search bound (wrong side of point),
Juri Linkov <=