From: Stefan Monnier Date: Thu, 23 Nov 2017 18:35:15 +0000 (-0500) Subject: * lisp/simple.el (clone-buffer): Adjust `mark-ring' X-Git-Tag: emacs-27.0.90~6136 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=197dd690112e8eef6457b16adbe6e2c1d801c849;p=emacs.git * lisp/simple.el (clone-buffer): Adjust `mark-ring' --- 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))