emacs: Disable minor modes in 'guix-build-log-mode'.

* emacs/guix-build-log.el (guix-build-log-mode-hook): Remove
  'compilation-shell-minor-mode' as it is slow on big buffers, and
  'view-mode' as it rebinds too many keys.
  (guix-build-log-mode-map): Add "c" and "v" key bindings for the
  removed minor modes.
This commit is contained in:
Alex Kost 2015-10-29 21:05:17 +03:00
parent 20ce2fee33
commit c42e6c6c2f
1 changed files with 3 additions and 4 deletions

View File

@ -102,10 +102,7 @@
"Face for the number of seconds for a phase." "Face for the number of seconds for a phase."
:group 'guix-build-log-faces) :group 'guix-build-log-faces)
(defcustom guix-build-log-mode-hook (defcustom guix-build-log-mode-hook '()
;; Not using `compilation-minor-mode' because it rebinds some standard
;; keys, including M-n/M-p.
'(compilation-shell-minor-mode view-mode)
"Hook run after `guix-build-log-mode' is entered." "Hook run after `guix-build-log-mode' is entered."
:type 'hook :type 'hook
:group 'guix-build-log) :group 'guix-build-log)
@ -196,6 +193,8 @@ For `guix-build-log-minor-mode' this map is prefixed with 'C-c'.")
(set-keymap-parent (set-keymap-parent
map (make-composed-keymap (list guix-build-log-common-map) map (make-composed-keymap (list guix-build-log-common-map)
special-mode-map)) special-mode-map))
(define-key map (kbd "c") 'compilation-shell-minor-mode)
(define-key map (kbd "v") 'view-mode)
map) map)
"Keymap for `guix-build-log-mode' buffers.") "Keymap for `guix-build-log-mode' buffers.")