Skip to content

Commit

Permalink
[61_7] S7: add automatic brackets and add keyword list?
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii committed May 16, 2024
1 parent 9a62aa7 commit 785ac4c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion TeXmacs/plugins/s7/progs/code/s7-edit.scm
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,15 @@
(tm-define (notify-cursor-moved status)
(:require prog-highlight-brackets?)
(:mode in-prog-s7?)
(select-brackets-after-movement "([{" ")]}" "\\"))
(select-brackets-after-movement "([{" ")]}" "\\"))

(kbd-map
(:mode in-prog-s7?)
("{" (s7-bracket-open "{" "}" ))
("}" (s7-bracket-close "{" "}" ))
("(" (s7-bracket-open "(" ")" ))
(")" (s7-bracket-close "(" ")" ))
("[" (s7-bracket-open "[" "]" ))
("]" (s7-bracket-close "[" "]" ))
("\"" (s7-bracket-open "\"" "\"" ))
("'" (s7-bracket-open "'" "'" )))
2 changes: 1 addition & 1 deletion TeXmacs/plugins/s7/progs/code/s7-lang.scm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"list-tabulate" "list-copy" "circular-list" "iota"
; SRFI-1: List predicates
"pair?" "null?" "proper-list?" "circular-list?" "dotted-list?"
"not-pair?" "null-list?" "list="
"not-pair?" "null-list?" "list=" "list?"
; SRFI-1: List selectors
"car" "cdr" "caar" "cadr" "list-ref"
"first" "second" "third" "fourth" "fifth"
Expand Down

0 comments on commit 785ac4c

Please sign in to comment.