Function: completion-list-candidate-at-point
completion-list-candidate-at-point is a byte-compiled function defined
in compat-31.el.
Signature
(completion-list-candidate-at-point &optional PT)
Documentation
[Compatibility function for completion-list-candidate-at-point, defined in
Emacs 31.0.50. See (compat) Emacs 31.0.50' for more details.]
Candidate string and bounds at PT in completions buffer. The return value has the format (STR BEG END). The optional argument PT defaults to (point).
Source Code
;; Defined in ~/.emacs.d/elpa/compat-31.0.0.2/compat-31.el
;;;; Defined in minibuffer.el
(compat-defun completion-list-candidate-at-point (&optional pt) ;; <compat-tests:completion-list-candidate-at-point>
"Candidate string and bounds at PT in completions buffer.
The return value has the format (STR BEG END).
The optional argument PT defaults to (point)."
(let ((pt (or pt (point))) beg end)
(cond
((and (/= pt (point-max)) (get-text-property pt 'mouse-face))
(setq end pt beg (1+ pt)))
((and (/= pt (point-min)) (get-text-property (1- pt) 'mouse-face))
(setq end (1- pt) beg pt)))
(when (and beg end)
(setq beg (previous-single-property-change beg 'mouse-face))
(setq end (or (next-single-property-change end 'mouse-face) (point-max)))
(list (or (get-text-property beg 'completion--string)
(buffer-substring beg end))
beg end))))