From 89083cd6375c860199b6c3bd1ebdefe106474e43 Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 7 Jun 1998 11:52:18 +0000 Subject: [PATCH] When it is compiled, require 'bbdb or define `bbdb-buffer-name' to avoid compiler warning. (mime-method-to-display-caesar): Abolish unused local variable; avoid problem of `mime-text-insert-decoded-body'. Use `eval-buffer' to eval contents of `mime-acting-situation-examples-file'. --- mime-play.el | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/mime-play.el b/mime-play.el index cbcf623..7e8b00a 100644 --- a/mime-play.el +++ b/mime-play.el @@ -30,8 +30,12 @@ (require 'alist) (require 'filename) -(eval-when-compile (require 'mime-text)) - +(eval-when-compile + (require 'mime-text) + (condition-case nil + (require 'bbdb) + (error (defvar bbdb-buffer-name nil)) + )) (defvar mime-acting-situation-examples nil) @@ -609,24 +613,22 @@ saved as binary. Otherwise the region is saved by `write-region'." (defun mime-method-to-display-caesar (start end cal) "Internal method for mime-view to display ROT13-47-48 message." (let* ((entity (mime-raw-find-entity-from-point start)) - (cnum (reverse (mime-entity-node-id entity))) - (new-name (format "%s-%s" (buffer-name) cnum)) - (the-buf (current-buffer)) + (new-name (format "%s-%s" (buffer-name) + (reverse (mime-entity-node-id entity)))) (mother mime-preview-buffer) - (charset (cdr (assoc "charset" cal))) - (encoding (cdr (assq 'encoding cal))) - (mode major-mode)) + (the-buf (current-buffer))) (let ((pwin (or (get-buffer-window mother) (get-largest-window))) - (buf (get-buffer-create new-name)) - ) + (buf (get-buffer-create new-name))) (set-window-buffer pwin buf) (set-buffer buf) (select-window pwin) ) (setq buffer-read-only nil) (erase-buffer) - (mime-text-insert-decoded-body entity) + (let ((mime-raw-buffer the-buf)) + (mime-text-insert-decoded-body entity) + ) (mule-caesar-region (point-min) (point-max)) (set-buffer-modified-p nil) (set-buffer mother) @@ -647,7 +649,7 @@ saved as binary. Otherwise the region is saved by `write-region'." (set-buffer buffer) (erase-buffer) (insert-file-contents file) - (eval-current-buffer) + (eval-buffer) ;; format check (or (eq (car mime-acting-situation-examples) 'type) (setq mime-acting-situation-examples nil)) -- 1.7.10.4