Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5C64C40DBC8 for ; Mon, 15 Nov 2010 05:51:00 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fOIwaNxAF+sV for ; Mon, 15 Nov 2010 05:50:49 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by olra.theworths.org (Postfix) with ESMTP id 474F540DBDA for ; Mon, 15 Nov 2010 05:50:42 -0800 (PST) Received: by wwb31 with SMTP id 31so2594981wwb.2 for ; Mon, 15 Nov 2010 05:50:41 -0800 (PST) Received: by 10.227.153.21 with SMTP id i21mr6138428wbw.26.1289829041048; Mon, 15 Nov 2010 05:50:41 -0800 (PST) Received: from ut.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com [81.149.164.25]) by mx.google.com with ESMTPS id f14sm5070297wbe.8.2010.11.15.05.50.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 05:50:38 -0800 (PST) Received: by ut.hh.sledj.net (Postfix, from userid 1000) id DA1DB59405B; Mon, 15 Nov 2010 13:48:18 +0000 (GMT) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH 2/2] emacs: notmuch-show-mode should force less behaviour. Date: Mon, 15 Nov 2010 13:48:15 +0000 Message-Id: <1289828895-7594-2-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <87wroeya0o.fsf@ut.hh.sledj.net> References: <87wroeya0o.fsf@ut.hh.sledj.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 13:51:00 -0000 Move the enabling of `goto-address-mode' and `visual-line-mode' to `notmuch-show-hook' in order that a user may choose to not use them. --- emacs/notmuch-show.el | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 002c2fd..c9d086c 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -69,7 +69,14 @@ any given message." "A list of functions called to decorate the headers listed in `notmuch-message-headers'.") -(defcustom notmuch-show-hook nil +(defun notmuch-show-turn-on-goto-address-mode () + (goto-address-mode t)) + +(defun notmuch-show-turn-on-visual-line-mode () + (visual-line-mode t)) + +(defcustom notmuch-show-hook '(notmuch-show-turn-on-goto-address-mode + notmuch-show-turn-on-visual-line-mode) "Functions called after populating a `notmuch-show' buffer." :group 'notmuch :type 'hook) @@ -648,12 +655,6 @@ function is used. " (notmuch-show-insert-forest (notmuch-query-get-threads basic-args)))) - ;; Enable buttonisation of URLs and email addresses in the - ;; buffer. - (goto-address-mode t) - ;; Act on visual lines rather than logical lines. - (visual-line-mode t) - (run-hooks 'notmuch-show-hook)) ;; Move straight to the first open message -- 1.7.2.3