From 53cf31f879811389b030d5af7a90aa823ce35bde Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Thu, 26 Dec 2024 17:19:41 +0530 Subject: [PATCH] Ensure Dired window is selected when reverting buffer * lisp/dired.el (dired--make-directory-clickable): Ensure the Dired window is selected. This prevents erroneously reverting a non-Dired buffer. (Bug#74700) --- lisp/dired.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 9895229694a..9632858703c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2089,8 +2089,10 @@ dired--make-directory-clickable `(mouse-face highlight help-echo "mouse-1: re-read this buffer's directory" keymap ,(define-keymap - "" #'revert-buffer - "" 'follow-link + "" (lambda () + (interactive "@") + (revert-buffer)) + "" 'mouse-face "RET" #'revert-buffer)))))))) (defun dired--get-ellipsis-length () -- 2.45.2