Function: evil-select-quote
evil-select-quote is a byte-compiled function defined in
evil-common.el.
Signature
(evil-select-quote QUOTE BEG END TYPE COUNT &optional INCLUSIVE)
Documentation
Return a range (BEG END) of COUNT quoted text objects.
QUOTE specifies the quotation delimiter. BEG END TYPE are the currently selected (visual) range.
If INCLUSIVE is nil the previous selection is ignore. If there is
quoted string at point this object will be selected, otherwise
the following (if (> COUNT 0)) or preceeding object (if (< COUNT
0)) is selected. If (/= (abs COUNT) 2) the delimiting quotes are not
contained in the range, otherwise they are contained in the range.
If INCLUSIVE is non-nil the selection depends on the previous
selection. If the currently selection contains at least one
character that is contained in a quoted string then the selection
is extended, otherwise it is thrown away. If there is a
non-selected object at point then this object is added to the
selection. Otherwise the selection is extended to the
following (if (> COUNT 0)) or preceeding object (if (< COUNT
0)). Any whitespace following (or preceeding if (< COUNT 0)) the
new selection is added to the selection. If no such whitespace
exists and the selection contains only one quoted string then the
preceeding (or following) whitespace is added to the range.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-common.el
(defun evil-select-quote (quote beg end type count &optional inclusive)
"Return a range (BEG END) of COUNT quoted text objects.
QUOTE specifies the quotation delimiter. BEG END TYPE are the
currently selected (visual) range.
If INCLUSIVE is nil the previous selection is ignore. If there is
quoted string at point this object will be selected, otherwise
the following (if (> COUNT 0)) or preceeding object (if (< COUNT
0)) is selected. If (/= (abs COUNT) 2) the delimiting quotes are not
contained in the range, otherwise they are contained in the range.
If INCLUSIVE is non-nil the selection depends on the previous
selection. If the currently selection contains at least one
character that is contained in a quoted string then the selection
is extended, otherwise it is thrown away. If there is a
non-selected object at point then this object is added to the
selection. Otherwise the selection is extended to the
following (if (> COUNT 0)) or preceeding object (if (< COUNT
0)). Any whitespace following (or preceeding if (< COUNT 0)) the
new selection is added to the selection. If no such whitespace
exists and the selection contains only one quoted string then the
preceeding (or following) whitespace is added to the range. "
(let ((evil-forward-quote-char quote))
(or (let ((bnd (or (bounds-of-thing-at-point 'evil-comment)
(bounds-of-thing-at-point 'evil-string))))
(when (and bnd (< (point) (cdr bnd))
(/= (char-after (car bnd)) quote)
(/= (char-before (cdr bnd)) quote))
(evil-with-restriction (car bnd) (cdr bnd)
(ignore-errors (evil-select-quote-thing
'evil-quote-simple
beg end type
count
inclusive)))))
(let ((evil-forward-quote-char quote))
(evil-select-quote-thing 'evil-quote
beg end type
count
inclusive)))))