Mercurial > emacs
comparison lisp/net/mairix.el @ 101809:c47e321c9092
(rmail-buffer): Remove unneeded eval-when-compile.
(rmail-narrow-to-non-pruned-header): Remove autoload.
(mairix-rmail-fetch-field): Handle mbox Rmail.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 05 Feb 2009 06:36:14 +0000 |
parents | a9dc0e7c3f2b |
children | df4934f25eef |
comparison
equal
deleted
inserted
replaced
101808:c7ce5de26833 | 101809:c47e321c9092 |
---|---|
226 | 226 |
227 ;; Display function: | 227 ;; Display function: |
228 (autoload 'rmail "rmail") | 228 (autoload 'rmail "rmail") |
229 (autoload 'rmail-summary-displayed "rmail") | 229 (autoload 'rmail-summary-displayed "rmail") |
230 (autoload 'rmail-summary "rmailsum") | 230 (autoload 'rmail-summary "rmailsum") |
231 (eval-when-compile | 231 (defvar rmail-buffer) |
232 (defvar rmail-buffer)) | |
233 | 232 |
234 (defun mairix-rmail-display (folder) | 233 (defun mairix-rmail-display (folder) |
235 "Display mbox file FOLDER with RMail." | 234 "Display mbox file FOLDER with RMail." |
236 (let (show-summary) | 235 (let (show-summary) |
237 ;; If it exists, select existing RMail window | 236 ;; If it exists, select existing RMail window |
251 ;; Update summary if necessary | 250 ;; Update summary if necessary |
252 (when show-summary | 251 (when show-summary |
253 (rmail-summary)))) | 252 (rmail-summary)))) |
254 | 253 |
255 ;; Fetching mail header field: | 254 ;; Fetching mail header field: |
256 (autoload 'rmail-narrow-to-non-pruned-header "rmail") | |
257 (defun mairix-rmail-fetch-field (field) | 255 (defun mairix-rmail-fetch-field (field) |
258 "Get mail header FIELD for current message using RMail." | 256 "Get mail header FIELD for current message using RMail." |
259 (unless (and (boundp 'rmail-buffer) | 257 (unless (and (boundp 'rmail-buffer) |
260 rmail-buffer) | 258 rmail-buffer) |
261 (error "No RMail buffer available")) | 259 (error "No RMail buffer available")) |
262 (save-excursion | 260 ;; At this point, we are in rmail mode, so the rmail funcs are loaded. |
263 (set-buffer rmail-buffer) | 261 (if (fboundp 'rmail-get-header) ; Emacs 23 |
264 (save-restriction | 262 (rmail-get-header field) |
265 (rmail-narrow-to-non-pruned-header) | 263 (save-excursion |
266 (mail-fetch-field field)))) | 264 (set-buffer rmail-buffer) |
265 (save-restriction | |
266 ;; Don't warn about this when compiling Emacs 23. | |
267 (with-no-warnings (rmail-narrow-to-non-pruned-header)) | |
268 (mail-fetch-field field))))) | |
267 | 269 |
268 ;;; Gnus | 270 ;;; Gnus |
269 (eval-when-compile | 271 (eval-when-compile |
270 (defvar gnus-article-buffer) | 272 (defvar gnus-article-buffer) |
271 (autoload 'gnus-summary-toggle-header "gnus-sum") | 273 (autoload 'gnus-summary-toggle-header "gnus-sum") |