Function: avy-pop-mark

avy-pop-mark is an interactive and byte-compiled function defined in avy.el.

Signature

(avy-pop-mark)

Documentation

Jump back to the last location of avy-push-mark.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/avy-20241101.1357/avy.el
(defun avy-pop-mark ()
  "Jump back to the last location of `avy-push-mark'."
  (interactive)
  (let (res)
    (condition-case nil
        (progn
          (while (not (window-live-p
                       (cdr (setq res (ring-remove avy-ring 0))))))
          (let* ((window (cdr res))
                 (frame (window-frame window)))
            (when (and (frame-live-p frame)
                       (not (eq frame (selected-frame))))
              (select-frame-set-input-focus frame))
            (select-window window)
            (goto-char (car res))))
      (error
       (set-mark-command 4)))))