comparison lisp/simple.el @ 7881:4ab8723cd491

(pop-global-mark): Discard entries for nonexistent buffers.
author Richard M. Stallman <rms@gnu.org>
date Tue, 14 Jun 1994 00:34:43 +0000
parents 0eb805c768af
children 6e58b282df42
comparison
equal deleted inserted replaced
7880:3dd8448eee15 7881:4ab8723cd491
1448 (> (prefix-numeric-value arg) 0)))) 1448 (> (prefix-numeric-value arg) 0))))
1449 1449
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))
1456 (buffer (marker-buffer marker)) 1459 (buffer (marker-buffer marker))
1457 (position (marker-position marker))) 1460 (position (marker-position marker)))