aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2021-01-30 03:56:27 +0200
committerDmitry Gutov2021-01-30 03:56:47 +0200
commitbbad7904e20ba0366a3397a45fb89de0275bbf28 (patch)
tree3b054ad5495591b6e5dee57e91192753dbb32835
parentf3f6e84ca6f16c243cd1242ca51c333972a4bb9a (diff)
downloademacs-bbad7904e20ba0366a3397a45fb89de0275bbf28.tar.gz
emacs-bbad7904e20ba0366a3397a45fb89de0275bbf28.zip
vc-dir-mode-map: Remove the mouse-2 binding
* lisp/vc/vc-dir.el (vc-dir-mode-map): Remove the mouse-2 binding (bug#13692). (vc-dir-mode): Update the docstring accordingly. (vc-dir-status-mouse-map): New variable. (vc-default-dir-printer): Use it on the state buttons. * lisp/vc/vc-git.el (vc-git-dir-printer): Same.
-rw-r--r--lisp/vc/vc-dir.el11
-rw-r--r--lisp/vc/vc-git.el3
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index bbb73240be2..9d0808c0435 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -300,7 +300,6 @@ See `run-hooks'."
300 (define-key map "\C-o" 'vc-dir-display-file) 300 (define-key map "\C-o" 'vc-dir-display-file)
301 (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) 301 (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process)
302 (define-key map [down-mouse-3] 'vc-dir-menu) 302 (define-key map [down-mouse-3] 'vc-dir-menu)
303 (define-key map [mouse-2] 'vc-dir-toggle-mark)
304 (define-key map [follow-link] 'mouse-face) 303 (define-key map [follow-link] 'mouse-face)
305 (define-key map "x" 'vc-dir-hide-up-to-date) 304 (define-key map "x" 'vc-dir-hide-up-to-date)
306 (define-key map [?\C-k] 'vc-dir-kill-line) 305 (define-key map [?\C-k] 'vc-dir-kill-line)
@@ -1085,7 +1084,6 @@ U - if the cursor is on a file: unmark all the files with the same state
1085 as the current file 1084 as the current file
1086 - if the cursor is on a directory: unmark all child files 1085 - if the cursor is on a directory: unmark all child files
1087 - with a prefix argument: unmark all files 1086 - with a prefix argument: unmark all files
1088mouse-2 - toggles the mark state
1089 1087
1090VC commands 1088VC commands
1091VC commands in the `C-x v' prefix can be used. 1089VC commands in the `C-x v' prefix can be used.
@@ -1392,6 +1390,12 @@ These are the commands available for use in the file status buffer:
1392 (propertize "Please add backend specific headers here. It's easy!" 1390 (propertize "Please add backend specific headers here. It's easy!"
1393 'face 'font-lock-warning-face))) 1391 'face 'font-lock-warning-face)))
1394 1392
1393(defvar vc-dir-status-mouse-map
1394 (let ((map (make-sparse-keymap)))
1395 (define-key map [mouse-2] 'vc-dir-toggle-mark)
1396 map)
1397 "Local keymap for toggling mark.")
1398
1395(defvar vc-dir-filename-mouse-map 1399(defvar vc-dir-filename-mouse-map
1396 (let ((map (make-sparse-keymap))) 1400 (let ((map (make-sparse-keymap)))
1397 (define-key map [mouse-2] 'vc-dir-find-file-other-window) 1401 (define-key map [mouse-2] 'vc-dir-find-file-other-window)
@@ -1418,7 +1422,8 @@ These are the commands available for use in the file status buffer:
1418 ((memq state '(missing conflict)) 'font-lock-warning-face) 1422 ((memq state '(missing conflict)) 'font-lock-warning-face)
1419 ((eq state 'edited) 'font-lock-constant-face) 1423 ((eq state 'edited) 'font-lock-constant-face)
1420 (t 'font-lock-variable-name-face)) 1424 (t 'font-lock-variable-name-face))
1421 'mouse-face 'highlight) 1425 'mouse-face 'highlight
1426 'keymap vc-dir-status-mouse-map)
1422 " " 1427 " "
1423 (propertize 1428 (propertize
1424 (format "%s" filename) 1429 (format "%s" filename)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index a9ee28e3aad..94fac3a83b8 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -481,7 +481,8 @@ or an empty string if none."
481 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face) 481 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face)
482 ((eq state 'missing) 'font-lock-warning-face) 482 ((eq state 'missing) 'font-lock-warning-face)
483 (t 'font-lock-variable-name-face)) 483 (t 'font-lock-variable-name-face))
484 'mouse-face 'highlight) 484 'mouse-face 'highlight
485 'keymap vc-dir-status-mouse-map)
485 " " (vc-git-permissions-as-string old-perm new-perm) 486 " " (vc-git-permissions-as-string old-perm new-perm)
486 " " 487 " "
487 (propertize (vc-git-escape-file-name (vc-dir-fileinfo->name info)) 488 (propertize (vc-git-escape-file-name (vc-dir-fileinfo->name info))