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

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

bug#7567: Please add a history variable to read-regexp


From: Drew Adams
Subject: bug#7567: Please add a history variable to read-regexp
Date: Mon, 6 Dec 2010 20:09:55 -0800

In answer to a question from Lennart off list I realize that I misunderstood his
request.  In spite of the Subject line, which I think I skipped over, I
mistakenly thought he was just requesting that `read-regexp' use a _different_
history variable (e.g. `read-regexp-history') in its call to
`read-from-minibuffer'.

I didn't realize that he was really requesting that `read-regexp' accept an
additional, optional HISTORY arg, which would be passed to
`read-from-minibuffer' (nil HISTORY would mean to pass `regexp-history', as
now).

Now that I understand, I agree with Lennart.  There is no reason not to let
`read-regexp' be even more general by parameterizing it with a HISTORY
parameter.

Sorry for misunderstanding.  In case others also misunderstood, this is the
idea:

(defun read-regexp (prompt &optional default-value history)
  "...
Non-nil HISTORY is a symbol to use as the history variable.
If HISTORY is nil, `regexp-history' is used."
...)






reply via email to

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