comparison lisp/prim/minibuf.el @ 100:4be1180a9e89 r20-1b2

Import from CVS: tag r20-1b2
author cvs
date Mon, 13 Aug 2007 09:15:11 +0200
parents dbb370e3c29e
children cca96a509cfe
comparison
equal deleted inserted replaced
99:2d83cbd90d8d 100:4be1180a9e89
401 ;; return value 401 ;; return value
402 (let* ((val (progn (set-buffer buffer) 402 (let* ((val (progn (set-buffer buffer)
403 (if minibuffer-exit-hook 403 (if minibuffer-exit-hook
404 (run-hooks 'minibuffer-exit-hook)) 404 (run-hooks 'minibuffer-exit-hook))
405 (buffer-string))) 405 (buffer-string)))
406 (histval val)
406 (err nil)) 407 (err nil))
407 (if readp 408 (if readp
408 (condition-case e 409 (condition-case e
409 (let ((v (read-from-string val))) 410 (let ((v (read-from-string val)))
410 (if (< (cdr v) (length val)) 411 (if (< (cdr v) (length val))
422 (if (and (symbolp minibuffer-history-variable) 423 (if (and (symbolp minibuffer-history-variable)
423 (boundp minibuffer-history-variable)) 424 (boundp minibuffer-history-variable))
424 (let ((list (symbol-value minibuffer-history-variable))) 425 (let ((list (symbol-value minibuffer-history-variable)))
425 (or (eq list t) 426 (or (eq list t)
426 (null val) 427 (null val)
427 (and list (equal val (car list))) 428 (and list (equal histval (car list)))
428 (and (stringp val) 429 (and (stringp val)
429 minibuffer-history-minimum-string-length 430 minibuffer-history-minimum-string-length
430 (< (length val) 431 (< (length val)
431 minibuffer-history-minimum-string-length)) 432 minibuffer-history-minimum-string-length))
432 (set minibuffer-history-variable (cons val list))))) 433 (set minibuffer-history-variable (cons histval list)))))
433 (if err (signal (car err) (cdr err))) 434 (if err (signal (car err) (cdr err)))
434 val)))) 435 val))))
435 ;; stupid display code requires this for some reason 436 ;; stupid display code requires this for some reason
436 (set-buffer buffer) 437 (set-buffer buffer)
437 (buffer-disable-undo buffer) 438 (buffer-disable-undo buffer)
1702 (delete "." l)))))))) 1703 (delete "." l))))))))
1703 (cond ((eq action 'lambda) 1704 (cond ((eq action 'lambda)
1704 ;; complete? 1705 ;; complete?
1705 (if (not orig) 1706 (if (not orig)
1706 nil 1707 nil
1707 (and (file-directory-p string) 1708 (file-directory-p string)))
1708 ;; So "foo" is ambiguous between "foo/" and "foobar/"
1709 (equal string (file-name-as-directory string)))))
1710 ((eq action 't) 1709 ((eq action 't)
1711 ;; all completions 1710 ;; all completions
1712 (funcall dirs #'(lambda (n) 1711 (funcall dirs #'(lambda (n)
1713 (un-substitute-in-file-name 1712 (un-substitute-in-file-name
1714 (file-name-as-directory n))))) 1713 (file-name-as-directory n)))))