Function: pop-global-mark
pop-global-mark is an interactive and byte-compiled function defined
in simple.el.gz.
Signature
(pop-global-mark)
Documentation
Pop off global mark ring and jump to the top location.
This function has :after advice: org-mark-jump-unhide.
Probably introduced at or before Emacs version 19.23.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun pop-global-mark ()
"Pop off global mark ring and jump to the top location."
(interactive)
;; Pop entries that 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))
(buffer (marker-buffer marker))
(position (marker-position marker)))
(setq global-mark-ring (nconc (cdr global-mark-ring)
(list (car global-mark-ring))))
(set-buffer buffer)
(or (and (>= position (point-min))
(<= position (point-max)))
(if widen-automatically
(widen)
(error "Global mark position is outside accessible part of buffer %s"
(buffer-name buffer))))
(goto-char position)
(switch-to-buffer buffer)))