comparison lisp/minibuf.el @ 434:9d177e8d4150 r21-2-25

Import from CVS: tag r21-2-25
author cvs
date Mon, 13 Aug 2007 11:30:53 +0200
parents a5df635868b2
children 84b14dcb0985
comparison
equal deleted inserted replaced
433:892ca416f0fb 434:9d177e8d4150
413 (oconfig (current-window-configuration)) 413 (oconfig (current-window-configuration))
414 ;; dynamic scope sucks sucks sucks sucks sucks sucks. 414 ;; dynamic scope sucks sucks sucks sucks sucks sucks.
415 ;; `M-x doctor' makes history a local variable, and thus 415 ;; `M-x doctor' makes history a local variable, and thus
416 ;; our binding above is buffer-local and doesn't apply 416 ;; our binding above is buffer-local and doesn't apply
417 ;; once we switch buffers!!!! We demand better scope! 417 ;; once we switch buffers!!!! We demand better scope!
418 (_history_ history)) 418 (_history_ history)
419 (minibuffer-default default))
419 (unwind-protect 420 (unwind-protect
420 (progn 421 (progn
421 (set-buffer (reset-buffer buffer)) 422 (set-buffer (reset-buffer buffer))
422 (setq default-directory dir) 423 (setq default-directory dir)
423 (make-local-variable 'print-escape-newlines) 424 (make-local-variable 'print-escape-newlines)
1443 (buffer-list))) 1444 (buffer-list)))
1444 result) 1445 result)
1445 (while (progn 1446 (while (progn
1446 (setq result (completing-read prompt alist nil require-match 1447 (setq result (completing-read prompt alist nil require-match
1447 nil 'buffer-history 1448 nil 'buffer-history
1448 (if default (buffer-name default)))) 1449 (if (bufferp default)
1450 (buffer-name default)
1451 default)))
1449 (cond ((not (equal result "")) 1452 (cond ((not (equal result ""))
1450 nil) 1453 nil)
1451 ((not require-match) 1454 ((not require-match)
1452 (setq result default) 1455 (setq result default)
1453 nil) 1456 nil)
1546 insert 1549 insert
1547 (if (not must-match) 1550 (if (not must-match)
1548 read-file-name-map 1551 read-file-name-map
1549 read-file-name-must-match-map) 1552 read-file-name-must-match-map)
1550 nil 1553 nil
1551 history)) 1554 history
1552 )) 1555 nil
1556 default))))
1553 ;;; ;; Kludge! Put "/foo/bar" on history rather than "/default//foo/bar" 1557 ;;; ;; Kludge! Put "/foo/bar" on history rather than "/default//foo/bar"
1554 ;;; (let ((hist (cond ((not history) 'minibuffer-history) 1558 ;;; (let ((hist (cond ((not history) 'minibuffer-history)
1555 ;;; ((consp history) (car history)) 1559 ;;; ((consp history) (car history))
1556 ;;; (t history)))) 1560 ;;; (t history))))
1557 ;;; (if (and val 1561 ;;; (if (and val