@@ -188,6 +188,43 @@ the Emacs bell is also rung as a warning.")
188188 )
189189 " *Additional keywords to highlight `python-mode' buffers." )
190190
191+ ; ; These are taken from XEmacs 19.12's font-lock.el file. I prefer
192+ ; ; these myself, but which do you think are better?
193+ ; ;
194+ ; ;(defconst python-font-lock-keywords
195+ ; ; (purecopy
196+ ; ; (list
197+ ; ; (cons (concat "\\ b\\ ("
198+ ; ; (mapconcat 'identity
199+ ; ; '("access" "del" "from"
200+ ; ; "lambda" "return" "and"
201+ ; ; "elif" "global" "not"
202+ ; ; "try:" "break " "else:"
203+ ; ; "if" "or" "while"
204+ ; ; "except" "except:" "import"
205+ ; ; "pass" "continue" "finally:"
206+ ; ; "in" "print" "for"
207+ ; ; "is" "raise")
208+ ; ; "\\ |")
209+ ; ; "\\ )[ \n\t(]")
210+ ; ; 1)
211+ ; ; '("\\ bclass[ \t]+\\ ([a-zA-Z_]+[a-zA-Z0-9_]*\\ )"
212+ ; ; 1 font-lock-type-face)
213+ ; ; '("\\ bdef[ \t]+\\ ([a-zA-Z_]+[a-zA-Z0-9_]*\\ )"
214+ ; ; 1 font-lock-function-name-face)
215+ ; ; ))
216+ ; ; "Additional expressions to highlight in Python mode.")
217+
218+ ; ; R Lindsay Todd <[email protected] > suggests these changes to the219+ ; ; original keywords, which wouldn't be necessary if we go with the
220+ ; ; XEmacs defaults, but which I agree makes sense without them.
221+ ; ;
222+ ; ; functions
223+ ; ; '("\\ bdef\\ s +\\ (\\ sw+\\ )\\ s *(" 1 font-lock-function-name-face)
224+ ; ; classes
225+ ; ; '("\\ bclass\\ s +\\ (\\ sw+\\ )\\ s *[(:]" 1 font-lock-type-face)
226+
227+
191228
192229; ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
193230; ; NO USER DEFINABLE VARIABLES BEYOND THIS POINT
0 commit comments