The idea is to redefine set-face-attribute
so that it sets face attributes normally except for the :weight
attribute, which shall always be set to normal
(the default value, I think). With this I hope to disable bold fonts in Emacs once and for all.
I got this:
(fset 'original-set-face-attribute (symbol-function 'set-face-attribute))
(defun set-face-attribute (face frame &rest args)
(progn
(original-set-face-attribute face frame args)))
So far, it doesn't work. If I do (make-face-bold 'default)
I get Wrong type argument: symbolp, (:weight bold)
. I think what I have
to do is remove elements that contain :weight
from the list of arguments
args
.
defalias
instead offset
. (2) BecauseARGS
is a&rest
parameter, you need to useapply
:(apply #'original-set-face-attributes face frame args)
. – Drewbold
on faces (on MS Windows, at least), I prefer to simply redefine the individual faces. For one thing, there is usually something else I want to change about them, if they usebold
. – Drewbold
from all of them. But then again, some of them I never see. I guess I fix faces to be what I want on an as-needed (and as-seen) basis. – Drew:bold nil
. I do the same for other attributes also. Here is an example:(make-face 'linum-active) (set-face-attribute 'linum-active nil :foreground "black" :background "#eab700" :bold nil :italic nil :underline nil :box nil :overline nil :height 180)
– lawlist