FUEL: readding factor-method-definition-regex
It is needed by the fuel-refactor--def-word function.char-rename
parent
ecb462cf29
commit
5345e32b84
|
@ -275,16 +275,17 @@ these lines in your .emacs:
|
||||||
(defconst factor-bad-string-regex
|
(defconst factor-bad-string-regex
|
||||||
"\\_<\"[^>]\\([^\"\n]\\|\\\\\"\\)*\n")
|
"\\_<\"[^>]\\([^\"\n]\\|\\\\\"\\)*\n")
|
||||||
|
|
||||||
(defconst factor-word-starters
|
|
||||||
'(":" "::" "GENERIC:" "GENERIC#" "DEFER:" "HOOK:"
|
|
||||||
"MACRO:" "MACRO::" "MATH:" "MEMO:" "MEMO::"
|
|
||||||
"POSTPONE:" "PRIMITIVE:" "SYNTAX:" "TYPED:" "TYPED::"))
|
|
||||||
|
|
||||||
(defconst factor-word-definition-regex
|
(defconst factor-word-definition-regex
|
||||||
(concat
|
(concat
|
||||||
(format "\\_<\\(%s\\)" (regexp-opt factor-word-starters))
|
(one-symbol (regexp-opt
|
||||||
|
'(":" "::" "GENERIC:" "GENERIC#" "DEFER:" "HOOK:"
|
||||||
|
"MACRO:" "MACRO::" "MATH:" "MEMO:" "MEMO::"
|
||||||
|
"POSTPONE:" "PRIMITIVE:" "SYNTAX:" "TYPED:" "TYPED::")))
|
||||||
ws+ symbol))
|
ws+ symbol))
|
||||||
|
|
||||||
|
(defconst factor-method-definition-regex
|
||||||
|
(syntax-and-2-symbols '("M" "M:" "BEFORE" "AFTER")))
|
||||||
|
|
||||||
;; [parsing-word] [vocab-word]
|
;; [parsing-word] [vocab-word]
|
||||||
(defconst factor-vocab-ref-regex
|
(defconst factor-vocab-ref-regex
|
||||||
(syntax-and-1-symbol '("IN" "USE" "QUALIFIED")))
|
(syntax-and-1-symbol '("IN" "USE" "QUALIFIED")))
|
||||||
|
@ -454,8 +455,7 @@ these lines in your .emacs:
|
||||||
(,factor-float-regex . 'factor-font-lock-number)
|
(,factor-float-regex . 'factor-font-lock-number)
|
||||||
(,factor-ratio-regex . 'factor-font-lock-ratio)
|
(,factor-ratio-regex . 'factor-font-lock-ratio)
|
||||||
,(factor-syntax factor-type-definition-regex '("P" "T"))
|
,(factor-syntax factor-type-definition-regex '("P" "T"))
|
||||||
,(factor-syntax (syntax-and-2-symbols '("M" "M:" "BEFORE" "AFTER"))
|
,(factor-syntax factor-method-definition-regex '("P" "T" "W"))
|
||||||
'("P" "T" "W"))
|
|
||||||
|
|
||||||
;; Highlights tuple and struct definitions. The TUPLE/STRUCT
|
;; Highlights tuple and struct definitions. The TUPLE/STRUCT
|
||||||
;; parsing word, class name and optional parent classes are
|
;; parsing word, class name and optional parent classes are
|
||||||
|
|
|
@ -213,7 +213,7 @@ The word's body is put in a new method for the generic."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(factor-beginning-of-defun)
|
(factor-beginning-of-defun)
|
||||||
(or (and (looking-at factor-method-definition-regex)
|
(or (and (looking-at factor-method-definition-regex)
|
||||||
(match-string-no-properties 2))
|
(match-string-no-properties 3))
|
||||||
(and (looking-at factor-word-definition-regex)
|
(and (looking-at factor-word-definition-regex)
|
||||||
(match-string-no-properties 2)))))
|
(match-string-no-properties 2)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue