[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/diffview 47a1ac8 2/2: * diffview.el (diffview-mode-map)
From: |
Stefan Monnier |
Subject: |
[elpa] externals/diffview 47a1ac8 2/2: * diffview.el (diffview-mode-map): Define explicitly |
Date: |
Fri, 27 Nov 2020 18:27:30 -0500 (EST) |
branch: externals/diffview
commit 47a1ac817c48c7336b8cb16913dee1c1a7b8fd06
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* diffview.el (diffview-mode-map): Define explicitly
---
diffview.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/diffview.el b/diffview.el
index 2455c67..a684b05 100644
--- a/diffview.el
+++ b/diffview.el
@@ -173,11 +173,13 @@ This is useful for reading patches from mailing lists."
(setq end (1+ (point)))
(diffview--view-string (buffer-substring beg end)))))
+(defvar diffview-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "q") 'diffview--quit)
+ map))
-
-;;; You probably don't want to invoke `diffview-mode' directly. Just use
-;;; one of the autoload functions above.
-
+;; You probably don't want to invoke `diffview-mode' directly. Just use
+;; one of the autoload functions above.
(define-derived-mode diffview-mode special-mode "Diffview"
"Mode for viewing diffs side-by-side"
(setq font-lock-defaults '(diff-font-lock-keywords t nil nil nil
(font-lock-multiline . nil))))
@@ -193,8 +195,6 @@ This is useful for reading patches from mailing lists."
(if minusbuf (kill-buffer minusbuf)))
(set-window-configuration diffview--saved-wincfg))
-(define-key diffview-mode-map (kbd "q") 'diffview--quit)
-
(provide 'diffview)
;;; diffview.el ends here
;;