Commit 4271b424 authored by Miles Bader's avatar Miles Bader
Browse files

Use buffer-face-mode for mouse font menu

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1252
parent d7ed971d
2008-06-17 Miles Bader <miles@gnu.org>
* mouse.el (mouse-appearance-menu): Use buffer-face-mode.
* face-remap.el (buffer-face-mode-face)
(buffer-face-mode-remapping): New variables.
(buffer-face-mode, buffer-face-set, buffer-face-toggle)
......
......@@ -2521,22 +2521,15 @@ choose a font."
(text-scale-increase -1))
((eq choice 'face-remap-reset-base)
(text-scale-mode 0)
(let ((entry (assq 'default face-remapping-alist)))
(when entry
(setq face-remapping-alist
(remq entry face-remapping-alist))
(force-window-update (current-buffer)))))
(buffer-face-mode 0))
(t
;; Either choice == 'x-select-font, or choice is a
;; symbol whose name is a font.
(make-local-variable 'face-remapping-alist)
(apply 'face-remap-add-relative
'default
(font-face-attributes
(if (eq choice 'x-select-font)
(x-select-font)
(symbol-name choice))))
(force-window-update (current-buffer))))))))
(buffer-face-mode-invoke (font-face-attributes
(if (eq choice 'x-select-font)
(x-select-font)
(symbol-name choice)))
t (interactive-p))))))))
;;; Bindings for mouse commands.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment