Mercurial > emacs
comparison lisp/term/w32-win.el @ 95892:bb82cfdc467f
(mouse-set-font): Remove overridden function.
(w32-select-font): Declare as obsolete alias for x-select-font.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Fri, 13 Jun 2008 14:27:49 +0000 |
parents | b4e36ff621b3 |
children | 0b232de63205 |
comparison
equal
deleted
inserted
replaced
95891:11cd8097e8d0 | 95892:bb82cfdc467f |
---|---|
76 (require 'select) | 76 (require 'select) |
77 (require 'menu-bar) | 77 (require 'menu-bar) |
78 (require 'dnd) | 78 (require 'dnd) |
79 (require 'w32-vars) | 79 (require 'w32-vars) |
80 | 80 |
81 ;; Keep an obsolete alias for w32-focus-frame in case it is used by code | 81 ;; Keep an obsolete alias for w32-focus-frame and w32-select-font in case |
82 ;; outside Emacs. | 82 ;; they are used by code outside Emacs. |
83 (define-obsolete-function-alias 'w32-focus-frame 'x-focus-frame "23.1") | 83 (define-obsolete-function-alias 'w32-focus-frame 'x-focus-frame "23.1") |
84 (define-obsolete-function-alias 'w32-select-font 'x-select-font "23.1") | |
84 | 85 |
85 (defvar xlfd-regexp-registry-subnum) | 86 (defvar xlfd-regexp-registry-subnum) |
86 (defvar w32-color-map) ;; defined in w32fns.c | 87 (defvar w32-color-map) ;; defined in w32fns.c |
87 | 88 |
88 (declare-function w32-send-sys-command "w32fns.c") | 89 (declare-function w32-send-sys-command "w32fns.c") |
89 (declare-function w32-select-font "w32fns.c") | |
90 (declare-function set-message-beep "w32console.c") | 90 (declare-function set-message-beep "w32console.c") |
91 | 91 |
92 ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles | 92 ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles |
93 (if (fboundp 'new-fontset) | 93 (if (fboundp 'new-fontset) |
94 (require 'fontset)) | 94 (require 'fontset)) |
419 | 419 |
420 (defun x-win-suspend-error () | 420 (defun x-win-suspend-error () |
421 "Report an error when a suspend is attempted." | 421 "Report an error when a suspend is attempted." |
422 (error "Suspending an Emacs running under W32 makes no sense")) | 422 (error "Suspending an Emacs running under W32 makes no sense")) |
423 | 423 |
424 (declare-function generate-fontset-menu "fontset" ()) | |
425 | |
426 (defun mouse-set-font (&rest fonts) | |
427 "Select an Emacs font from a list of known good fonts and fontsets. | |
428 | |
429 If `w32-use-w32-font-dialog' is non-nil (the default), use the Windows | |
430 font dialog to display the list of possible fonts. Otherwise use a | |
431 pop-up menu (like Emacs does on other platforms) initialized with | |
432 the fonts in `w32-fixed-font-alist'. | |
433 If `w32-list-proportional-fonts' is non-nil, add proportional fonts | |
434 to the list in the font selection dialog (the fonts listed by the | |
435 pop-up menu are unaffected by `w32-list-proportional-fonts')." | |
436 (interactive | |
437 (if w32-use-w32-font-dialog | |
438 (let ((chosen-font (w32-select-font (selected-frame) | |
439 w32-list-proportional-fonts))) | |
440 (and chosen-font (list chosen-font))) | |
441 (x-popup-menu | |
442 last-nonmenu-event | |
443 ;; Append list of fontsets currently defined. | |
444 ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles | |
445 (if (fboundp 'new-fontset) | |
446 (append w32-fixed-font-alist (list (generate-fontset-menu))))))) | |
447 (if fonts | |
448 (let (font) | |
449 (while fonts | |
450 (condition-case nil | |
451 (progn | |
452 (setq font (car fonts)) | |
453 (set-default-font font) | |
454 (setq fonts nil)) | |
455 (error (setq fonts (cdr fonts))))) | |
456 (if (null font) | |
457 (error "Font not found"))))) | |
458 | |
459 (defvar image-library-alist) | 424 (defvar image-library-alist) |
460 | 425 |
461 ;;; Set default known names for image libraries | 426 ;;; Set default known names for image libraries |
462 (setq image-library-alist | 427 (setq image-library-alist |
463 '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll") | 428 '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll") |