]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove the P/N/M-p/M-n bindings from the general log-view map
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 6 May 2022 11:45:11 +0000 (13:45 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 6 May 2022 11:45:11 +0000 (13:45 +0200)
* lisp/vc/log-view.el (log-view-mode-map): Remove the P/N/M-p/M-n
bindings (that are only usable in some VCs).
* lisp/vc/vc-sccs.el (vc-sccs-log-view-mode):
* lisp/vc/vc-rcs.el (vc-rcs-log-view-mode):
* lisp/vc/vc-cvs.el (vc-cvs-log-view-mode): New modes that bind
the P/N/M-p/M-n commands (bug#14531).

lisp/vc/log-view.el
lisp/vc/vc-cvs.el
lisp/vc/vc-rcs.el
lisp/vc/vc-sccs.el

index 9952345db50dd1e653117fb5ed60488f1409441d..c773492c2decebe2ddbd882d35532a3d313bd6f3 100644 (file)
   "n" #'log-view-msg-next
   "p" #'log-view-msg-prev
   "TAB" #'log-view-msg-next
-  "<backtab>" #'log-view-msg-prev
-  "N" #'log-view-file-next
-  "P" #'log-view-file-prev
-  "M-n" #'log-view-file-next
-  "M-p" #'log-view-file-prev)
+  "<backtab>" #'log-view-msg-prev)
 
 (easy-menu-define log-view-mode-menu log-view-mode-map
   "Log-View Display Menu."
index 8f06d5a847a3e33ef2c9d720a3dc59d2cb829bcd..1f81ff2e0fed1f4a8c492f95005eb104e5a9b171 100644 (file)
@@ -26,6 +26,7 @@
 
 (require 'vc-rcs)
 (eval-when-compile (require 'vc))
+(require 'log-view)
 
 (declare-function vc-checkout "vc" (file &optional rev))
 (declare-function vc-expand-dirs "vc" (file-or-dir-list backend))
@@ -1257,6 +1258,14 @@ ignore file."
         (if sort (sort-lines nil (point-min) (point-max)))
         (save-buffer)))))
 
+(defvar-keymap vc-cvs-log-view-mode-map
+  "N" #'log-view-file-next
+  "P" #'log-view-file-prev
+  "M-n" #'log-view-file-next
+  "M-p" #'log-view-file-prev)
+
+(define-derived-mode vc-cvs-log-view-mode log-view-mode "CVS-Log-View")
+
 (provide 'vc-cvs)
 
 ;;; vc-cvs.el ends here
index 170f5c8d4641f4cc4c109413232bdbbb58e7fed4..0a2b8fa53c3eb5c833fc4b3e6f75eab166aaed2a 100644 (file)
@@ -40,6 +40,7 @@
 (eval-when-compile
   (require 'cl-lib)
   (require 'vc))
+(require 'log-view)
 
 (declare-function vc-read-revision "vc"
                   (prompt &optional files backend default initial-input))
@@ -1456,6 +1457,14 @@ The `:insn' key is a keyword to distinguish it as a vc-rcs.el extension."
       `((headers ,desc ,@headers)
         (revisions ,@revs)))))
 
+(defvar-keymap vc-rcs-log-view-mode-map
+  "N" #'log-view-file-next
+  "P" #'log-view-file-prev
+  "M-n" #'log-view-file-next
+  "M-p" #'log-view-file-prev)
+
+(define-derived-mode vc-rcs-log-view-mode log-view-mode "RCS-Log-View")
+
 (provide 'vc-rcs)
 
 ;;; vc-rcs.el ends here
index 1035ee9ce9d9035847b13b004d62300d74082bd7..9622bf5e0978cedb0b96a79c980b1874cecdb3eb 100644 (file)
@@ -27,6 +27,7 @@
 
 (eval-when-compile
   (require 'vc))
+(require 'log-view)
 
 ;;;
 ;;; Customization options
@@ -518,6 +519,14 @@ If NAME is nil or a revision number string it's just passed through."
                         (file-name-directory (vc-master-name file))))
       (vc-parse-buffer (concat name "\t:\t" file "\t\\(.+\\)") 1))))
 
+(defvar-keymap vc-sccs-log-view-mode-map
+  "N" #'log-view-file-next
+  "P" #'log-view-file-prev
+  "M-n" #'log-view-file-next
+  "M-p" #'log-view-file-prev)
+
+(define-derived-mode vc-sccs-log-view-mode log-view-mode "SCCS-Log-View")
+
 (provide 'vc-sccs)
 
 ;;; vc-sccs.el ends here