As seen below, special words such as functions, types... are rendered with bold font. But the remaining part of the code is not bold. I want to change this behavior.

Ugly bold highlight

How can I do this? Any idea?

Thanks in advance...

  • Did you try customize-face?
    – catemperor
    May 11, 2017 at 17:29
  • I tried (set-face-attribute font-lock-type-face :weight "normal") but it seems to be not working. May 12, 2017 at 6:06
  • (set-face-attribute 'font-lock-type-face nil :weight 'normal) May 14, 2017 at 10:24
  • Thank you @MathieuMarques (set-face-attribute 'font-lock-keyword-face nil :weight 'normal) worked perfectly. I had to change from "normal" to 'normal. I put this statement into user-config() section in config file. May 14, 2017 at 10:37

1 Answer 1


You were missing a parameter when calling set-face-attribute. Also, the value for weight is a symbol and not a string.

(set-face-attribute 'font-lock-type-face nil :weight 'normal)

Here is a list of the font-lock faces: https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces-for-Font-Lock.html.

However, if you simply want to un-boldify everything try the following.

   (lambda (face)
     (when (eq (face-attribute face :weight) 'bold)
       (set-face-attribute face nil :weight 'normal)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.