Let me say first my English is not so good and I'm totally new to Emacs.
In Org-Mode I can specify a monospace font in code-blocks while using a proportional font in normal text.
So I defined a proportional font as my default font.
But if I open now for example a shell script or
init.el, I get syntax highlighting but no monospace font.
I can change each different item using
M-x describe-face and set there a font.
Unfortunately this would force me to change the font for each item, for example (default ‘font-lock-comment-face’) for comments but it would be more easy to set a proportional font for plain text (files) in general.
An other possibility would be as a workaround to apply a specific font for the current buffer using a keyboard shortcut.
How can I configure one or both possibilities?
No, I configured Org Mode that way having a proportional font as default (via Menu 'default font') and monospace font for code-blocks, what is ok for me. But when I open a shell-script for exemple, it will be opened in my default-font not monospace as I would expect.
The function shown above does work fine for Org-mode but it does not enable me changing the font for files which does need monospace. I'm not talking about code blocks here but opening for exemple a shell script in monospace font, a plain text 'file.txt' in proportional font.
Yes, but that's exact my question how to set in a general way. But I think I explained this before... didn't meant expectation that way - but how to reach this target in general. I would suppose most people who use Emacs in a more literary way use a monospace font for code files nevertheless... But how do they realize this without editing each single item (meaning by mime type or ending). This because Emacs recognize a shell script for exemple and does correct syntax highlighting but not changing to a monospace font?