Skip to content

Commit

Permalink
tweak(builtin): don't exit minibuffer on mouse click
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 16, 2023
1 parent f4a21da commit 396d9ee
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions core/me-builtin.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
;; Show trailing whitespace in `prog-mode' and `conf-mode'
:hook ((prog-mode conf-mode) . +show-trailing-whitespace-h)
:hook (after-save . +save--guess-file-mode-h)
:hook (mouse-leave-buffer . +minibuffer--kill-on-mouse-h)
:custom
;; ====== Default directories for builtin packages ======
(diary-file (concat minemacs-local-dir "diary"))
Expand Down Expand Up @@ -212,13 +211,6 @@ or file path may exist now."
(eq buffer (window-buffer (selected-window))) ;; Only visible buffers
(set-auto-mode)))))

;; Kill the minibuffer when switching by mouse to another window.
;; Adapted from: trey-jackson.blogspot.com/2010/04/emacs-tip-36-abort-minibuffer-when.html
(defun +minibuffer--kill-on-mouse-h ()
"Kill the minibuffer when switching to window with mouse."
(when (and (>= (recursion-depth) 1) (active-minibuffer-window))
(abort-recursive-edit)))

;; Advice `emacs-session-filename' to ensure creating "session.ID" files in a
;; sub-directory
(advice-add
Expand Down

0 comments on commit 396d9ee

Please sign in to comment.