From: okazaki Date: Sat, 3 Jun 2000 13:42:48 +0000 (+0000) Subject: * mmelmo.el (mmelmo-get-original-buffer): Move `save-excursion' X-Git-Tag: wl-2_4-root~163 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=187df37d14178d110f34a8a7972a6371efccbe72;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."