Function: evil--jumps-push
evil--jumps-push is a byte-compiled function defined in evil-jumps.el.
Signature
(evil--jumps-push)
Documentation
Push the current cursor/file position to the jump list.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20260728.1438/evil-jumps.el
(defun evil--jumps-push ()
"Push the current cursor/file position to the jump list."
(let ((target-list (evil--jumps-get-window-jump-list))
(file-name (evil--jumps-current-file-name))
(buffer-name (buffer-name))
(current-pos (point-marker))
(first-pos nil)
(first-file-name nil)
(excluded nil))
(when (and (not file-name)
(string-match-p evil--jumps-buffer-targets buffer-name))
(setq file-name buffer-name))
(when file-name
(dolist (pattern evil-jumps-ignored-file-patterns)
(when (string-match-p pattern file-name)
(setq excluded t)))
(unless excluded
(unless (ring-empty-p target-list)
(setq first-pos (car (ring-ref target-list 0)))
(setq first-file-name (car (cdr (ring-ref target-list 0)))))
(unless (and (equal first-pos current-pos)
(equal first-file-name file-name))
(evil--jumps-message "pushing %s on %s" current-pos file-name)
(ring-insert target-list `(,current-pos ,file-name)))))
(evil--jumps-message "%s %s"
(selected-window)
(and (not (ring-empty-p target-list))
(ring-ref target-list 0)))))