From 2754fefaecfd856ff9e0972d0589e02b3c66eaa8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 22 Sep 1996 04:38:36 +0000 Subject: [PATCH] (byte-optimize-form-code-walker): Treat save-current-buffer like save-excursion. --- lisp/emacs-lisp/byte-opt.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 80f3bedc0ef..ef2880c7d9b 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -423,7 +423,7 @@ (cons (byte-optimize-form (nth 2 form) for-effect) (byte-optimize-body (cdr (cdr (cdr form))) t))))) - ((memq fn '(save-excursion save-restriction)) + ((memq fn '(save-excursion save-restriction save-current-buffer)) ;; those subrs which have an implicit progn; it's not quite good ;; enough to treat these like normal function calls. ;; This can turn (save-excursion ...) into (save-excursion) which -- 2.39.2