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 E9441429E21 for ; Mon, 28 Nov 2011 10:12:10 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.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 ICSJoau02OgO for ; Mon, 28 Nov 2011 10:12:10 -0800 (PST) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2725C431FB6 for ; Mon, 28 Nov 2011 10:12:10 -0800 (PST) Received: by bkaq10 with SMTP id q10so9667281bka.26 for ; Mon, 28 Nov 2011 10:12:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=3gHVpLnqY9T6vQ51sMlLpsQNdQputLPznIkSDWoiz9Q=; b=h1D/0IqaHLyuRBI3lcHYLC9AxaAkSlzR7Mt/6gTuPcKVn02M5hzaL9nCXXUmG/zbJu /PSXpcl3jyWhEQU1r5muoC1hZyWNOJD7IPhWsdHu2/kE178KBvdWo7XtzlWWAVe7fW8U UgwI+dLzpm0FjMpD/MlTC93bRoh9qTdXWILzg= Received: by 10.205.126.13 with SMTP id gu13mr46750171bkc.114.1322503928517; Mon, 28 Nov 2011 10:12:08 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id hy13sm31266315bkc.0.2011.11.28.10.12.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Nov 2011 10:12:06 -0800 (PST) From: Dmitry Kurochkin To: Jameson Graef Rollins , notmuch@notmuchmail.org Subject: Re: [PATCH 1/2] emacs: remove some code duplication in notmuch-show In-Reply-To: <87lir0xr3g.fsf@servo.finestructure.net> References: <1322259811-10834-1-git-send-email-dmitry.kurochkin@gmail.com> <87lir0xr3g.fsf@servo.finestructure.net> User-Agent: Notmuch/0.10+45~g5da8b3d (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 28 Nov 2011 22:11:43 +0400 Message-ID: <87mxbgw200.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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, 28 Nov 2011 18:12:11 -0000 Hi Jamie. On Mon, 28 Nov 2011 06:24:19 -0800, Jameson Graef Rollins wrote: > On Sat, 26 Nov 2011 02:23:30 +0400, Dmitry Kurochkin wrote: > > -(defun notmuch-show-get-header (header) > > +(defun notmuch-show-get-header (header &optional props) > > "Return the named header of the current message, if any." > > - (plist-get (notmuch-show-get-prop :headers) header)) > > + (plist-get (notmuch-show-get-prop :headers props) header)) > > Hey, Dmitry. It looks like the new plist-get call is assuming props is > defined, but it looks like it's only optional in the argument list. > Wouldn't the function fail if the props argument is not supplied? > If props is not supplied it is bound to nil. There is no special "undefined" value. Regards, Dmitry > jamie.