From: Mark Walters Date: Tue, 29 Oct 2013 22:55:34 +0000 (+0000) Subject: [PATCH 07/11] emacs: minimal change to autoload notmuch-tree X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8467b9a8d972f6983e63206693874f05ba92d98;p=notmuch-archives.git [PATCH 07/11] emacs: minimal change to autoload notmuch-tree --- diff --git a/b3/d5a1c45ada7de25657bd1095478f7b755beaac b/b3/d5a1c45ada7de25657bd1095478f7b755beaac new file mode 100644 index 000000000..160203507 --- /dev/null +++ b/b3/d5a1c45ada7de25657bd1095478f7b755beaac @@ -0,0 +1,119 @@ +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 38FC4421166 + for ; Tue, 29 Oct 2013 15:56:15 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +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 kCr4gWh5rZ+V for ; + Tue, 29 Oct 2013 15:56:10 -0700 (PDT) +Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com + [74.125.82.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 7A22F429E3D for ; Tue, 29 Oct 2013 15:55:58 -0700 + (PDT) +Received: by mail-wg0-f46.google.com with SMTP id m15so544949wgh.1 + for ; Tue, 29 Oct 2013 15:55:57 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:in-reply-to:references; + bh=A+PwLnMtldeJhb/rZg9jAy8/hSc4JXoviPQRbydeufw=; + b=GrGCVpUfDfzEYbMV1Ieb8oQjHjc5Ecu7f0xcgNWgoFEuW9E1MtnXv4HJeYtgV/1yoF + 5GaUzhyTgc+1g1//VKTLmfocs93R3aoRuPfz77fhi8ND4xaFSzdRT17/DpHu0uSkLMvU + jPI0hmw1mquyurc9xPxLkN6LljZpRL/KptgRJNJZdSAFLcrT/su/+fsESUkX6NZ1lCkY + hwl9Vzl8RMuadnSohE18aG3jdBDa/AbRaTFp4syJ1JL2FjXcViFrZLmOlYjS8KRTBOZN + JPIYlkv1NrajuG+ycZiC/Q9uhZbOpmesQRk3n89AyzrMszTe+T0AWSwEMVJ6nfWbHZon + uXJQ== +X-Received: by 10.194.104.66 with SMTP id gc2mr1516875wjb.75.1383087355795; + Tue, 29 Oct 2013 15:55:55 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id y20sm9518514wib.0.2013.10.29.15.55.55 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Tue, 29 Oct 2013 15:55:55 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 07/11] emacs: minimal change to autoload notmuch-tree +Date: Tue, 29 Oct 2013 22:55:34 +0000 +Message-Id: <1383087338-10220-8-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com> +References: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com> +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: Tue, 29 Oct 2013 22:56:15 -0000 + +We want to autoload notmuch-tree.el so include it as a require in +notmuch.el. To avoid circular dependency we need to move one +keybinding from notmuch-tree.el to notmuch.el: it makes sense for it +to be defined there anyway. + +Since tree is now autoloaded there is no need to print a message when +it is loaded. +--- + emacs/notmuch-tree.el | 3 --- + emacs/notmuch.el | 2 ++ + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el +index d3330a0..ebfb5e7 100644 +--- a/emacs/notmuch-tree.el ++++ b/emacs/notmuch-tree.el +@@ -29,7 +29,6 @@ + (require 'notmuch-show) + (require 'notmuch-tag) + (require 'notmuch-parser) +-(require 'notmuch) ;; XXX ATM, as notmuch-search-mode-map is defined here + + (eval-when-compile (require 'cl)) + (declare-function notmuch-search "notmuch" (&optional query oldest-first target-thread target-line)) +@@ -939,8 +938,6 @@ The arguments are: + + ;; Set up key bindings from the rest of notmuch. + (define-key notmuch-common-keymap "z" 'notmuch-tree) +-(define-key notmuch-search-mode-map "Z" 'notmuch-tree-from-search-current-query) + (define-key notmuch-show-mode-map "Z" 'notmuch-tree-from-show-current-query) +-(message "Initialised notmuch-tree") + + (provide 'notmuch-tree) +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index 19210cb..418c781 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -54,6 +54,7 @@ + (require 'notmuch-lib) + (require 'notmuch-tag) + (require 'notmuch-show) ++(require 'notmuch-tree) + (require 'notmuch-mua) + (require 'notmuch-hello) + (require 'notmuch-maildir-fcc) +@@ -156,6 +157,7 @@ To enter a line break in customize, press \\[quoted-insert] C-j." + (define-key map "-" 'notmuch-search-remove-tag) + (define-key map "+" 'notmuch-search-add-tag) + (define-key map (kbd "RET") 'notmuch-search-show-thread) ++ (define-key map "Z" 'notmuch-tree-from-search-current-query) + map) + "Keymap for \"notmuch search\" buffers.") + (fset 'notmuch-search-mode-map notmuch-search-mode-map) +-- +1.7.9.1 +