FUEL: Exterminating the evil tabs. Also highlight them so they get easier to kill.
parent
9fae604546
commit
13945c4252
|
@ -40,13 +40,7 @@ source/docs/tests file. When set to false, you'll be asked only once."
|
||||||
:type 'boolean
|
:type 'boolean
|
||||||
:group 'factor)
|
:group 'factor)
|
||||||
|
|
||||||
(defcustom factor-indent-tabs-mode nil
|
(defcustom factor-indent-level 4
|
||||||
"Indentation can insert tabs in Factor mode if this is non-nil."
|
|
||||||
:type 'boolean
|
|
||||||
:safe 'booleanp
|
|
||||||
:group 'factor)
|
|
||||||
|
|
||||||
(defcustom factor-indent-level 2
|
|
||||||
"Indentation of Factor statements."
|
"Indentation of Factor statements."
|
||||||
:type 'integer
|
:type 'integer
|
||||||
:safe 'integerp
|
:safe 'integerp
|
||||||
|
@ -287,7 +281,7 @@ source/docs/tests file. When set to false, you'll be asked only once."
|
||||||
(factor-second-word-regex
|
(factor-second-word-regex
|
||||||
'("IN:" "USE:" "FROM:" "EXCLUDE:" "QUALIFIED:" "QUALIFIED-WITH:")))
|
'("IN:" "USE:" "FROM:" "EXCLUDE:" "QUALIFIED:" "QUALIFIED-WITH:")))
|
||||||
|
|
||||||
(defconst factor-using-lines-regex "^\\(USING\\):[ \n\t]+\\([^;]*\\);")
|
(defconst factor-using-lines-regex "^\\(USING\\):[ \n]+\\([^;\t]*\\);")
|
||||||
|
|
||||||
(defconst factor-int-constant-def-regex
|
(defconst factor-int-constant-def-regex
|
||||||
(factor-second-word-regex '("ALIEN:" "CHAR:" "NAN:")))
|
(factor-second-word-regex '("ALIEN:" "CHAR:" "NAN:")))
|
||||||
|
@ -301,10 +295,10 @@ source/docs/tests file. When set to false, you'll be asked only once."
|
||||||
(factor-second-word-regex '("ERROR:")))
|
(factor-second-word-regex '("ERROR:")))
|
||||||
|
|
||||||
(defconst factor-simple-tuple-decl-regex
|
(defconst factor-simple-tuple-decl-regex
|
||||||
"\\(TUPLE\\):[ \n\t]+\\(\\w+\\)[ \n\t]+\\([^;]+\\);")
|
"\\(TUPLE\\):[ \n]+\\(\\w+\\)[ \n]+\\([^\t;]+\\);")
|
||||||
|
|
||||||
(defconst factor-subclassed-tuple-decl-regex
|
(defconst factor-subclassed-tuple-decl-regex
|
||||||
"\\(TUPLE\\):[ \n\t]+\\(\\(?:\\sw\\|\\s_\\)+\\)[ \n\t]+<[ \n\t]+\\(\\(?:\\sw\\|\\s_\\)+\\)[ \n\t]+\\([^;]+\\);")
|
"\\(TUPLE\\):[ \n]+\\(\\(?:\\sw\\|\\s_\\)+\\)[ \n]+<[ \n]+\\(\\(?:\\sw\\|\\s_\\)+\\)[ \n]+\\([^\t;]+\\);")
|
||||||
|
|
||||||
(defconst factor-constructor-regex
|
(defconst factor-constructor-regex
|
||||||
"<[^ >]+>")
|
"<[^ >]+>")
|
||||||
|
@ -491,7 +485,8 @@ source/docs/tests file. When set to false, you'll be asked only once."
|
||||||
(,factor-bad-string-regex . 'factor-font-lock-invalid-syntax)
|
(,factor-bad-string-regex . 'factor-font-lock-invalid-syntax)
|
||||||
("\\_<\\(P\\|SBUF\\|DLL\\)\"" 1 'factor-font-lock-parsing-word)
|
("\\_<\\(P\\|SBUF\\|DLL\\)\"" 1 'factor-font-lock-parsing-word)
|
||||||
(,factor-constant-words-regex . 'factor-font-lock-constant)
|
(,factor-constant-words-regex . 'factor-font-lock-constant)
|
||||||
(,factor-parsing-words-regex . 'factor-font-lock-parsing-word)))
|
(,factor-parsing-words-regex . 'factor-font-lock-parsing-word)
|
||||||
|
(,"\t" . 'whitespace-highlight-face)))
|
||||||
|
|
||||||
;; Handling of multi-line constructs
|
;; Handling of multi-line constructs
|
||||||
(defun factor-font-lock-extend-region ()
|
(defun factor-font-lock-extend-region ()
|
||||||
|
@ -862,7 +857,8 @@ With prefix, non-existing files will be created."
|
||||||
(append '(?\] ?\} ?\n) electric-indent-chars))
|
(append '(?\] ?\} ?\n) electric-indent-chars))
|
||||||
|
|
||||||
(setq-local indent-line-function 'factor-indent-line)
|
(setq-local indent-line-function 'factor-indent-line)
|
||||||
(setq-local indent-tabs-mode factor-indent-tabs-mode)
|
;; No tabs for you!!
|
||||||
|
(setq-local indent-tabs-mode nil)
|
||||||
|
|
||||||
(setq-local beginning-of-defun-function 'factor-beginning-of-defun)
|
(setq-local beginning-of-defun-function 'factor-beginning-of-defun)
|
||||||
(setq-local end-of-defun-function 'factor-end-of-defun))
|
(setq-local end-of-defun-function 'factor-end-of-defun))
|
||||||
|
|
Loading…
Reference in New Issue