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.
This commit is contained in:
parent
508049aae9
commit
330cf1a717
3 changed files with 31 additions and 8 deletions
|
@ -1,3 +1,14 @@
|
|||
2015-03-17 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* 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 <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp-sh.el (tramp-ssh-controlmaster-options): Change test
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue