From: Richard M. Stallman Date: Tue, 14 Jun 1994 00:34:43 +0000 (+0000) Subject: (pop-global-mark): Discard entries for nonexistent buffers. X-Git-Url: http://git.hcoop.net/bpt/emacs.git/commitdiff_plain/52b6d4459f3a993956ac3cd8b476a209b6d13058?hp=e5575c067a852aebd5f5e0f2ad7cb6dc1b905b97 (pop-global-mark): Discard entries for nonexistent buffers. --- diff --git a/lisp/simple.el b/lisp/simple.el index 6dbfccad58..e91ed2a51b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1450,6 +1450,9 @@ incremental search, \\[beginning-of-buffer], and \\[end-of-buffer]." (defun pop-global-mark () "Pop off global mark ring and jump to the top location." (interactive) + ;; Pop entries which refer to non-existent buffers. + (while (and global-mark-ring (not (marker-buffer (car global-mark-ring)))) + (setq global-mark-ring (cdr global-mark-ring))) (or global-mark-ring (error "No global mark set")) (let* ((marker (car global-mark-ring))