emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Handle case where `beg` and `end` are strings instead of mar


From: Stefan Monnier
Subject: Re: [PATCH] Handle case where `beg` and `end` are strings instead of markers
Date: Fri, 29 Apr 2022 08:55:52 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> +  (let ((beg (if (number-or-marker-p beg)
> +                 beg
> +               (save-excursion
> +                 (goto-char (minibuffer-prompt-end))
> +                 (search-forward beg))))
> +        (end (if (number-or-marker-p end)
> +                 end
> +               (save-excursion
> +                 (goto-char (point-max))
> +                 (search-backward end)))))

What if there are several matches for `beg` and/or for `end` in
the buffer?  How do we know we got the intended one?


        Stefan




reply via email to

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