aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-14 00:34:43 +0000
committerRichard M. Stallman1994-06-14 00:34:43 +0000
commit52b6d4459f3a993956ac3cd8b476a209b6d13058 (patch)
tree63d015506d9731977ad7bf56be160c9cb28f7e0a
parente5575c067a852aebd5f5e0f2ad7cb6dc1b905b97 (diff)
downloademacs-52b6d4459f3a993956ac3cd8b476a209b6d13058.tar.gz
emacs-52b6d4459f3a993956ac3cd8b476a209b6d13058.zip
(pop-global-mark): Discard entries for nonexistent buffers.
-rw-r--r--lisp/simple.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 6dbfccad589..e91ed2a51b8 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1450,6 +1450,9 @@ incremental search, \\[beginning-of-buffer], and \\[end-of-buffer]."
1450(defun pop-global-mark () 1450(defun pop-global-mark ()
1451 "Pop off global mark ring and jump to the top location." 1451 "Pop off global mark ring and jump to the top location."
1452 (interactive) 1452 (interactive)
1453 ;; Pop entries which refer to non-existent buffers.
1454 (while (and global-mark-ring (not (marker-buffer (car global-mark-ring))))
1455 (setq global-mark-ring (cdr global-mark-ring)))
1453 (or global-mark-ring 1456 (or global-mark-ring
1454 (error "No global mark set")) 1457 (error "No global mark set"))
1455 (let* ((marker (car global-mark-ring)) 1458 (let* ((marker (car global-mark-ring))