update log info option, syntax highlighting
- add new Update ChangeLog function - do not highlight keywords inside comments - use fundamental-mode as basis - dump the dot state by default
This commit is contained in:
parent
a8ebeb008c
commit
deba3792c9
@ -419,7 +419,11 @@
|
||||
:help
|
||||
"Run SANY2 "
|
||||
"(syntax checker for TLA+ specifications) "))
|
||||
|
||||
|
||||
(bindings--define-key map [menu-bar tla+ tla+-update-note]
|
||||
'(menu-item "Add Update Comment" tla+-add-update-note
|
||||
:help "Add Update Note"))
|
||||
|
||||
(bindings--define-key map [menu-bar tla+ tla+-create-module]
|
||||
'(menu-item "Create new Module" tla+-create-module
|
||||
:help "Create a new TLA+ Module"))
|
||||
@ -430,19 +434,20 @@
|
||||
|
||||
(defconst tla+-font-lock-keywords
|
||||
(list
|
||||
'("\\\\\\*.*$" . font-lock-comment-face)
|
||||
'("(\\*.*\\*)" . font-lock-comment-face)
|
||||
'("\\<\\(MODULE\\|CONSTANTS?\\|UNCHANGED\\|VARIABLES?\\|THEOREM\\|LOCAL\\|ASSUME\\|LET\\|EXTENDS?\\)\\>"
|
||||
. font-lock-builtin-face)
|
||||
'("\\<\\(TRUE\\|FALSE\\|OTHER\\|BOOLEAN\\|DOMAIN\\)\\>" . font-lock-type-face)
|
||||
'("\\<\\(CONSTANT\\|SUBSET\\|ENABLED\\|UNCHANGED\\|INSTANCE\\|WITH\\|EXCEPT\\|UNION\\|IN\\|DOMAIN\\|EXCEPT\\|IF\\|THEN\\|ELSE\\|CHOOSE\\)\\>" . font-lock-keyword-face)
|
||||
'("\\\\\\*.*$" . font-lock-comment-face)
|
||||
'("(\\*.*\\*)" . font-lock-comment-face)
|
||||
|
||||
'("\\('\\w*'\\)" . font-lock-variable-name-face)
|
||||
"Highlighting for TLA+ Operators, Keywords etc."))
|
||||
|
||||
|
||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.tla\\'" . tla+-mode))
|
||||
;;;###autoload
|
||||
(define-derived-mode tla+-mode nil "TLA+"
|
||||
(define-derived-mode tla+-mode fundamental-mode "TLA+"
|
||||
"Major mode for editing TLA+ specifications.
|
||||
In this mode, syntax highlighting is activated for TLA+ specification
|
||||
files. Various operators can be inserted by `tla+-operator-NAME'.
|
||||
@ -474,6 +479,17 @@ specification file."
|
||||
"\\* Modification History\n"
|
||||
"\\* Created "
|
||||
(current-time-string) " by " user-full-name "\n"))))
|
||||
|
||||
(defun tla+-add-update-note ()
|
||||
"Add an Update note"
|
||||
(interactive)
|
||||
(let ((text "...describe changes here..."))
|
||||
(goto-char (point-max))
|
||||
(insert (concat "\\* Updated " (current-time-string) " by "
|
||||
user-full-name "\n"))
|
||||
(insert (concat "\\* " text))
|
||||
(goto-char (- (point-max) (length text)))))
|
||||
|
||||
|
||||
|
||||
(defun tla+-run-sany ()
|
||||
@ -538,6 +554,7 @@ Note: The TLA+ specification file is a relative path.
|
||||
(cmd (concat
|
||||
tla+-java-path " -cp " tla+-tlatools-path
|
||||
" tlc2.TLC "
|
||||
" -dump dot states.dot "
|
||||
tla+-tlc-deadlock " "
|
||||
tla+-tlc-simulate " "
|
||||
tla+-tlc-depth " "
|
||||
|
Loading…
Reference in New Issue
Block a user