From 8498fda7d5c5063ed7438308b75f790c69017196 Mon Sep 17 00:00:00 2001 From: okazaki Date: Sat, 3 Jun 2000 12:12:41 +0000 Subject: [PATCH] * mmelmo.el (mmelmo-get-original-buffer): Move `save-excursion' into the conditional branch. --- elmo/mmelmo.el | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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." -- 1.7.10.4