diff options
| author | Richard M. Stallman | 1994-06-14 00:34:43 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-06-14 00:34:43 +0000 |
| commit | 52b6d4459f3a993956ac3cd8b476a209b6d13058 (patch) | |
| tree | 63d015506d9731977ad7bf56be160c9cb28f7e0a | |
| parent | e5575c067a852aebd5f5e0f2ad7cb6dc1b905b97 (diff) | |
| download | emacs-52b6d4459f3a993956ac3cd8b476a209b6d13058.tar.gz emacs-52b6d4459f3a993956ac3cd8b476a209b6d13058.zip | |
(pop-global-mark): Discard entries for nonexistent buffers.
| -rw-r--r-- | lisp/simple.el | 3 |
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)) |