Reputation: 25986
I would really like to have the italic style disabled in Emacs.
In this post it is explained how to disable bold and underline, but not italic.
Does anyone know how to do that?
Using tab-completion, I can see I have these available
set-face-background set-face-background-pixmap
set-face-font set-face-foreground
set-face-inverse-video-p set-face-stipple
set-face-underline set-face-underline-p
Upvotes: 4
Views: 4117
Reputation: 667
emacs 25.x here:
M-x make-face-unitalic <ENTER>
default <ЕNTER> # <- your answer to "Make which face unitalic:"
Sometimes the above does not work, then try these extra commands:
C-x h # select all of the text
M-x make-face-unitalic < ENTER>
<ENTER> # <-- selects the default option to apply it to whole region
C-g # deselect region
Upvotes: 1
Reputation: 20372
Since emacs 24.4:
(set-face-italic 'font-lock-comment-face nil)
Upvotes: 6
Reputation: 723
M-x customize-face RET italic RET
Change the slant
property to "normal."
An ugly hack (bug or feature?) is to use a font that has no italic, like Terminus. That's what I use. I have sometimes set italic to inherit from variable-pitch instead of default and that creates an italic when the font has no slanted version.
Upvotes: 2
Reputation: 56595
It's actually done in a very similar manner:
(set-face-italic-p 'italic nil)
Refer to the function's documentation for further details(C-h f set-face-italic-p)
Upvotes: 9