Use defface, not make-face, for creating font lock faces
Bug #328838 reported by
Osku-salerma
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Medium
|
Andreas Roehler |
Bug Description
The normal way of customizing font lock faces does not
work with python-mode since it does not use the defface
function. The attached patch against python-mode 4.7
fixes this, and one can now use customize-faces to
customize python-mode's faces.
This is tested on emacs 21.4; I have no idea if xemacs
support this or not.
[http://
Related branches
lp:~a-roehler/python-mode/myrkwid
- python-mode.el developers: Pending requested
-
Diff: 5004 lines (+2516/-1849)5 files modifiedUnicodeEncodeError-lp:550661-test.py (+4/-0)
py-bug-numbered-tests.el (+738/-245)
python-mode-test.el (+202/-0)
python-mode-tests.sh (+88/-0)
python-mode.el (+1484/-1604)
Changed in python-mode: | |
assignee: | nobody → Andreas Roehler (a-roehler) |
Changed in python-mode: | |
status: | Confirmed → In Progress |
Changed in python-mode: | |
status: | In Progress → Fix Committed |
Changed in python-mode: | |
milestone: | none → 6.0 |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
XEmacs has defface. Can you compare this documentation with what's in
GNU Emacs? I don't have a recent GNU Emacs handy. /usr/bin/emacs on my
Mac says it's version 21.2.1. Apropos in that environment does not turn
up
a defface macro. Is it a recent addition?
`defface' (buffer: *Hyper Apropos*, mode: Hyper-Apropos)
Compiled Lisp macro, skip/src/ xemacs- 21.5/lisp/ custom. elc"):
(loaded from "/Users/
arguments: (face spec doc &rest args)
Declare FACE as a customizable face that defaults to SPEC.
FACE does not need to be quoted.
Third argument DOC is the face documentation.
If FACE has been set with `custom-set-face', set the face attributes
as specified by that function, otherwise set the face attributes
according to SPEC.
The remaining arguments should have the form
[KEYWORD VALUE]...
The following KEYWORDs are defined:
:group VALUE should be a customization group.
Add FACE to that group.
SPEC should be an alist of the form ((DISPLAY ATTS)...).
ATTS is a list of face attributes and their values. The possible face-attributes '.
attributes are defined in the variable `custom-
The ATTS of the first entry in SPEC where the DISPLAY matches the
frame should take effect in that frame. DISPLAY can either be the
symbol t, which will match all frames, or an alist of the form
((REQ ITEM...)...)
For the DISPLAY to match a FRAME, the REQ property of the frame must
match one of the ITEM. The following REQ are defined:
`type' (the value of `window-system')
Should be one of `x', `mswindows', or `tty'.
`class' (the frame's color support)
Should be one of `color', `grayscale', or `mono'.
`background' (what color is used for the background text)
Should be one of `light' or `dark'.
Read the section about customization in the Emacs Lisp manual for more
information.