Function: dired-update-file-line
dired-update-file-line is a byte-compiled function defined in
dired-aux.el.gz.
Signature
(dired-update-file-line FILE)
Source Code
;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
(defun dired-update-file-line (file)
;; Delete the current line, and insert an entry for FILE.
;; If FILE is nil, then just delete the current line.
;; Keeps any marks that may be present in column one (doing this
;; here is faster than with dired-add-entry's optional arg).
;; Does not update other dired buffers. Use dired-relist-entry for that.
(let* ((opoint (line-beginning-position))
(char (char-after opoint))
(buffer-read-only))
(delete-region opoint (progn (forward-line 1) (point)))
(if file
(progn
(dired-add-entry file nil t)
;; Replace space by old marker without moving point.
;; Faster than goto+insdel inside a save-excursion?
(when char
(subst-char-in-region opoint (1+ opoint) ?\s char)))))
(dired-move-to-filename))