additional keyword, regex fix

This commit is contained in:
Christian Barthel 2019-12-28 21:25:12 +01:00
parent c58bbb6671
commit 9d6c2da190
1 changed files with 8 additions and 8 deletions

View File

@ -60,7 +60,7 @@
:group 'tla+) :group 'tla+)
;; ------------------------------------------------------------------------------- ;; -------------------------------------------------------------------
(defvar tla+-mode-map (defvar tla+-mode-map
(let (let
((map (make-sparse-keymap)) ((map (make-sparse-keymap))
@ -344,9 +344,9 @@
(defconst tla+-font-lock-keywords (defconst tla+-font-lock-keywords
(list (list
'("\\<\\(MODULE\\|CONSTANTS?\\|UNCHANGED\\|VARIABLES?\\|THEOREM\\|LOCAL\\|ASUME\\|EXTENDS?\\)\\>" '("\\<\\(MODULE\\|CONSTANTS?\\|UNCHANGED\\|VARIABLES?\\|THEOREM\\|LOCAL\\|ASSUME\\|EXTENDS?\\)\\>"
. font-lock-builtin-face) . font-lock-builtin-face)
'("\\<\\(TRUE\\|FALSE\\|OTHER\\|BOOLEAN\\)\\>" . font-lock-type-face) '("\\<\\(TRUE\\|FALSE\\|OTHER\\|BOOLEAN\\|DOMAIN\\)\\>" . font-lock-type-face)
'("\\<\\(CONSTANT\\|SUBSET\\|ENABLED\\|UNCHANGED\\|INSTANCE\\|WITH\\|EXCEPT\\|UNION\\|DOMAIN\\|EXCEPT\\|IF\\|THEN\\|ELSE\\|CHOOSE\\)\\>" . font-lock-keyword-face) '("\\<\\(CONSTANT\\|SUBSET\\|ENABLED\\|UNCHANGED\\|INSTANCE\\|WITH\\|EXCEPT\\|UNION\\|DOMAIN\\|EXCEPT\\|IF\\|THEN\\|ELSE\\|CHOOSE\\)\\>" . font-lock-keyword-face)
'("\\\\\\*.*$" . font-lock-comment-face) '("\\\\\\*.*$" . font-lock-comment-face)
'("(\\*.*\\*)" . font-lock-comment-face) '("(\\*.*\\*)" . font-lock-comment-face)
@ -559,13 +559,12 @@ Steps done by this function:
(text (button-label the-button)) (text (button-label the-button))
(s (string-match (s (string-match
(concat (concat
"line \\([0-9][0-9]*\\)," ; line XYZ "line \\([0-9][0-9]*\\), " ; line XYZ
"\\(column\\|col\\) " ; "column" or "col" "\\(column\\|col\\) " ; "column" or "col"
"\\([0-9][0-9]*\\)" ; XYZ "\\([0-9][0-9]*\\)") ; XYZ
text)) text))
(line (string-to-number (match-string 1 text))) (line (string-to-number (match-string 1 text)))
(col (string-to-number (match-string 3 text))) (col (string-to-number (match-string 3 text))))
)
;(message (format "Button pressed: %s" text)) ;(message (format "Button pressed: %s" text))
(progn (progn
;(switch-to-buffer (other-buffer)) ;(switch-to-buffer (other-buffer))
@ -616,7 +615,8 @@ The procedure works by:
(colnum (match-beginning 3)) (colnum (match-beginning 3))
(rend (+ colnum (- (length (int-to-string colnum)) 0))) (rend (+ colnum (- (length (int-to-string colnum)) 0)))
) )
;(message "%s %s" linenum colnum) ;(message "%s %s" linenum colnum)
;(message "%d %d" rstart rend)
(tla+/make-link-button rstart rend) (tla+/make-link-button rstart rend)
)))) ))))