From 197dd690112e8eef6457b16adbe6e2c1d801c849 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 23 Nov 2017 13:35:15 -0500 Subject: [PATCH] * lisp/simple.el (clone-buffer): Adjust `mark-ring' --- lisp/simple.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index fde6669df10..41f22b2396d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -8516,13 +8516,16 @@ after it has been set up properly in other respects." ;; Set up other local variables. (mapc (lambda (v) - (condition-case () ;in case var is read-only + (condition-case () (if (symbolp v) (makunbound v) (set (make-local-variable (car v)) (cdr v))) - (error nil))) + (setting-constant nil))) ;E.g. for enable-multibyte-characters. lvars) + (setq mark-ring (mapcar (lambda (mk) (copy-marker (marker-position mk))) + mark-ring)) + ;; Run any hooks (typically set up by the major mode ;; for cloning to work properly). (run-hooks 'clone-buffer-hook)) -- 2.39.2