From 0e0963acbfec952c628290173a9ea9eb633322f1 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 15 May 2016 12:56:29 -0400 Subject: [PATCH] org-gnus: Check nnimap-group-overview-filename * lisp/org-gnus.el (org-gnus-nnimap-cached-article-number): Check that nnimap-group-overview-filename, which was removed from Emacs in 2010, is defined before calling. --- lisp/org-gnus.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el index ad703e0e6..f7d6cd72d 100644 --- a/lisp/org-gnus.el +++ b/lisp/org-gnus.el @@ -79,15 +79,17 @@ this variable to t." ;; Implementation -;; FIXME: nnimap-group-overview-filename was removed from Gnus in -;; September 2010. Perhaps remove this function? (defun org-gnus-nnimap-cached-article-number (group server message-id) "Return cached article number (uid) of message in GROUP on SERVER. MESSAGE-ID is the message-id header field that identifies the message. If the uid is not cached, return nil." (with-temp-buffer - (let ((nov (nnimap-group-overview-filename group server))) - (when (file-exists-p nov) + (let ((nov (and (fboundp 'nnimap-group-overview-filename) + ;; nnimap-group-overview-filename was removed from + ;; Gnus in September 2010, and therefore should + ;; only be present in Emacs 23.1. + (nnimap-group-overview-filename group server)))) + (when (and nov (file-exists-p nov)) (mm-insert-file-contents nov) (set-buffer-modified-p nil) (goto-char (point-min))