This is actually an FSFmacs synch to make VC work correctly.
(Complete patch for VC to follow tomorrow.) I'd have liked to synch
all the minibuffer stuff, but I guess that'll have to wait until 21.1.
lisp/ChangeLog
1998-05-13 Michael Sperber [Mr. Preprocessor]
<sperber(a)informatik.uni-tuebingen.de>
* minibuf.el (minibuffer-default): Added variable; compatible with
FSF Emacs.
(next-history-element): Used `minibuffer-default'.
Index: lisp/minibuf.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/minibuf.el,v
retrieving revision 1.9
diff -u -r1.9 minibuf.el
--- minibuf.el 1998/04/29 23:03:45 1.9
+++ minibuf.el 1998/05/13 23:29:34
@@ -115,6 +115,9 @@
(defvar minibuffer-help-form nil
"Value that `help-form' takes on inside the minibuffer.")
+(defvar minibuffer-default nil
+ "Default value for minibuffer input.")
+
(defvar minibuffer-local-map
(let ((map (make-sparse-keymap 'minibuffer-local-map)))
map)
@@ -1290,8 +1293,9 @@
initial-minibuffer-history-position)
(setq current-minibuffer-contents (buffer-string)
current-minibuffer-point (point)))
- (let ((narg (- minibuffer-history-position n)))
- (cond ((< narg 0)
+ (let ((narg (- minibuffer-history-position n))
+ (minimum (if minibuffer-default -1 0)))
+ (cond ((< narg minimum)
(error "No following item in %s" minibuffer-history-variable))
((> narg (length (symbol-value minibuffer-history-variable)))
(error "No preceding item in %s" minibuffer-history-variable)))
@@ -1301,8 +1305,10 @@
(progn
(insert current-minibuffer-contents)
(goto-char current-minibuffer-point))
- (let ((elt (nth (1- minibuffer-history-position)
- (symbol-value minibuffer-history-variable))))
+ (let ((elt (if (>= narg 0)
+ (nth (1- minibuffer-history-position)
+ (symbol-value minibuffer-history-variable))
+ minibuffer-default)))
(insert
(if (not (stringp elt))
(let ((print-level nil))
--
Cheers =8-} Chipsy
Friede, Völkerverständigung und überhaupt blabla
Show replies by date