Mercurial > emacs
changeset 96043:a678c02d0c40
Use buffer-face-mode for mouse font menu
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1252
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 17 Jun 2008 11:28:06 +0000 |
parents | dfc9ab5fbea5 |
children | c1ef445563bb |
files | lisp/ChangeLog lisp/mouse.el |
diffstat | 2 files changed, 8 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Jun 17 11:27:51 2008 +0000 +++ b/lisp/ChangeLog Tue Jun 17 11:28:06 2008 +0000 @@ -1,5 +1,7 @@ 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)
--- a/lisp/mouse.el Tue Jun 17 11:27:51 2008 +0000 +++ b/lisp/mouse.el Tue Jun 17 11:28:06 2008 +0000 @@ -2521,22 +2521,15 @@ (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.