Function: hui-select-syntactical-region

hui-select-syntactical-region is an interactive and byte-compiled function defined in hui-select.el.

Signature

(hui-select-syntactical-region POS)

Documentation

Return the (start . end) of a syntactically defined region based upon POS.

Uses hui-select-syntax-alist and the current buffer's syntax table to determine syntax groups.

Typically:
 Open or close grouping character syntax marks an s-expression.
 Double quotes mark strings.
 The end of a line marks the line, including its trailing newline.
 Word syntax marks the current word.
 Symbol syntax (such as _) marks a symbol.
 Whitespace marks a span of whitespace.
 Comment start or end syntax marks the comment.
 Punctuation syntax marks the words on both sides of the punctuation.
 If hui-select-char-p is set non-nil, then as a fallback, the
 character at POS will be selected.

If an error occurs during syntax scanning, return nil.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-select.el
(defun hui-select-syntactical-region (pos)
  "Return the (start . end) of a syntactically defined region based upon POS.
Uses `hui-select-syntax-alist' and the current buffer's syntax table to
determine syntax groups.

Typically:
 Open or close grouping character syntax marks an s-expression.
 Double quotes mark strings.
 The end of a line marks the line, including its trailing newline.
 Word syntax marks the current word.
 Symbol syntax (such as _) marks a symbol.
 Whitespace marks a span of whitespace.
 Comment start or end syntax marks the comment.
 Punctuation syntax marks the words on both sides of the punctuation.
 If `hui-select-char-p' is set non-nil, then as a fallback, the
 character at POS will be selected.

If an error occurs during syntax scanning, return nil."
  (interactive "d")
  (setq hui-select-previous 'char)
  (if (save-excursion (goto-char pos) (eolp))
      (hui-select-line pos)
    (let* ((syntax (char-syntax (or (char-after pos) (char-before pos) 0)))
	   (pair (assq syntax hui-select-syntax-alist)))
      (cond ((and pair
		  (or hui-select-whitespace
		      (not (eq (cdr pair) 'hui-select-whitespace))))
	     (funcall (cdr pair) pos))
	    (hui-select-char-p
	     (setq hui-select-previous 'char)
	     (hui-select-set-region pos (1+ pos)))))))