comparison lisp/prim/minibuf.el @ 177:6075d714658b r20-3b15

Import from CVS: tag r20-3b15
author cvs
date Mon, 13 Aug 2007 09:51:16 +0200
parents 8eaf7971accc
children acd284d43ca1
comparison
equal deleted inserted replaced
176:6866abce6aaf 177:6075d714658b
45 45
46 (defcustom insert-default-directory t 46 (defcustom insert-default-directory t
47 "*Non-nil means when reading a filename start with default dir in minibuffer." 47 "*Non-nil means when reading a filename start with default dir in minibuffer."
48 :type 'boolean 48 :type 'boolean
49 :group 'minibuffer) 49 :group 'minibuffer)
50
51 (defcustom minibuffer-history-uniquify t
52 "*Non-nil means when adding an item to a minibuffer history, remove
53 previous occurances of the same item from the history list first,
54 rather than just consing the new element onto the front of the list."
55 :type 'boolean
56 :group 'minibuffer)
50 57
51 (defvar minibuffer-completion-table nil 58 (defvar minibuffer-completion-table nil
52 "Alist or obarray used for completion in the minibuffer. 59 "Alist or obarray used for completion in the minibuffer.
53 This becomes the ALIST argument to `try-completion' and `all-completions'. 60 This becomes the ALIST argument to `try-completion' and `all-completions'.
54 61
479 (and (stringp val) 486 (and (stringp val)
480 minibuffer-history-minimum-string-length 487 minibuffer-history-minimum-string-length
481 (< (length val) 488 (< (length val)
482 minibuffer-history-minimum-string-length)) 489 minibuffer-history-minimum-string-length))
483 (set minibuffer-history-variable 490 (set minibuffer-history-variable
484 (cons histval 491 (if minibuffer-history-uniquify
485 (remove histval list)))))) 492 (cons histval (remove histval list))
493 (cons histval list))))))
486 (if err (signal (car err) (cdr err))) 494 (if err (signal (car err) (cdr err)))
487 val)))) 495 val))))
488 ;; stupid display code requires this for some reason 496 ;; stupid display code requires this for some reason
489 (set-buffer buffer) 497 (set-buffer buffer)
490 (buffer-disable-undo buffer) 498 (buffer-disable-undo buffer)
2060 (defcustom force-dialog-box-use nil 2068 (defcustom force-dialog-box-use nil
2061 "*If non-nil, always use a dialog box for asking questions, if possible. 2069 "*If non-nil, always use a dialog box for asking questions, if possible.
2062 You should *bind* this, not set it. This is useful if you're doing 2070 You should *bind* this, not set it. This is useful if you're doing
2063 something mousy but which wasn't actually invoked using the mouse." 2071 something mousy but which wasn't actually invoked using the mouse."
2064 :type 'boolean 2072 :type 'boolean
2065 :group 'minubuffer) 2073 :group 'minibuffer)
2066 2074
2067 ;; We include this here rather than dialog.el so it is defined 2075 ;; We include this here rather than dialog.el so it is defined
2068 ;; even when dialog boxes are not present. 2076 ;; even when dialog boxes are not present.
2069 (defun should-use-dialog-box-p () 2077 (defun should-use-dialog-box-p ()
2070 "If non-nil, questions should be asked with a dialog box instead of the 2078 "If non-nil, questions should be asked with a dialog box instead of the