diff options
| author | Glenn Morris | 2009-02-05 06:36:14 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-02-05 06:36:14 +0000 |
| commit | c261086e81d0ba86a6faa1cb581072db76d8ed05 (patch) | |
| tree | daadc7ec91fa4417b4259ae1115320254e76c459 | |
| parent | c87626662d69ac3614706f134590b13043847990 (diff) | |
| download | emacs-c261086e81d0ba86a6faa1cb581072db76d8ed05.tar.gz emacs-c261086e81d0ba86a6faa1cb581072db76d8ed05.zip | |
(rmail-buffer): Remove unneeded eval-when-compile.
(rmail-narrow-to-non-pruned-header): Remove autoload.
(mairix-rmail-fetch-field): Handle mbox Rmail.
| -rw-r--r-- | lisp/net/mairix.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el index 22e28b5c886..9fd701954d5 100644 --- a/lisp/net/mairix.el +++ b/lisp/net/mairix.el | |||
| @@ -228,8 +228,7 @@ Currently there are 'threads and 'flags.") | |||
| 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." |
| @@ -253,17 +252,20 @@ Currently there are 'threads and 'flags.") | |||
| 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 |