Reputation: 3850
E.g. Below syntax table is from text-mode
(invoked by C-h s).
The parent syntax table is:
C-@ .. C-h . which means: punctuation
TAB .. C-j which means: whitespace
C-k . which means: punctuation
C-l .. RET which means: whitespace
C-n .. C-_ . which means: punctuation
By intuition I guess the ..
means a list range. However I could not find confirmation in the GNU emacs manual. May I confirm about it here?
In addition, may I also confirm that the range is sorted by the ASCII code number? i.e. C-@ .. C-h
corresponds to ASCII code 0-10.
My apology if this looks too basic. I wish I could find related document from the reference manual but it is not
Upvotes: 4
Views: 98
Reputation: 73345
I can't definitively confirm this, but based on observation I agree 100% with your assessment.
The instances of A .. Z
and a .. z
and 0 .. 9
make for good supporting evidence.
Clearly the control characters are being rendered in a readable format, and sometimes the selected option isn't the ideal choice.
e.g. C-l .. RET
would be clearer as the equivalent C-l .. C-m
; and similarly if TAB .. C-j
appeared as C-i .. C-j
The section on syntax table internals points out that they are implemented as char tables, which are "much like a vector [but] indexed by character codes". As such, syntax tables are based upon sequences of character codes, and the code which displays them undoubtedly iterates through the table, ascertaining the start and finish codes for every range of characters with an identical syntax, and then using the ..
format to display each range.
Upvotes: 1