* 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.
\f
* Startup Changes in Emacs 28.1
+---
+** File names given on the command line will now be pushed onto
+'file-name-history'.
+
---
** In GTK builds, Emacs now supports startup notification.
This means that Emacs won't steal keyboard focus upon startup
\f
* Editing Changes in Emacs 28.1
+---
+** Dragging a file to Emacs will now also push the name of the file
+onto 'file-name-history'.
+
+++
** A prefix arg now causes 'delete-other-frames' to only iconify frames.
(if dnd-open-file-other-window
(find-file-other-window f)
(find-file f))
+ (file-name-history--add f)
'private)
(error "Can not read %s" uri))))
(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,
(command-line-normalize-file-name name)
dir))
(buf (find-file-noselect file)))
+ (file-name-history--add file)
(setq displayable-buffers (cons buf displayable-buffers))
;; Set the file buffer to the current buffer so
;; that it will be used with "--eval" and