Put command line file names and mouse dragging onto 'file-name-history'
* lisp/dnd.el (dnd-open-local-file): Add file to history. * lisp/files.el (file-name-history--add): New function (bug#12915). * lisp/startup.el (command-line-1): Add file to history.
This commit is contained in:
parent
06ee8ac36c
commit
e02576c7eb
4 changed files with 14 additions and 0 deletions
|
@ -1702,6 +1702,10 @@ rather than FUN itself, to `minibuffer-setup-hook'."
|
|||
(list (read-file-name prompt nil default-directory mustmatch)
|
||||
t))
|
||||
|
||||
(defun file-name-history--add (file)
|
||||
"Add FILE to `file-name-history'."
|
||||
(add-to-history 'file-name-history (abbreviate-file-name file)))
|
||||
|
||||
(defun find-file (filename &optional wildcards)
|
||||
"Edit file FILENAME.
|
||||
Switch to a buffer visiting file FILENAME,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue