GNU bug report logs -
#46088
26.3; doc string of `read-regexp'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sun, 24 Jan 2021 23:27:01 UTC
Severity: minor
Tags: fixed
Found in version 26.3
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Drew Adams <drew.adams <at> oracle.com> writes:
> A. This is unclear, to me:
>
> If DEFAULTS is a non-nil symbol, then if `read-regexp-defaults-function'
> is non-nil, we use that in place of DEFAULTS in the following:
> If DEFAULTS is the symbol `regexp-history-last', we use the first
> element of HISTORY (if specified) or `regexp-history'.
> If DEFAULTS is a function, we call it with no arguments and use
> what it returns, which should be either nil, a string, or a list of strings.
That is pretty hard to parse, but the semantics are pretty convoluted,
too. It's saying that if DEFAULTS is a symbol, then the actual value
used comes from `read-regexp-defaults-function' in the two cases
described. That is, if `read-regexp-defaults-function' is non-nil.
I've now tried to reformulate this in Emacs 28, but it's a case of the
code being easier to read than trying to actually describe the semantics.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 114 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.