Function: embark-previous-symbol
embark-previous-symbol is an interactive and natively compiled
function defined in embark.el.
Signature
(embark-previous-symbol)
Documentation
Jump to previous occurrence of symbol at point.
The search respects symbol boundaries.
Key Bindings
embark-identifier-map p
Source Code
;; Defined in /nix/store/lls066p88vbzffl5j0d16jbhwpn2zfz2-emacs-packages-deps/share/emacs/site-lisp/elpa/embark-20260610.302/embark.el
(defun embark-previous-symbol ()
"Jump to previous occurrence of symbol at point.
The search respects symbol boundaries."
(interactive)
(if-let* ((symbol (thing-at-point 'symbol)))
(let ((regexp (format "\\_<%s\\_>" (regexp-quote symbol))))
(when (looking-back regexp (- (point) (length symbol)))
(forward-symbol -1))
(unless (re-search-backward regexp nil t)
(user-error "Symbol `%s' not found" symbol)))
(user-error "No symbol at point")))