Use setq-local' instead of
setq'; `let' binding fails
This commit is contained in:
parent
b739c13005
commit
e488cb26d4
@ -622,15 +622,15 @@ verse and quote blocks are fontified using the `org-verse' and
|
|||||||
(defun set-buffer-variable-pitch-face ()
|
(defun set-buffer-variable-pitch-face ()
|
||||||
"Set a variable width (proportional) font in current buffer."
|
"Set a variable width (proportional) font in current buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((buffer-face-mode-face 'variable-pitch))
|
(setq-local buffer-face-mode-face 'variable-pitch)
|
||||||
(buffer-face-mode)))
|
(buffer-face-mode))
|
||||||
|
|
||||||
;; Use monospaced font faces in current buffer
|
;; Use monospaced font faces in current buffer
|
||||||
(defun set-buffer-fixed-pitch-face ()
|
(defun set-buffer-fixed-pitch-face ()
|
||||||
"Set a fixed width (monospace) font in current buffer."
|
"Set a fixed width (monospace) font in current buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((buffer-face-mode-face 'fixed-pitch))
|
(setq-local buffer-face-mode-face 'fixed-pitch)
|
||||||
(buffer-face-mode)))
|
(buffer-face-mode))
|
||||||
|
|
||||||
(add-hook 'magit-mode-hook #'set-buffer-fixed-pitch-face)
|
(add-hook 'magit-mode-hook #'set-buffer-fixed-pitch-face)
|
||||||
(add-hook 'prog-mode-hook #'set-buffer-fixed-pitch-face)
|
(add-hook 'prog-mode-hook #'set-buffer-fixed-pitch-face)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user