mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-11 14:40:50 +00:00
Fix mouse clicks on directory line in Dired
The option 'dired-kill-when-opening-new-dired-buffer' should be also honored when clicking the mouse to kill prev buffer. * lisp/dired.el (dired--make-directory-clickable): Call 'dired--find-possibly-alternative-file' instead of 'dired', in the click callback. (Bug#67856)
This commit is contained in:
parent
be8a7155b4
commit
fcbb004489
1 changed files with 12 additions and 3 deletions
|
@ -1941,9 +1941,18 @@ mouse-2: visit this file in other window"
|
||||||
keymap ,(let* ((current-dir dir)
|
keymap ,(let* ((current-dir dir)
|
||||||
(click (lambda ()
|
(click (lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (assoc current-dir dired-subdir-alist)
|
(cond
|
||||||
(dired-goto-subdir current-dir)
|
((assoc current-dir dired-subdir-alist)
|
||||||
(dired current-dir)))))
|
(dired-goto-subdir current-dir))
|
||||||
|
;; If there is a wildcard character in the directory, don't
|
||||||
|
;; use the alternate file machinery which tries to keep only
|
||||||
|
;; one dired buffer open at once.
|
||||||
|
;;
|
||||||
|
;; FIXME: Is this code path reachable?
|
||||||
|
((insert-directory-wildcard-in-dir-p current-dir)
|
||||||
|
(dired current-dir))
|
||||||
|
(t
|
||||||
|
(dired--find-possibly-alternative-file current-dir))))))
|
||||||
(define-keymap
|
(define-keymap
|
||||||
"<mouse-2>" click
|
"<mouse-2>" click
|
||||||
"<follow-link>" 'mouse-face
|
"<follow-link>" 'mouse-face
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue