From 611fbfb2fc93f240c4bb2a8dbbbcfd0921145ef5 Mon Sep 17 00:00:00 2001 From: Pierre Courtieu Date: Mon, 23 Feb 2015 16:20:57 +0000 Subject: Fixed a bug in syntax table making fontlock and indentation fail. After some command detecting things at point, the indentation was broken. --- coq/coq-syntax.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'coq/coq-syntax.el') diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el index 7848bcac..a4e11ba1 100644 --- a/coq/coq-syntax.el +++ b/coq/coq-syntax.el @@ -1096,6 +1096,16 @@ It is used: (modify-syntax-entry ?\( "()1") (modify-syntax-entry ?\) ")(4")) +;; use this to evaluate code with "." being consisdered a symbol +;; constituent (better behavior for thing-at and maybe font-lock too, +;; for indentation we use ad hoc smie lexers). +(defmacro coq-with-altered-syntax-table (&rest code) + (let ((res (make-symbol "res"))) + `(unwind-protect + (progn (modify-syntax-entry ?\. "_") + (let ((,res (progn ,@code))) + (modify-syntax-entry ?\. ".") + ,res))))) (defconst coq-generic-expression (mapcar (lambda (kw) -- cgit v1.2.3