From: okazaki Date: Sat, 3 Jun 2000 12:12:41 +0000 (+0000) Subject: * mmelmo.el (mmelmo-get-original-buffer): Move `save-excursion' X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8498fda7d5c5063ed7438308b75f790c69017196;p=elisp%2Fwanderlust.git * mmelmo.el (mmelmo-get-original-buffer): Move `save-excursion' into the conditional branch. --- diff --git a/elmo/mmelmo.el b/elmo/mmelmo.el index e7c541e..2a98a24 100644 --- a/elmo/mmelmo.el +++ b/elmo/mmelmo.el @@ -46,16 +46,14 @@ If function is specified, its return value is used.") "*A hook called when entity-content is inserted.") (defun mmelmo-get-original-buffer () - (save-excursion - (let (ret-val) - (if (setq ret-val - (get-buffer (concat mmelmo-entity-buffer-name "0"))) - ret-val - (set-buffer (setq ret-val - (get-buffer-create - (concat mmelmo-entity-buffer-name "0")))) - (mmelmo-original-mode) - ret-val)))) + (let ((ret-val (get-buffer (concat mmelmo-entity-buffer-name "0")))) + (if (not ret-val) + (save-excursion + (set-buffer (setq ret-val + (get-buffer-create + (concat mmelmo-entity-buffer-name "0")))) + (mmelmo-original-mode))) + ret-val)) (defun mmelmo-cleanup-entity-buffers () "Cleanup entity buffers of mmelmo."