From: Lars Ingebrigtsen Date: Fri, 6 May 2022 11:45:11 +0000 (+0200) Subject: Remove the P/N/M-p/M-n bindings from the general log-view map X-Git-Tag: emacs-29.0.90~1931^2~22 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=44b5f0cd8732165747880109f7c5783534a3fbb0;p=emacs.git Remove the P/N/M-p/M-n bindings from the general log-view map * 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). --- diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index 9952345db50..c773492c2de 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -134,11 +134,7 @@ "n" #'log-view-msg-next "p" #'log-view-msg-prev "TAB" #'log-view-msg-next - "" #'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) + "" #'log-view-msg-prev) (easy-menu-define log-view-mode-menu log-view-mode-map "Log-View Display Menu." diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 8f06d5a847a..1f81ff2e0fe 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -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 diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 170f5c8d464..0a2b8fa53c3 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -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 diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 1035ee9ce9d..9622bf5e097 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -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