diff --git a/README.org b/README.org index e38fe03..45b8bc3 100644 --- a/README.org +++ b/README.org @@ -402,6 +402,27 @@ show a few tweaks to improve visibility without theming: (set-face-attribute 'default nil :height height)))) #+end_src +#+caption[Implement =set-default-face-height=]: +#+caption: Implement =set-default-face-height=. +#+name: lst:set-default-face-height +#+begin_src emacs-lisp + ;; Use proportional font faces in current buffer + (defun set-buffer-variable-pitch-face () + "Set a variable width (proportional) font in current buffer." + (interactive) + (setq buffer-face-mode-face 'variable-pitch) + (buffer-face-mode)) + + ;; Use monospaced font faces in current buffer + (defun set-buffer-fixed-pitch-face () + "Set a fixed width (monospace) font in current buffer." + (interactive) + (setq buffer-face-mode-face 'fixed-pitch) + (buffer-face-mode)) + + (add-hook 'prog-mode-hook #'set-buffer-fixed-pitch-face) +#+end_src + #+caption[Fix a `gtk' color and implement =invert-default-face=]: #+caption: Fix a `gtk' color and implement =invert-default-face=. #+name: lst:fix-gtk-color-for-invert-default-face