From: Austin Clements <amdragon@MIT.EDU>
To: notmuch@notmuchmail.org
Subject: [PATCH] emacs: Fix byte compile warning on Emacs < 24
Date: Fri, 8 Aug 2014 11:11:20 -0400 [thread overview]
Message-ID: <1407510680-17576-1-git-send-email-amdragon@mit.edu> (raw)
Fix "Warning: the function `window-body-width' is not known to be
defined." by moving our compatibility wrapper before its use.
---
emacs/notmuch-jump.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el
index 05bbce5..35082a6 100644
--- a/emacs/notmuch-jump.el
+++ b/emacs/notmuch-jump.el
@@ -25,6 +25,12 @@
(require 'notmuch-lib)
(require 'notmuch-hello)
+(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)))))
+
;;;###autoload
(defun notmuch-jump-search ()
"Jump to a saved search by shortcut key.
@@ -165,9 +171,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
next reply other threads:[~2014-08-08 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 15:11 Austin Clements [this message]
2014-08-08 17:06 ` [PATCH v2] emacs: Improved compatibility for window-body-width in Emacs < 24 Austin Clements
2014-08-09 10:11 ` Tomi Ollila
2014-08-17 0:48 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407510680-17576-1-git-send-email-amdragon@mit.edu \
--to=amdragon@mit.edu \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).