(defvar minibuffer-completion-confirm nil
"Non-nil => demand confirmation of completion before exiting minibuffer.")
-(defvar minibuffer-confirm-incomplete nil
+(defcustom minibuffer-confirm-incomplete nil
"If true, then in contexts where completing-read allows answers which
are not valid completions, an extra RET must be typed to confirm the
-response. This is helpful for catching typos, etc.")
+response. This is helpful for catching typos, etc."
+ :type 'boolean
+ :group 'minibuffer)
(defcustom completion-auto-help t
"*Non-nil means automatically provide help for invalid completion input."
;; `M-x doctor' makes history a local variable, and thus
;; our binding above is buffer-local and doesn't apply
;; once we switch buffers!!!! We demand better scope!
- (_history_ history))
+ (_history_ history)
+ (minibuffer-default default))
(unwind-protect
(progn
(set-buffer (reset-buffer buffer))
If N is negative, find the next or Nth next match."
(interactive
(let ((enable-recursive-minibuffers t)
- (minibuffer-history-sexp-flag nil))
+ (minibuffer-history-sexp-flag nil)
+ (minibuffer-max-depth (and minibuffer-max-depth
+ (1+ minibuffer-max-depth))))
(if (eq 't (symbol-value minibuffer-history-variable))
(error "History is not being recorded in this context"))
(list (read-from-minibuffer "Previous element matching (regexp): "
If N is negative, find the previous or Nth previous match."
(interactive
(let ((enable-recursive-minibuffers t)
- (minibuffer-history-sexp-flag nil))
+ (minibuffer-history-sexp-flag nil)
+ (minibuffer-max-depth (and minibuffer-max-depth
+ (1+ minibuffer-max-depth))))
(if (eq t (symbol-value minibuffer-history-variable))
(error "History is not being recorded in this context"))
(list (read-from-minibuffer "Next element matching (regexp): "
(while (progn
(setq result (completing-read prompt alist nil require-match
nil 'buffer-history
- (if default (buffer-name default))))
+ (if (bufferp default)
+ (buffer-name default)
+ default)))
(cond ((not (equal result ""))
nil)
((not require-match)
read-file-name-map
read-file-name-must-match-map)
nil
- history))
- ))
+ history
+ nil
+ default))))
;;; ;; Kludge! Put "/foo/bar" on history rather than "/default//foo/bar"
;;; (let ((hist (cond ((not history) 'minibuffer-history)
;;; ((consp history) (car history))
This will prompt with a dialog box if appropriate, according to
`should-use-dialog-box-p'.
Value is not expanded---you must call `expand-file-name' yourself.
-Value is subject to interpreted by substitute-in-file-name however.
+Value is subject to interpretation by `substitute-in-file-name' however.
Default name to DEFAULT if user enters a null string.
(If DEFAULT is omitted, the visited file name is used,
except that if INITIAL-CONTENTS is specified, that combined with DIR is