Skip to content

Latest commit

 

History

History
73 lines (60 loc) · 2.75 KB

notes.org

File metadata and controls

73 lines (60 loc) · 2.75 KB

This files contains random stuff I decided to put in it while workong on this.

This include stuff like emacs manual pages, random code, etc.

Random shit

look into check-parens function?

;; (defun is-opening-charp? (char) 
;;   (cond ((eq (char-syntax char) 40) t)
;; 	((eq (char-syntax char) 95) t)
;; 	(t nil)
;; 	)
;;   )

;; (defun is-closing-charp? (char) 
;;   (cond ((eq (char-syntax char) 40) t)
;; 	((eq (char-syntax char) 95) t)
;; 	(t nil)
;; 	)
;;   )
				


(eq (char-syntax (following-char)) something)
  modify-syntax-entry is an interactive built-in function in `C source
code'.

(modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE)
;;(char-syntax ?\}) This maybe???
;;(char-syntax (aref "aas" 0)) THIS!


Set syntax for character CHAR according to string NEWENTRY.
The syntax is changed only for table SYNTAX-TABLE, which defaults to
 the current buffer's syntax table.
CHAR may be a cons (MIN . MAX), in which case, syntaxes of all characters
in the range MIN to MAX are changed.
The first character of NEWENTRY should be one of the following:
  Space or -  whitespace syntax.    w   word constituent.
  _           symbol constituent.   .   punctuation.
  (           open-parenthesis.     )   close-parenthesis.
  "           string quote.         \   escape.
  $           paired delimiter.     '   expression quote or prefix operator.
  <           comment starter.      >   comment ender.
  /           character-quote.      @   inherit from parent table.
  |           generic string fence. !   generic comment fence.

Only single-character comment start and end sequences are represented thus.
Two-character sequences are represented as described below.
The second character of NEWENTRY is the matching parenthesis,
 used only if the first character is `(' or `)'.
Any additional characters are flags.
Defined flags are the characters 1, 2, 3, 4, b, p, and n.
 1 means CHAR is the start of a two-char comment start sequence.
 2 means CHAR is the second character of such a sequence.
 3 means CHAR is the start of a two-char comment end sequence.
 4 means CHAR is the second character of such a sequence.

There can be several orthogonal comment sequences.  This is to support
language modes such as C++.  By default, all comment sequences are of style
a, but you can set the comment sequence style to b (on the second character
of a comment-start, and the first character of a comment-end sequence) and/or
c (on any of its chars) using this flag:
 b means CHAR is part of comment sequence b.
 c means CHAR is part of comment sequence c.
 n means CHAR is part of a nestable comment sequence.

 p means CHAR is a prefix character for `backward-prefix-chars';
   such characters are treated as whitespace when they occur
   between expressions.

[back]