Mercurial > hg > xemacs-beta
comparison lisp/prim/minibuf.el @ 24:4103f0995bd7 r19-15b95
Import from CVS: tag r19-15b95
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:03 +0200 |
parents | 859a2309aef8 |
children | 56c54cf7c5b6 |
comparison
equal
deleted
inserted
replaced
23:0edd3412f124 | 24:4103f0995bd7 |
---|---|
405 ;; return value | 405 ;; return value |
406 (let* ((val (progn (set-buffer buffer) | 406 (let* ((val (progn (set-buffer buffer) |
407 (if minibuffer-exit-hook | 407 (if minibuffer-exit-hook |
408 (run-hooks 'minibuffer-exit-hook)) | 408 (run-hooks 'minibuffer-exit-hook)) |
409 (buffer-string))) | 409 (buffer-string))) |
410 (histval val) | |
410 (err nil)) | 411 (err nil)) |
411 (if readp | 412 (if readp |
412 (condition-case e | 413 (condition-case e |
413 (let ((v (read-from-string val))) | 414 (let ((v (read-from-string val))) |
414 (if (< (cdr v) (length val)) | 415 (if (< (cdr v) (length val)) |
426 (if (and (symbolp minibuffer-history-variable) | 427 (if (and (symbolp minibuffer-history-variable) |
427 (boundp minibuffer-history-variable)) | 428 (boundp minibuffer-history-variable)) |
428 (let ((list (symbol-value minibuffer-history-variable))) | 429 (let ((list (symbol-value minibuffer-history-variable))) |
429 (or (eq list t) | 430 (or (eq list t) |
430 (null val) | 431 (null val) |
431 (and list (equal val (car list))) | 432 (and list (equal histval (car list))) |
432 (and (stringp val) | 433 (and (stringp val) |
433 minibuffer-history-minimum-string-length | 434 minibuffer-history-minimum-string-length |
434 (< (length val) | 435 (< (length val) |
435 minibuffer-history-minimum-string-length)) | 436 minibuffer-history-minimum-string-length)) |
436 (set minibuffer-history-variable (cons val list))))) | 437 (set minibuffer-history-variable (cons histval list))))) |
437 (if err (signal (car err) (cdr err))) | 438 (if err (signal (car err) (cdr err))) |
438 val)))) | 439 val)))) |
439 ;; stupid display code requires this for some reason | 440 ;; stupid display code requires this for some reason |
440 (set-buffer buffer) | 441 (set-buffer buffer) |
441 (buffer-disable-undo buffer) | 442 (buffer-disable-undo buffer) |
1706 (delete "." l)))))))) | 1707 (delete "." l)))))))) |
1707 (cond ((eq action 'lambda) | 1708 (cond ((eq action 'lambda) |
1708 ;; complete? | 1709 ;; complete? |
1709 (if (not orig) | 1710 (if (not orig) |
1710 nil | 1711 nil |
1711 (and (file-directory-p string) | 1712 (file-directory-p string))) |
1712 ;; So "foo" is ambiguous between "foo/" and "foobar/" | |
1713 (equal string (file-name-as-directory string))))) | |
1714 ((eq action 't) | 1713 ((eq action 't) |
1715 ;; all completions | 1714 ;; all completions |
1716 (funcall dirs #'(lambda (n) | 1715 (funcall dirs #'(lambda (n) |
1717 (un-substitute-in-file-name | 1716 (un-substitute-in-file-name |
1718 (file-name-as-directory n))))) | 1717 (file-name-as-directory n))))) |