[Top][All Lists]

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

Re: HIST to read-from-minibuffer

From: Juri Linkov
Subject: Re: HIST to read-from-minibuffer
Date: Tue, 25 May 2010 20:54:20 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

>> (let ((hist '("a" "b" "c")))
>>   (read-from-minibuffer "Prompt: " nil nil nil '(hist . 2)))
>> M-p => "c"
> I think I don't understand this sentence:
> "Positions are counted starting from 1 at the beginning of the list."
> I thought HIST is a 1-based list, but it is still 0-based. Could you
> make the doc-string a bit clearer? Thanks.

It is 1-based.

> For example, 0 works just fine:
>  (let ((hist '("a" "b" "c")))
>    (read-from-minibuffer "Prompt: " nil nil nil '(hist . 0)))
> M-p => "a"

"a" is the 1st element of HIST.  M-p moves to the 1st history element here.

Juri Linkov

reply via email to

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