help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Syntax in fundamental-mode?


From: Andreas Röhler
Subject: Syntax in fundamental-mode?
Date: Thu, 16 Aug 2018 08:48:10 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi,

with buffer in fundamental-mode and contents

{{{{asdf

When calling from EOL my reporter of (parse-partial-sexp (point-min)
(point)) tells

nth 0- depth in parens.
         ====> 4 <====
nth 1- character address of start of innermost containing list; nil if none.
         ====> 4 <====
nth 2- character address of start of last complete sexp terminated.
         ====> 5 <====
nth 3- non-nil if inside a string.
         ====> nil <====
    (it is the character that will terminate the string,
or t if the string should be terminated by a generic string delimiter.)
nth 4- nil if outside a comment, t if inside a non-nestable comment,
         ====> nil <====
    else an integer (the current comment nesting).
nth 5- t if following a quote character.
         ====> nil <====
nth 6- the minimum paren-depth encountered during this scan.
         ====> 0 <====
nth 7- style of comment, if any.
         ====> nil <====
nth 8- character address of start of comment or string; nil if not in one.
         ====> nil <====
nth 11- List of positions of currently open parens, outermost first.
         ====> nil <====
         ====> (1 2 3 4) <====
nth 10. When the last position scanned holds the first character of a
    (potential) two character construct, the syntax of that position,
    otherwise nil.  That construct can be a two character comment
    delimiter or an Escaped or Char-quoted character.
nth 11..... Possible further internal information used by ‘parse-partial-sexp’.
If third arg TARGETDEPTH is non-nil, parsing stops if the depth
in parentheses becomes equal to TARGETDEPTH.
Fourth arg STOPBEFORE non-nil means stop when we come to
 any character that starts a sexp.
Fifth arg OLDSTATE is a list like what this function returns.
 It is used to initialize the state of the parse.  Elements number 1, 2, 6
 are ignored.
Sixth arg COMMENTSTOP non-nil means stop after the start of a comment.
 If it is the symbol ‘syntax-table’, stop after the start of a comment or a
 string, or after end of a comment or a string.
(fn FROM TO &optional TARGETDEPTH STOPBEFORE OLDSTATE COMMENTSTOP)

;;

Is there a way to get rid of all syntax?

Thanks,
Andreas
GNU Emacs 27.0.50 (build 1, i686-pc-linux-gnu, GTK+ Version 3.14.5) of 2018-05-29



reply via email to

[Prev in Thread] Current Thread [Next in Thread]