From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH 2/3] emacs: Restore mode-line after operation prompt. Date: Sun, 09 Nov 2014 11:40:02 +0300 Message-ID: <87fvdsbwd9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnO2d-0002yD-LC for guix-devel@gnu.org; Sun, 09 Nov 2014 03:40:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnO2S-0007hq-L1 for guix-devel@gnu.org; Sun, 09 Nov 2014 03:40:11 -0500 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:39989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnO2S-0007hZ-9x for guix-devel@gnu.org; Sun, 09 Nov 2014 03:40:00 -0500 Received: by mail-lb0-f169.google.com with SMTP id 10so4552549lbg.0 for ; Sun, 09 Nov 2014 00:39:59 -0800 (PST) Received: from leviafan (128-74-164-65.broadband.corbina.ru. [128.74.164.65]) by mx.google.com with ESMTPSA id b4sm4436407lak.28.2014.11.09.00.39.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Nov 2014 00:39:58 -0800 (PST) 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Earlier a prompt =E2=80=9CContinue operation? (y, n, s, d)=E2=80=9D was use= d only with a temporary buffer for package operations and there were no problems with modifying a mode-line there. But now (I mean after the next patch) it is also used to prompt before building a source derivation (as "substitutes" and "dry-run" make sence there too). This patch will handle this case. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-emacs-Restore-mode-line-after-operation-prompt.patch >From 8036ec72ef486c158683ce67a1a5f15056de0cc4 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sun, 9 Nov 2014 11:00:35 +0300 Subject: [PATCH 2/3] emacs: Restore mode-line after operation prompt. * emacs/guix-base.el (guix-operation-prompt): Restore 'mode-line-format' after prompting. --- emacs/guix-base.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/emacs/guix-base.el b/emacs/guix-base.el index 3dda938..784474e 100644 --- a/emacs/guix-base.el +++ b/emacs/guix-base.el @@ -928,7 +928,7 @@ ENTRIES is a list of package entries to get info about packages." (insert "\n"))) (defun guix-operation-prompt () - "Prompt a user for continuing the current package operation. + "Prompt a user for continuing the current operation. Return non-nil, if the operation should be continued; nil otherwise." (let* ((option-keys (mapcar #'guix-operation-option-key guix-operation-options)) @@ -943,9 +943,11 @@ Return non-nil, if the operation should be continued; nil otherwise." keys ", ") ") "))) - (prog1 (guix-operation-prompt-1 prompt keys) - ;; Clear the minibuffer after prompting. - (message "")))) + (let ((mode-line mode-line-format)) + (prog1 (guix-operation-prompt-1 prompt keys) + (setq mode-line-format mode-line) + ;; Clear the minibuffer after prompting. + (message ""))))) (defun guix-operation-prompt-1 (prompt keys) "This function is internal for `guix-operation-prompt'." -- 2.1.2 --=-=-=--