From: Juri Linkov Date: Thu, 8 Jul 2021 17:51:15 +0000 (+0300) Subject: Don't turn mouse-1 into mouse-2 when clicking on the tab-line (bug#49247) X-Git-Tag: emacs-28.0.90~1920 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=274e71f5cc33834a08e7bd24418553198cb01f34;p=emacs.git Don't turn mouse-1 into mouse-2 when clicking on the tab-line (bug#49247) * lisp/tab-line.el (tab-line-tab-name-format-default): For 'tab-line-tab-map' add the property 'follow-link' with the value 'ignore'. --- diff --git a/lisp/mouse.el b/lisp/mouse.el index ab260d4ed49..89e5d7c48a3 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1208,7 +1208,7 @@ overlay property, the value of that property determines what to do. for the `follow-link' event, the binding of that event determines what to do. -The resulting value determine whether POS is inside a link: +The resulting value determines whether POS is inside a link: - If the value is `mouse-face', POS is inside a link if there is a non-nil `mouse-face' property at POS. Return t in this case. @@ -2881,8 +2881,8 @@ is copied instead of being cut." (set-marker (nth 2 state) nil)) (with-current-buffer (window-buffer window) (setq cursor-type (nth 3 state))))))) - + ;;; Bindings for mouse commands. (global-set-key [down-mouse-1] 'mouse-drag-region) diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 0d97da8ca71..d5fad353638 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -471,7 +471,10 @@ should return the formatted tab name to display in the tab line." (dolist (fn tab-line-tab-face-functions) (setf face (funcall fn tab tabs face buffer-p selected-p))) (apply 'propertize - (concat (propertize name 'keymap tab-line-tab-map) + (concat (propertize name + 'keymap tab-line-tab-map + ;; Don't turn mouse-1 into mouse-2 (bug#49247) + 'follow-link 'ignore) (or (and (or buffer-p (assq 'buffer tab) (assq 'close tab)) tab-line-close-button-show (not (eq tab-line-close-button-show