[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/proof-general ff22652025 17/25: qrhl: Font-lock support (k
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/proof-general ff22652025 17/25: qrhl: Font-lock support (keywords and sub/superscripts) |
Date: |
Mon, 28 Feb 2022 07:58:45 -0500 (EST) |
branch: elpa/proof-general
commit ff2265202592d0c5d80c65ff6dd0a47436a71d29
Author: Dominique Unruh <unruh@ut.ee>
Commit: Dominique Unruh <unruh@ut.ee>
qrhl: Font-lock support (keywords and sub/superscripts)
---
qrhl/qrhl.el | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/qrhl/qrhl.el b/qrhl/qrhl.el
index 4b2742788d..3c15079f67 100644
--- a/qrhl/qrhl.el
+++ b/qrhl/qrhl.el
@@ -16,8 +16,6 @@
(defun qrhl-find-and-forget (span)
(proof-generic-count-undos span))
-;(defvar qrhl-home (file-name-directory (directory-file-name
(file-name-directory (directory-file-name (file-name-directory
load-file-name))))))
-
(defvar qrhl-focus-cmd-regexp
(let* ((number "[0-9]+")
(white "[[:blank:]]*")
@@ -59,6 +57,22 @@
(and (qrhl-parse-focus-command) 'cmd)
(and (qrhl-parse-regular-command) 'cmd)))
+(defvar qrhl-font-lock-subsuperscript
+ '(("\\(⇩\\)\\([^[:space:]]\\)" .
+ ((2 '(face subscript display (raise -0.3)))
+ (1 '(face nil display ""))))
+ ("\\(⇧\\)\\([^[:space:]]\\)" .
+ ((2 '(face superscript display (raise 0.3)))
+ (1 '(face nil display "")))))
+ "Font-lock configuration for displaying sub/superscripts that are prefixed
by ⇩/⇧")
+
+(defvar qrhl-font-lock-keywords
+ ; Very simple configuration of keywords: highlights all occurrences, even if
they are not actually keywords (e.g., when they are part of a term)
+ (append qrhl-font-lock-subsuperscript
+ '("lemma" "qrhl" "include" "quantum" "program" "equal" "simp"
"isabelle" "isa" "var" "qed"
+ "skip"))
+ "Font-lock configuration for qRHL proof scripts")
+
(proof-easy-config 'qrhl "qRHL"
proof-prog-name qrhl-prog-name
; We need to give some option here, otherwise
proof-prog-name is interpreted
@@ -82,6 +96,9 @@
proof-shell-cd-cmd "changeDirectory \"%s\"."
proof-save-command-regexp "^adfuaisdfaoidsfasd" ;
ProofGeneral produces warning when this is not set. But we don't want goal/save
commands to be recognized because that makes ProofGeneral do an atomic undo.
proof-tree-external-display nil
+ proof-script-font-lock-keywords qrhl-font-lock-keywords
+ proof-goals-font-lock-keywords qrhl-font-lock-keywords
+ proof-response-font-lock-keywords qrhl-font-lock-keywords
)
; buttoning functions follow https://superuser.com/a/331896/748969
@@ -93,7 +110,7 @@
(find-file (buffer-substring (button-start button) (button-end button))))
(defun qrhl-buttonize-buffer ()
- "turn all include's into clickable buttons"
+ "Turn all include commands in a qRHL proof script into clickable buttons"
(interactive)
(remove-overlays)
(save-excursion
- [nongnu] elpa/proof-general updated (df19c7ba0e -> fe8b9fccb3), ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 57a9d9ea91 05/25: qrhl: support for several commands on the same line., ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 0aaf95edba 10/25: Removed setting proof-tree-external-display in `qrhl.el`., ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general b580e5f274 08/25: Updated autogenerated parts of PQ-adapting.texi., ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 2d3f422b01 11/25: Mentioning qrhl-tool in README.md, ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 553b2dc093 09/25: Added (require 'proof) to qrhl.el, ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 543aa777d7 14/25: Made path to qrhl-tool customizable., ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 232c7ccae1 18/25: qrhl: Ensure UTF-8 via `proof-shell-unicode` instead of `set-language-environment`., ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general ff22652025 17/25: qrhl: Font-lock support (keywords and sub/superscripts),
ELPA Syncer <=
- [nongnu] elpa/proof-general b49220f634 01/25: Added qRHL support from qrhl-tool repo, ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 80aac72a7a 02/25: Fix: proof-tree-external-display := nil, otherwise ProofGeneral fails, ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general ee01e75c66 03/25: qrhl-mode recognizes focus commands (e.g. '1-2: ++'), ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 9b3ec8c596 16/25: qrhl: Made variable setting of `electric-indent-mode` buffer-local, ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 67006d14e3 15/25: Merge branch 'master' into qrhl-tool, ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 30b882b8c3 04/25: qrhl.el: Fixed regexp for errors, ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general df4013732e 22/25: qrhl: Removed autoload cookie from customizable options., ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general fe8b9fccb3 25/25: Merge pull request #636 from dominique-unruh/qrhl-tool, ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 847492f78f 13/25: Using require instead of load-library to load qrhl-input., ELPA Syncer, 2022/02/28
- [nongnu] elpa/proof-general 0eb165d2a5 12/25: Removed some hardcoded configuration in qrhl mode:, ELPA Syncer, 2022/02/28