From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH 3/3] emacs: Disable minor modes in 'guix-build-log-mode'. Date: Thu, 29 Oct 2015 23:33:32 +0300 Message-ID: <87611pza77.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrtt5-0000H4-2R for guix-devel@gnu.org; Thu, 29 Oct 2015 16:33:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zrtt3-0006KL-Ua for guix-devel@gnu.org; Thu, 29 Oct 2015 16:33:30 -0400 Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]:33534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrtt3-0006Jj-NW for guix-devel@gnu.org; Thu, 29 Oct 2015 16:33:29 -0400 Received: by lbbec13 with SMTP id ec13so37669199lbb.0 for ; Thu, 29 Oct 2015 13:33:29 -0700 (PDT) Received: from leviafan ([217.107.192.146]) by smtp.gmail.com with ESMTPSA id k1sm625295lbc.28.2015.10.29.13.33.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Oct 2015 13:33:28 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-emacs-Disable-minor-modes-in-guix-build-log-mode.patch >From 4d13ab2a470b39dffa2e3a4c086a6f7237485777 Mon Sep 17 00:00:00 2001 From: Alex Kost 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 --=-=-=--