                  ?⅋ ?⅌ ?⅍ ?ⅎ ?⅏))
     (modify-syntax-entry ?' "w" st)
     (modify-syntax-entry ?_ "w" st)
+    (modify-syntax-entry ?\. "w" st)
 
     ;; Lean operator chars
     (mapc #'(lambda (ch) (modify-syntax-entry ch "_" st))
-          "!#$%&*+.<=>@^|~:")
+          "!#$%&*+<=>@^|~:")
 
     ;; Whitespace is whitespace
     (modify-syntax-entry ?\  " " st)

      (2 'font-lock-function-name-face))
     ;; place holder
     (,(rx symbol-start "_" symbol-end) . 'font-lock-preprocessor-face)
     (,(rx "\[priority" (zero-or-more (not (any "\]"))) "\]") . font-lock-doc-face)
     (,(rx "\[recursor" (zero-or-more (not (any "\]"))) "\]") . font-lock-doc-face)
     (,(rx "\[unfold" (zero-or-more (not (any "\]"))) "\]") . font-lock-doc-face)
     ;; tactics
     ("cases[ \t\n]+[^ \t\n]+[ \t\n]+\\(with\\)" (1 'font-lock-constant-face))
     (,(rx (not (any "\.")) word-start
           (group
            (or "\\b.*_tac" "Cond" "or_else" "then" "try" "when" "assumption" "eassumption" "rapply"
                "apply" "fapply" "eapply" "rename" "intro" "intros" "all_goals" "fold" "focus" "focus_at"
                "generalize" "generalizes" "clear" "clears" "revert" "reverts" "back" "beta" "done" "exact" "rexact"
                "refine" "repeat" "whnf" "rotate" "rotate_left" "rotate_right" "inversion" "cases" "rewrite"
                "xrewrite" "krewrite" "blast" "simp" "esimp" "unfold" "change" "check_expr" "contradiction"
                "exfalso" "split" "existsi" "constructor" "fconstructor" "left" "right" "injection" "congruence" "reflexivity"
                "symmetry" "transitivity" "state" "induction" "induction_using" "fail" "append"
                "substvars" "now" "with_options"))
           word-end)
      (1 'font-lock-constant-face))
     ;; Types
     (,(rx word-start (or "Prop" "Type" "Type'" "Type₊" "Type₀" "Type₁" "Type₂" "Type₃") symbol-end) . 'font-lock-type-face)
     (,(rx word-start (group "Type") ".") (1 'font-lock-type-face))
     ;; warnings
     (,lean-warnings-regexp . 'font-lock-warning-face)
     ;; extra-keywords
     (,(rx (or "∎")) . 'font-lock-keyword-face)
     )))

;; Syntax Highlighting for Lean Info Mode

(defconst lean-font-lock-defaults
  `((;; modifiers
     (,lean-modifiers-regexp . 'font-lock-doc-face)
     (,(rx "\[priority " (one-or-more (not (any "\]"))) "\]") . font-lock-doc-face)
     (,(rx "\[recursor " (one-or-more (not (any "\]"))) "\]") . font-lock-doc-face)
     (,(rx "\[unfold " (one-or-more (not (any "\]"))) "\]") . font-lock-doc-face)
     ;; Constants which have a keyword as subterm
     (,(rx (or "∘if")) . 'font-lock-constant-face)
     ;; Keywords
     ("\\(set_option\\)[ \t]*\\([^ \t\n]*\\)" (2 'font-lock-constant-face))
     (,lean-keywords2-regexp . 'font-lock-keyword-face)
     (,lean-keywords1-regexp . 'font-lock-keyword-face)
     (,(rx (or "∎")) . 'font-lock-keyword-face)
     ;; Types
     (,(rx word-start (or "Prop" "Type" "Type'" "Type₊" "Type₀" "Type₁" "Type₂" "Type₃" "Type*") symbol-end) . 'font-lock-type-face)
     (,(rx word-start (group "Type") ".") (1 'font-lock-type-face))
     ;; String
     ("\"[^\"]*\"" . 'font-lock-string-face)
     ;; ;; Constants
     (,lean-constants-regexp . 'font-lock-constant-face)
     (,lean-numerals-regexp . 'font-lock-constant-face)
     ;; universe/inductive/theorem... "names"
     (,(rx word-start
           (group (or "inductive" "structure" "record" "theorem" "axiom" "axioms" "lemma" "proposition" "corollary" "hypothesis" "definition" "constant" "abbreviation"))
