In particular, `match' gets used heavily as a method name when working
with regices, so bolding it everywhere is quite bad.
python-indent-offset 2
python-fill-docstring-style 'symmetric)
python-indent-offset 2
python-fill-docstring-style 'symmetric)
-(defun mdw-fontify-pythonic (keywords builtins)
+(defun mdw-fontify-pythonic (keywords soft-keywords builtins)
;; Miscellaneous fiddling.
(mdw-standard-fill-prefix "\\([ \t]*#+[ \t]*\\)")
;; Miscellaneous fiddling.
(mdw-standard-fill-prefix "\\([ \t]*#+[ \t]*\\)")
;; Set up the keywords defined above.
(list (concat "\\_<\\(" keywords "\\)\\_>")
'(0 font-lock-keyword-face))
;; Set up the keywords defined above.
(list (concat "\\_<\\(" keywords "\\)\\_>")
'(0 font-lock-keyword-face))
+ (list (concat "\\(^\\|[^.]\\)\\_<\\(" soft-keywords "\\)\\_>")
+ '(2 font-lock-keyword-face))
(list (concat "\\(^\\|[^.]\\)\\_<\\(" builtins "\\)\\_>")
'(2 font-lock-variable-name-face))
(list (concat "\\_<\\(__\\(\\sw+\\|\\s_+\\)+__\\)\\_>")
(list (concat "\\(^\\|[^.]\\)\\_<\\(" builtins "\\)\\_>")
'(2 font-lock-variable-name-face))
(list (concat "\\_<\\(__\\(\\sw+\\|\\s_+\\)+__\\)\\_>")
(mdw-fontify-pythonic
(mdw-regexps "and" "as" "assert" "async" "await"
"break"
(mdw-fontify-pythonic
(mdw-regexps "and" "as" "assert" "async" "await"
"break"
- "case" "class" "continue"
"def" "del"
"elif" "else" "except" ;"exec"
"finally" "for" "from"
"global"
"if" "import" "in" "is"
"lambda"
"def" "del"
"elif" "else" "except" ;"exec"
"finally" "for" "from"
"global"
"if" "import" "in" "is"
"lambda"
+ (mdw-regexps "case"
+ "match")
+
(mdw-regexps "Ellipsis"
"False"
"None" "NotImplemented"
(mdw-regexps "Ellipsis"
"False"
"None" "NotImplemented"
"import" "in" "is" "lambda" "not" "or" "pass" "print"
"property" "raise" "return" "struct" "try" "while" "with"
"yield")
"import" "in" "is" "lambda" "not" "or" "pass" "print"
"property" "raise" "return" "struct" "try" "while" "with"
"yield")
""))
(define-derived-mode pyrex-mode python-mode "Pyrex"
""))
(define-derived-mode pyrex-mode python-mode "Pyrex"