diff options
-rw-r--r-- | lib/texi-docstring-magic.el | 7 | ||||
-rw-r--r-- | mmm/mmm-auto.el | 3 |
2 files changed, 3 insertions, 7 deletions
diff --git a/lib/texi-docstring-magic.el b/lib/texi-docstring-magic.el index d95f12fc..d9791cfd 100644 --- a/lib/texi-docstring-magic.el +++ b/lib/texi-docstring-magic.el @@ -192,13 +192,10 @@ including any whitespace included to delimit matches.") (defun texi-docstring-magic-untabify (string) "Convert tabs in STRING into multiple spaces." - (save-excursion - (set-buffer - (get-buffer-create " texi-docstring-magic-untabify")) + (with-temp-buffer (insert string) (untabify (point-min) (point-max)) - (prog1 (buffer-string) - (kill-buffer (current-buffer))))) + (buffer-string))) (defun texi-docstring-magic-munge-docstring (docstring args) "Markup DOCSTRING for texi according to regexp matches." diff --git a/mmm/mmm-auto.el b/mmm/mmm-auto.el index 8fd59580..69e95a26 100644 --- a/mmm/mmm-auto.el +++ b/mmm/mmm-auto.el @@ -147,8 +147,7 @@ everything in `mmm-major-mode-hook' will be run." (remove-hook 'post-command-hook 'mmm-check-changed-buffers) (dolist (buffer mmm-changed-buffers-list) (when (buffer-live-p buffer) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer (mmm-run-major-mode-hook)))) (setq mmm-changed-buffers-list '())) |