* [PATCH 3/3] emacs: Disable minor modes in 'guix-build-log-mode'.
@ 2015-10-29 20:33 Alex Kost
2015-10-30 16:53 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Alex Kost @ 2015-10-29 20:33 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
Initially I thought it's a good idea to enable
'compilation-shell-minor-mode' and 'view-mode' in 'guix-build-log-mode'
by default, but it is probably not, because:
- 'compilation-shell-minor-mode' is very slow on big buffers;
- 'view-mode' binds "c" key which I'd like to bind to the compilation
mode.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-emacs-Disable-minor-modes-in-guix-build-log-mode.patch --]
[-- Type: text/x-patch, Size: 1556 bytes --]
From 4d13ab2a470b39dffa2e3a4c086a6f7237485777 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Thu, 29 Oct 2015 21:05:17 +0300
Subject: [PATCH 3/3] 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.
---
emacs/guix-build-log.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/emacs/guix-build-log.el b/emacs/guix-build-log.el
index 1242607..c43c236 100644
--- a/emacs/guix-build-log.el
+++ b/emacs/guix-build-log.el
@@ -102,10 +102,7 @@
"Face for the number of seconds for a phase."
:group 'guix-build-log-faces)
-(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)
+(defcustom guix-build-log-mode-hook '()
"Hook run after `guix-build-log-mode' is entered."
:type 'hook
:group 'guix-build-log)
@@ -196,6 +193,8 @@ For `guix-build-log-minor-mode' this map is prefixed with 'C-c'.")
(set-keymap-parent
map (make-composed-keymap (list guix-build-log-common-map)
special-mode-map))
+ (define-key map (kbd "c") 'compilation-shell-minor-mode)
+ (define-key map (kbd "v") 'view-mode)
map)
"Keymap for `guix-build-log-mode' buffers.")
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/3] emacs: Disable minor modes in 'guix-build-log-mode'.
2015-10-29 20:33 [PATCH 3/3] emacs: Disable minor modes in 'guix-build-log-mode' Alex Kost
@ 2015-10-30 16:53 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-10-30 16:53 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> From 4d13ab2a470b39dffa2e3a4c086a6f7237485777 Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost@gmail.com>
> Date: Thu, 29 Oct 2015 21:05:17 +0300
> Subject: [PATCH 3/3] 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.
OK.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-30 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29 20:33 [PATCH 3/3] emacs: Disable minor modes in 'guix-build-log-mode' Alex Kost
2015-10-30 16:53 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.