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 3BFBE431FAF for ; Fri, 8 Aug 2014 10:06:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 5Sq+Mqm4ZudP for ; Fri, 8 Aug 2014 10:06:15 -0700 (PDT) Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu [18.7.68.35]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id E43C5431FAE for ; Fri, 8 Aug 2014 10:06:14 -0700 (PDT) X-AuditID: 12074423-f79bf6d000007580-39-53e5038520de Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP id 38.72.30080.58305E35; Fri, 8 Aug 2014 13:06:13 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id s78H69ps025799; Fri, 8 Aug 2014 13:06:10 -0400 Received: from drake.dyndns.org (26-4-172.dynamic.csail.mit.edu [18.26.4.172]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s78H67Ld014615 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Fri, 8 Aug 2014 13:06:09 -0400 Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1XFncF-0006Ot-26; Fri, 08 Aug 2014 13:06:07 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH v2] emacs: Improved compatibility for window-body-width in Emacs < 24 Date: Fri, 8 Aug 2014 13:06:05 -0400 Message-Id: <1407517565-24490-1-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1407510680-17576-1-git-send-email-amdragon@mit.edu> References: <1407510680-17576-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsUixCmqrNvK/DTYYMd7Xoum6c4W12/OZHZg 8rh1/zW7x7NVt5gDmKK4bFJSczLLUov07RK4Mtaducxa0MdVcWF9SQPjIo4uRk4OCQETiS/P dzFD2GISF+6tZ+ti5OIQEpjNJHF52ysoZwOjxJSWHkaQKiGBw0wS/ydXQCTmMko8XHOLBSTB JqAhsW3/crAiEQFpiZ13Z7N2MXJwMAuYS9xsiQMJCwuESmxpbgErYRFQlbh2uJUdpIRXwEHi 1tNAiCPkJBpufGIDsTkFHCVaD11hgljrILFo/0/WCYz8CxgZVjHKpuRW6eYmZuYUpybrFicn 5uWlFuma6eVmluilppRuYgSFELuL8g7GPweVDjEKcDAq8fAKdD8OFmJNLCuuzD3EKMnBpCTK O+vVk2AhvqT8lMqMxOKM+KLSnNTiQ4wSHMxKIrxPHgHleFMSK6tSi/JhUtIcLErivG+trYKF BNITS1KzU1MLUotgsjIcHEoSvH+ZngYLCRalpqdWpGXmlCCkmTg4QYbzAA1/BVLDW1yQmFuc mQ6RP8WoKCXOGwqSEABJZJTmwfXCYvwVozjQK8K8nMCIF+IBpge47ldAg5mABsuqPgYZXJKI kJJqYLz5sDeanUtIQCOuYK5kn4T9FJfZlyySvpZmGQcoypQ8sz9UfqxPvvrB9RfdvpsMM/0v nWx8+urDga/a6vbzD9ZEGJnuPsGzc2/aWfM9fuUnVeKLrj7ZvroyelHVl9V+h9qW7j3UV6Ms VLrhtpj7JYaEOb01f2t1Y9v2lm0qerf6KEvauziuF0osxRmJhlrMRcWJACqSVG3MAgAA 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: Fri, 08 Aug 2014 17:06:21 -0000 Fix byte compiler warning "Warning: the function `window-body-width' is not known to be defined." by moving our compatibility wrapper before its use and simplify the definition to a defalias for the old name of the function. --- Tomi pointed out that window-body-width simply used to be called window-width, so this simplifies the wrapper to a defalias. emacs/notmuch-jump.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el index 05bbce5..5eb0949 100644 --- a/emacs/notmuch-jump.el +++ b/emacs/notmuch-jump.el @@ -25,6 +25,10 @@ (require 'notmuch-lib) (require 'notmuch-hello) +(unless (fboundp 'window-body-width) + ;; Compatibility for Emacs pre-24 + (defalias 'window-body-width 'window-width)) + ;;;###autoload (defun notmuch-jump-search () "Jump to a saved search by shortcut key. @@ -165,9 +169,3 @@ (defun notmuch-jump--make-keymap (action-map) (setq notmuch-jump--action ',(third action)) (exit-minibuffer)))) map)) - -(unless (fboundp 'window-body-width) - ;; Compatibility for Emacs pre-24 - (defun window-body-width (&optional window) - (let ((edges (window-inside-edges window))) - (- (caddr edges) (car edges))))) -- 2.0.0