Revert Dired buffer when clicking on basename of directory
* lisp/dired.el (dired--make-directory-clickable): Make clicking on basename of the directory revert the Dired buffer. * etc/NEWS: Announce the change. (Bug#74700)
This commit is contained in:
parent
d181afa5d9
commit
eb9ba4830e
2 changed files with 15 additions and 1 deletions
5
etc/NEWS
5
etc/NEWS
|
@ -685,6 +685,11 @@ Without 'dired-hide-details-hide-absolute-location':
|
|||
|
||||
/absolute/path/to/my/important/project: (100 GiB available)
|
||||
|
||||
---
|
||||
*** Clicking on base name of directory reverts buffer.
|
||||
When 'dired-make-directory-clickable' is non-nil, clicking on the base
|
||||
name of the directory now reverts the Dired buffer.
|
||||
|
||||
** Grep
|
||||
|
||||
+++
|
||||
|
|
|
@ -2082,7 +2082,16 @@ mouse-2: visit this file in other window"
|
|||
"<mouse-2>" click
|
||||
"<follow-link>" 'mouse-face
|
||||
"RET" click))))
|
||||
(setq segment-start (point)))))))
|
||||
(setq segment-start (point)))
|
||||
(when (search-forward ":" bound t)
|
||||
(add-text-properties
|
||||
segment-start (1- (point))
|
||||
`(mouse-face highlight
|
||||
help-echo "mouse-1: re-read this buffer's directory"
|
||||
keymap ,(define-keymap
|
||||
"<mouse-2>" #'revert-buffer
|
||||
"<follow-link>" 'follow-link
|
||||
"RET" #'revert-buffer))))))))
|
||||
|
||||
(defun dired--get-ellipsis-length ()
|
||||
"Return length of ellipsis."
|
||||
|
|
Loading…
Add table
Reference in a new issue