Function: evil-looking-at-start-comment
evil-looking-at-start-comment is a byte-compiled function defined in
evil-common.el.
Signature
(evil-looking-at-start-comment &optional MOVE)
Documentation
Return t if point is at the start of a comment.
Point must be on one of the opening characters of a block comment according to the current syntax table. Futhermore, these characters must been parsed as opening characters, i.e. they won't be considered as comment starters inside a string or possibly another comment. Point is moved to the first character of the comment opener if MOVE is non-nil.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-common.el
(defun evil-looking-at-start-comment (&optional move)
"Return t if point is at the start of a comment.
Point must be on one of the opening characters of a block comment
according to the current syntax table. Futhermore, these
characters must been parsed as opening characters, i.e. they
won't be considered as comment starters inside a string or
possibly another comment. Point is moved to the first character
of the comment opener if MOVE is non-nil."
(cond
((= (point) (point-max)) nil)
;; one character opener
((= (char-syntax (char-after)) ?<)
(equal (point) (evil-in-comment-p (1+ (point)))))
;; two character opener on first char
((and (not (zerop (logand (car (syntax-after (point)))
(ash 1 16))))
(not (zerop (logand (or (car (syntax-after (1+ (point)))) 0)
(ash 1 17)))))
(equal (point) (evil-in-comment-p (+ 2 (point)))))
;; two character opener on second char
((and (not (zerop (logand (car (syntax-after (point)))
(ash 1 17))))
(not (zerop (logand (or (car (syntax-after (1- (point)))) 0)
(ash 1 16)))))
(and (equal (1- (point)) (evil-in-comment-p (1+ (point))))
(prog1 t (when move (backward-char)))))))