What is the Raw Syntax Descriptor for a char at POS? Can I have some examples so I can understand what this thing is all about?
1 Answers
In order to understand syntax
, you need to understand what the syntax
of a char
is. You can find this with how to use the command C-u C-x =
. The syntax
of the same char could be different based on the mode
in use.
C-x =
runs the command what-cursor-position (found in global-map),
which is an interactive compiled Lisp function in simple.el
.
It is bound to C-x =
.
(what-cursor-position &optional DETAIL)
Print info on cursor position (on screen and within buffer). Also describe the character after point, and give its character code in octal, decimal and hex. If what-cursor-show-names
is non-nil, additionally show the name of the character.
For a non-ASCII multibyte character, also give its encoding in the buffer`s selected coding system if the coding system encodes the character safely. If the character is encoded into one byte, that code is shown in hex. If the character is encoded into more than one byte, just "..." is shown.
In addition, with prefix argument, show details about that character in Help buffer. See also the command describe-char
.
Probably introduced at or before Emacs version 27.1.
[back]
-
-
-
-
-
-
M-x find-library RET syntax RET
andM-x occur RET 3 ppss
. Go to that position and report what do you see. Take time to think about information I am giving you. – Jul 20 '22 at 15:40 -
Yes, I am interested in Parse-Partial-Sexp State at POS. I get
418: ((nth 3 ppss) 'string) 473: (nth 3 last) 624: (syntax-ppss--update-stats 3 pt-min pos)
. – Dilna Jul 20 '22 at 15:50 -
-
I am having trouble understanding the list returned by
parse-partial-sexp
such as(9 157 158 34 nil nil 8 nil 166 (146 147 148 149 150 151 152 153 157) nil)
. – Dilna Jul 21 '22 at 02:42 -
How many elements are in that list? Read
C-h f parse-partial-sexp
once again. There is a numbered list which you cannot miss in the description. – Jul 21 '22 at 03:39
(
or)
occurs within a string, comment or is escaped. – Dilna Jul 20 '22 at 12:40