Function: embark-target-heading-at-point

embark-target-heading-at-point is a natively compiled function defined in embark.el.

Signature

(embark-target-heading-at-point)

Documentation

Target the outline heading at point.

Source Code

;; Defined in /nix/store/lls066p88vbzffl5j0d16jbhwpn2zfz2-emacs-packages-deps/share/emacs/site-lisp/elpa/embark-20260610.302/embark.el
(defun embark-target-heading-at-point ()
  "Target the outline heading at point."
  (let ((beg (line-beginning-position))
        (end (line-end-position)))
    (when (save-excursion
            (goto-char beg)
            (if (bound-and-true-p outline-search-function)
                (funcall outline-search-function nil nil nil t)
              ;; default definition from outline.el
              (looking-at (or (bound-and-true-p outline-regexp) "[*\^L]+"))))
      (require 'outline) ;; Ensure that outline commands are available
      `(heading ,(buffer-substring beg end) ,beg . ,end))))