unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Invalid search bound (wrong side of point)
@ 2004-05-31 16:33 Juri Linkov
  2004-05-31 17:02 ` Andreas Schwab
  2004-06-01 14:57 ` Richard Stallman
  0 siblings, 2 replies; 3+ messages in thread
From: Juri Linkov @ 2004-05-31 16:33 UTC (permalink / raw)


`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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-06-01 14:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-31 16:33 Invalid search bound (wrong side of point) Juri Linkov
2004-05-31 17:02 ` Andreas Schwab
2004-06-01 14:57 ` Richard Stallman

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).