FUEL: Fix ratio and float font lock.
parent
5a43dda03c
commit
f64b8a2279
|
@ -132,8 +132,7 @@ buffer."
|
|||
|
||||
(defun fuel-listener--setup-completion ()
|
||||
(setq fuel-syntax--current-vocab-function 'fuel-listener--current-vocab)
|
||||
(setq fuel-syntax--usings-function 'fuel-listener--usings)
|
||||
(set-syntax-table fuel-syntax--syntax-table))
|
||||
(setq fuel-syntax--usings-function 'fuel-listener--usings))
|
||||
|
||||
|
||||
;;; Stack mode support
|
||||
|
@ -160,7 +159,6 @@ buffer."
|
|||
(set (make-local-variable 'comint-prompt-regexp) fuel-con--prompt-regex)
|
||||
(set (make-local-variable 'comint-use-prompt-regexp) t)
|
||||
(set (make-local-variable 'comint-prompt-read-only) t)
|
||||
(set-syntax-table fuel-syntax--syntax-table)
|
||||
(fuel-listener--setup-completion)
|
||||
(fuel-listener--setup-stack-mode))
|
||||
|
||||
|
|
|
@ -87,11 +87,19 @@
|
|||
(defconst fuel-syntax--integer-regex
|
||||
"\\_<-?[0-9]+\\_>")
|
||||
|
||||
(defconst fuel-syntax--ratio-regex
|
||||
"\\_<-?\\([0-9]+\\+\\)?[0-9]+/-?[0-9]+\\_>")
|
||||
(defconst fuel-syntax--raw-float-regex
|
||||
"[0-9]*\\.[0-9]*\\([eE][+-]?[0-9]+\\)?")
|
||||
|
||||
(defconst fuel-syntax--float-regex
|
||||
"\\_<-?[0-9]+\\.[0-9]*\\([eE][+-]?[0-9]+\\)?\\_>")
|
||||
(format "\\_<-?%s\\_>" fuel-syntax--raw-float-regex))
|
||||
|
||||
(defconst fuel-syntax--number-regex
|
||||
(format "\\([0-9]+\\|%s\\)" fuel-syntax--raw-float-regex))
|
||||
|
||||
(defconst fuel-syntax--ratio-regex
|
||||
(format "\\_<[+-]?%s/-?%s\\_>"
|
||||
fuel-syntax--number-regex
|
||||
fuel-syntax--number-regex))
|
||||
|
||||
(defconst fuel-syntax--bad-string-regex
|
||||
"\"\\([^\"]\\|\\\\\"\\)*\n")
|
||||
|
|
Loading…
Reference in New Issue