From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 31E306DE0350 for ; Fri, 9 Sep 2016 17:38:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.007 X-Spam-Level: X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XA9cUKlnHcMX for ; Fri, 9 Sep 2016 17:38:07 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 4FA516DE034D for ; Fri, 9 Sep 2016 17:38:07 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1biWIx-0001iZ-AG; Fri, 09 Sep 2016 20:37:59 -0400 Received: (nullmailer pid 13645 invoked by uid 1000); Sat, 10 Sep 2016 00:38:03 -0000 From: David Bremner To: Steven Allen , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: use define-derived-mode for defining modes. In-Reply-To: <20160828184122.26002-1-steven@stebalien.com> References: <20160828184122.26002-1-steven@stebalien.com> User-Agent: Notmuch/0.22.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Fri, 09 Sep 2016 21:38:03 -0300 Message-ID: <87sht81tec.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Sat, 10 Sep 2016 00:38:08 -0000 Steven Allen writes: > This sets up and runs all the correct hooks and reduces some redundancy. > --- > emacs/notmuch-hello.el | 8 +------- > emacs/notmuch-show.el | 7 +------ > emacs/notmuch-tree.el | 7 +------ > emacs/notmuch.el | 7 +------ > 4 files changed, 4 insertions(+), 25 deletions(-) > > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el > index 75ccf57..d582bff 100644 > --- a/emacs/notmuch-hello.el > +++ b/emacs/notmuch-hello.el > @@ -671,7 +671,7 @@ with `notmuch-hello-query-counts'." > "Keymap for \"notmuch hello\" buffers.") > (fset 'notmuch-hello-mode-map notmuch-hello-mode-map) > > -(defun notmuch-hello-mode () > +(define-derived-mode notmuch-hello-mode fundamental-mode "notmuch-hello" > "Major mode for convenient notmuch navigation. This is your entry portal into notmuch. The idea seems sane, but shouldn't we derive from special-mode? d