[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minibuffer default values list

From: Juri Linkov
Subject: Re: Minibuffer default values list
Date: Mon, 19 Nov 2007 02:52:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

Another etc/TODO item I'd like to remove is:

  ** In C-x d, the default if you type RET should be the directory name,
  but if you type M-n you should get the visited file name of the
  current buffer.

and a patch is below:

Index: lisp/dired.el
RCS file: /sources/emacs/emacs/lisp/dired.el,v
retrieving revision 1.372
diff -c -r1.372 dired.el
*** lisp/dired.el       18 Oct 2007 15:59:01 -0000      1.372
--- lisp/dired.el       19 Nov 2007 00:52:04 -0000
*** 595,602 ****
            (if (next-read-file-uses-dialog-p)
                (read-directory-name (format "Dired %s(directory): " str)
                                     nil default-directory nil)
!             (read-file-name (format "Dired %s(directory): " str)
!                             nil default-directory nil)))))
  ;;;###autoload (define-key ctl-x-map "d" 'dired)
--- 591,602 ----
            (if (next-read-file-uses-dialog-p)
                (read-directory-name (format "Dired %s(directory): " str)
                                     nil default-directory nil)
!             (let ((default (and buffer-file-name
!                                 (abbreviate-file-name buffer-file-name))))
!               (minibuffer-with-setup-hook
!                   (lambda () (setq minibuffer-default default))
!                 (read-file-name (format "Dired %s(directory): " str)
!                                 nil default-directory nil)))))))
  ;;;###autoload (define-key ctl-x-map "d" 'dired)

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]