[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to travel into the future?
From: |
Yuri Khan |
Subject: |
Re: How to travel into the future? |
Date: |
Tue, 14 Feb 2017 16:05:48 +0700 |
On Tue, Feb 14, 2017 at 3:54 PM, Marcin Borkowski <mbork@mbork.pl> wrote:
> I'd like to use in my code the M-n facility in history to enable the
> user to have access to a reasonable default value, as described in
> (info "(emacs) Minibuffer History").
> How should I do it? Should I use read-string? If so, do I have to put
> the default into the history variable and use the (HISTVAR . POSITION)
> argument to read-string? If so, should I then manually delete the
> default (which might have been used or not by the user) from the history
> variable afterwards?
As far as I understand: (describe-function 'read-string)
Fourth arg DEFAULT-VALUE is the default value or the list of default values.
If non-nil, it is used for history commands, and as the value (or the first
element of the list of default values) to return if the user enters the
empty string.