[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 330cf1a 1/2: Resurrect the lost optional fixed font
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 330cf1a 1/2: Resurrect the lost optional fixed font menu on w32 |
Date: |
Tue, 17 Mar 2015 18:32:34 +0000 |
branch: master
commit 330cf1a71787946b9fd4c74bad0e66c1bad7fa7f
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Resurrect the lost optional fixed font menu on w32
lisp/mouse.el (mouse-appearance-menu): If w32-use-w32-font-dialog is
nil, construct a menu of fixed fonts. This resurrects a feature
lost in Emacs 23.
lisp/w32-vars.el (w32-use-w32-font-dialog): Add a ':set' function to
reset mouse-appearance-menu-map, so the font dialog is recomputed
the next time the menu is requested.
(w32-fixed-font-alist): Fix to use correct names of Courier fonts.
---
lisp/ChangeLog | 11 +++++++++++
lisp/mouse.el | 11 ++++++++---
lisp/w32-vars.el | 17 ++++++++++++-----
3 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9647822..b29694b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
+2015-03-17 Eli Zaretskii <address@hidden>
+
+ * mouse.el (mouse-appearance-menu): If w32-use-w32-font-dialog is
+ nil, construct a menu of fixed fonts. This resurrects a feature
+ lost in Emacs 23.
+
+ * w32-vars.el (w32-use-w32-font-dialog): Add a ':set' function to
+ reset mouse-appearance-menu-map, so the font dialog is recomputed
+ the next time the menu is requested.
+ (w32-fixed-font-alist): Fix to use correct names of Courier fonts.
+
2015-03-17 Michael Albinus <address@hidden>
* net/tramp-sh.el (tramp-ssh-controlmaster-options): Change test
diff --git a/lisp/mouse.el b/lisp/mouse.el
index e78eca4..be9562c 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1820,13 +1820,18 @@ choose a font."
(define-key mouse-appearance-menu-map [text-scale-increase]
'(menu-item "Increase Buffer Text Size" text-scale-increase))
;; Font selector
- (if (functionp 'x-select-font)
+ (if (and (functionp 'x-select-font)
+ (or (not (boundp 'w32-use-w32-font-dialog))
+ w32-use-w32-font-dialog))
(define-key mouse-appearance-menu-map [x-select-font]
'(menu-item "Change Buffer Font..." x-select-font))
;; If the select-font is unavailable, construct a menu.
(let ((font-submenu (make-sparse-keymap "Change Text Font"))
- (font-alist (cdr (append x-fixed-font-alist
- (list (generate-fontset-menu))))))
+ (font-alist (cdr (append
+ (if (eq system-type 'windows-nt)
+ w32-fixed-font-alist
+ x-fixed-font-alist)
+ (list (generate-fontset-menu))))))
(dolist (family font-alist)
(let* ((submenu-name (car family))
(submenu-map (make-sparse-keymap submenu-name)))
diff --git a/lisp/w32-vars.el b/lisp/w32-vars.el
index ae42ee7..f9212be 100644
--- a/lisp/w32-vars.el
+++ b/lisp/w32-vars.el
@@ -34,10 +34,17 @@
;; Redefine the font selection to use the standard W32 dialog
(defcustom w32-use-w32-font-dialog t
- "Use the standard font dialog.
+ "If non-nil, use the standard Windows font dialog for font selection.
If nil, pop up a menu of a fixed set of fonts including fontsets, like
-X does. See `w32-fixed-font-alist' for the font menu definition."
+X does. See `w32-fixed-font-alist' for the fonts to appear in the menu.
+
+Setting this variable directly does not have any effect;
+use either \\[customize] or set `mouse-appearance-menu-map' to nil
+after changing the value of this variable."
:type 'boolean
+ :set (lambda (symbol value)
+ (set symbol value)
+ (setq mouse-appearance-menu-map nil))
:group 'w32)
(defvar w32-list-proportional-fonts nil
@@ -104,11 +111,11 @@ X does. See `w32-fixed-font-alist' for the font menu
definition."
"-*-Lucida Sans Typewriter-semibold-r-*-*-16-*-*-*-c-*-iso8859-1"))
("Courier"
("Courier 10x8"
- "-*-Courier-*normal-r-*-*-*-97-*-*-c-80-iso8859-1")
+ "-*-Courier New-normal-r-*-*-*-97-*-*-c-80-iso8859-1")
("Courier 12x9"
- "-*-Courier-*normal-r-*-*-*-120-*-*-c-90-iso8859-1")
+ "-*-Courier New-normal-r-*-*-*-120-*-*-c-90-iso8859-1")
("Courier 15x12"
- "-*-Courier-*normal-r-*-*-*-150-*-*-c-120-iso8859-1")
+ "-*-Courier New-normal-r-*-*-*-150-*-*-c-120-iso8859-1")
;; For these, we specify the point height.
("")
("8" "-*-Courier New-normal-r-*-*-11-*-*-*-c-*-iso8859-1")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 330cf1a 1/2: Resurrect the lost optional fixed font menu on w32,
Eli Zaretskii <=