Copyright (C) 2000-2012 |
GNU Info (elisp)Minibuffer HistoryMinibuffer History ================== A "minibuffer history list" records previous minibuffer inputs so the user can reuse them conveniently. A history list is actually a symbol, not a list; it is a variable whose value is a list of strings (previous inputs), most recent first. There are many separate history lists, used for different kinds of inputs. It's the Lisp programmer's job to specify the right history list for each use of the minibuffer. The basic minibuffer input functions `read-from-minibuffer' and `completing-read' both accept an optional argument named HIST which is how you specify the history list. Here are the possible values: VARIABLE Use VARIABLE (a symbol) as the history list. (VARIABLE . STARTPOS) Use VARIABLE (a symbol) as the history list, and assume that the initial history position is STARTPOS (an integer, counting from zero which specifies the most recent element of the history). If you specify STARTPOS, then you should also specify that element of the history as the initial minibuffer contents, for consistency. If you don't specify HIST, then the default history list `minibuffer-history' is used. For other standard history lists, see below. You can also create your own history list variable; just initialize it to `nil' before the first use. Both `read-from-minibuffer' and `completing-read' add new elements to the history list automatically, and provide commands to allow the user to reuse items on the list. The only thing your program needs to do to use a history list is to initialize it and to pass its name to the input functions when you wish. But it is safe to modify the list by hand when the minibuffer input functions are not using it. Here are some of the standard minibuffer history list variables: - Variable: minibuffer-history The default history list for minibuffer history input. - Variable: query-replace-history A history list for arguments to `query-replace' (and similar arguments to other commands). - Variable: file-name-history A history list for file-name arguments. - Variable: buffer-name-history A history list for buffer-name arguments. - Variable: regexp-history A history list for regular expression arguments. - Variable: extended-command-history A history list for arguments that are names of extended commands. - Variable: shell-command-history A history list for arguments that are shell commands. - Variable: read-expression-history A history list for arguments that are Lisp expressions to evaluate. automatically generated by info2www version 1.2.2.9 |