emacs-devel
[Top][All Lists]
Advanced

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

Re: let HISTORY arg to read functions be a list of history variables


From: Juri Linkov
Subject: Re: let HISTORY arg to read functions be a list of history variables
Date: Mon, 02 Jul 2007 00:01:59 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> Then, for example, you could write this and let users use a regexp from
> either history:
>
> (read-string "Regexp: " nil '(hi-lock-regexp-history regexp-history))

A very easy way to achieve this is following:

(let* ((history-add-new-input nil)
       (history (append hi-lock-regexp-history regexp-history))
       (str (read-string "Prompt: " nil 'history)))
  (add-to-history 'hi-lock-regexp-history str))

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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