Function: elisp-refs--read-buffer-form
elisp-refs--read-buffer-form is a byte-compiled function defined in
elisp-refs.el.
Signature
(elisp-refs--read-buffer-form SYMBOLS-WITH-POS)
Documentation
Read a form from the current buffer, starting at point.
Returns a list:
(form form-start-pos form-end-pos symbol-positions read-start-pos)
In Emacs 28 and earlier, SYMBOL-POSITIONS is a list of 0-indexed
symbol positions relative to READ-START-POS, according to
read-symbol-positions-list.
In Emacs 29+, SYMBOL-POSITIONS is nil. If SYMBOLS-WITH-POS is
non-nil, forms are read with read-positioning-symbols.
Source Code
;; Defined in ~/.emacs.d/elpa/elisp-refs-20230920.201/elisp-refs.el
(defun elisp-refs--read-buffer-form (symbols-with-pos)
"Read a form from the current buffer, starting at point.
Returns a list:
\(form form-start-pos form-end-pos symbol-positions read-start-pos)
In Emacs 28 and earlier, SYMBOL-POSITIONS is a list of 0-indexed
symbol positions relative to READ-START-POS, according to
`read-symbol-positions-list'.
In Emacs 29+, SYMBOL-POSITIONS is nil. If SYMBOLS-WITH-POS is
non-nil, forms are read with `read-positioning-symbols'."
(let* ((read-with-symbol-positions t)
(read-start-pos (point))
(form (if (and symbols-with-pos (fboundp 'read-positioning-symbols))
(read-positioning-symbols (current-buffer))
(read (current-buffer))))
(symbols (if (boundp 'read-symbol-positions-list)
read-symbol-positions-list
nil))
(end-pos (point))
(start-pos (elisp-refs--start-pos end-pos)))
(list form start-pos end-pos symbols read-start-pos)))