As far as I understand, in emacs -- word boundary is when next to a "w" syntax class stands char of some other class. This is in contrast to things like sentence-end
which is determined by matching a regexp (sentence-end
returns regexp).
Emacs lisp mode inherits standard-syntax-table
:
;; from lisp-mode.el:
(defvar emacs-lisp-mode-syntax-table
(let ((table (make-syntax-table))
..
(make-syntax-table
is default to standard-syntax-table
.)
The easiest way to browse standard-syntax-table
is to enter fundamental-mode
and call describe-syntax
(C-h s).
Emacs lisp mode makes some tweaks to standard-syntax-table
, of which I understand the following:
`',@#
are expression prefixes:
(modify-syntax-entry ?` "' " table)
(modify-syntax-entry ?' "' " table)
(modify-syntax-entry ?, "' " table)
(modify-syntax-entry ?@ "' " table)
(modify-syntax-entry ?# "' " table)
;
starts a comment, \n
ends it:
(modify-syntax-entry ?\; "< " table)
(modify-syntax-entry ?\n "> " table)
\
is an escape char:
(modify-syntax-entry ?\" "\" " table)