Function: ghostel--realize-word-boundaries

ghostel--realize-word-boundaries is a natively compiled function defined in ghostel.el.

Signature

(ghostel--realize-word-boundaries TABLE BOUNDARY-STRING)

Documentation

Realize BOUNDARY-STRING into syntax TABLE, mutating it in place.

Printable ASCII starts as word syntax and non-ASCII as inherited from TABLE's parent; configured boundaries become plain punctuation. Keeping boundaries as . (not paren/string syntax) prevents double-click selection from invoking forward-sexp. Whitespace keeps whitespace syntax.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--realize-word-boundaries (table boundary-string)
  "Realize BOUNDARY-STRING into syntax TABLE, mutating it in place.

Printable ASCII starts as word syntax and non-ASCII as inherited from
TABLE's parent; configured boundaries become plain punctuation.
Keeping boundaries as `.' (not paren/string syntax) prevents double-click
selection from invoking `forward-sexp'.  Whitespace keeps whitespace syntax."
  (set-char-table-range table (cons 128 (max-char)) nil)
  (modify-syntax-entry '(?! . ?~) "w" table)
  (dolist (ch (string-to-list boundary-string))
    (unless (memq ch '(?\s ?\t ?\n ?\r ?\f ?\v))
      (modify-syntax-entry ch "." table))))