Mercurial > emacs
annotate lisp/term/w32-win.el @ 32786:3d21222bc794
Andrew Choi <akochoi@i-cable.com>
* international/mule-conf.el (mac-roman-lower, mac-roman-upper):
New charsets.
* term/mac-win.el: Remove definitions of mac-roman-lower and
mac-roman-upper, require dired, and define instead of set
mac-ready-for-drag-n-drop to avoid compilation error.
* src/macterm.c (XTread_socket): check whether Lisp variable
mac-ready-for-drag-n-drop is bound rather than non-nil value.
author | Andrew Choi <akochoi@shaw.ca> |
---|---|
date | Mon, 23 Oct 2000 17:49:59 +0000 |
parents | c6e051bf5f2e |
children | fa597347c65f |
rev | line source |
---|---|
16889
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
1 ;;; w32-win.el --- parse switches controlling interface with W32 window system. |
14170
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
2 |
13434 | 3 ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. |
4 | |
5 ;; Author: Kevin Gallo | |
6 ;; Keywords: terminals | |
7 | |
14170
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
8 ;; This file is part of GNU Emacs. |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
9 |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
10 ;; GNU Emacs is free software; you can redistribute it and/or modify |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
11 ;; it under the terms of the GNU General Public License as published by |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
12 ;; the Free Software Foundation; either version 2, or (at your option) |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
13 ;; any later version. |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
14 |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
15 ;; GNU Emacs is distributed in the hope that it will be useful, |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
18 ;; GNU General Public License for more details. |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
19 |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
20 ;; You should have received a copy of the GNU General Public License |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
23 ;; Boston, MA 02111-1307, USA. |
13434 | 24 |
25 ;;; Commentary: | |
26 | |
16889
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
27 ;; w32-win.el: this file is loaded from ../lisp/startup.el when it recognizes |
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
28 ;; that W32 windows are to be used. Command line switches are parsed and those |
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
29 ;; pertaining to W32 are processed and removed from the command line. The |
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
30 ;; W32 display is opened and hooks are set for popping up the initial window. |
13434 | 31 |
32 ;; startup.el will then examine startup files, and eventually call the hooks | |
33 ;; which create the first window (s). | |
34 | |
35 ;;; Code: | |
36 | |
37 | |
38 ;; These are the standard X switches from the Xt Initialize.c file of | |
39 ;; Release 4. | |
40 | |
41 ;; Command line Resource Manager string | |
42 | |
43 ;; +rv *reverseVideo | |
44 ;; +synchronous *synchronous | |
45 ;; -background *background | |
46 ;; -bd *borderColor | |
47 ;; -bg *background | |
48 ;; -bordercolor *borderColor | |
49 ;; -borderwidth .borderWidth | |
50 ;; -bw .borderWidth | |
51 ;; -display .display | |
52 ;; -fg *foreground | |
53 ;; -fn *font | |
54 ;; -font *font | |
55 ;; -foreground *foreground | |
56 ;; -geometry .geometry | |
57 ;; -i .iconType | |
58 ;; -itype .iconType | |
59 ;; -iconic .iconic | |
60 ;; -name .name | |
61 ;; -reverse *reverseVideo | |
62 ;; -rv *reverseVideo | |
63 ;; -selectionTimeout .selectionTimeout | |
64 ;; -synchronous *synchronous | |
65 ;; -xrm | |
66 | |
67 ;; An alist of X options and the function which handles them. See | |
68 ;; ../startup.el. | |
69 | |
16889
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
70 (if (not (eq window-system 'w32)) |
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
71 (error "%s: Loading w32-win.el but not compiled for w32" (invocation-name))) |
13434 | 72 |
73 (require 'frame) | |
74 (require 'mouse) | |
75 (require 'scroll-bar) | |
76 (require 'faces) | |
77 (require 'select) | |
78 (require 'menu-bar) | |
23625
f91f7d21d4ec
Require fontset.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23560
diff
changeset
|
79 (if (fboundp 'new-fontset) |
f91f7d21d4ec
Require fontset.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23560
diff
changeset
|
80 (require 'fontset)) |
13434 | 81 |
15136
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
82 ;; Because Windows scrollbars look and act quite differently compared |
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
83 ;; with the standard X scroll-bars, we don't try to use the normal |
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
84 ;; scroll bar routines. |
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
85 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
86 (defun w32-handle-scroll-bar-event (event) |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
87 "Handle W32 scroll bar EVENT to do normal Window style scrolling." |
15136
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
88 (interactive "e") |
15265
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
89 (let ((old-window (selected-window))) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
90 (unwind-protect |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
91 (let* ((position (event-start event)) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
92 (window (nth 0 position)) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
93 (portion-whole (nth 2 position)) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
94 (bar-part (nth 4 position))) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
95 (save-excursion |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
96 (select-window window) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
97 (cond |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
98 ((eq bar-part 'up) |
19691
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
99 (goto-char (window-start window)) |
15265
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
100 (scroll-down 1)) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
101 ((eq bar-part 'above-handle) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
102 (scroll-down)) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
103 ((eq bar-part 'handle) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
104 (scroll-bar-maybe-set-window-start event)) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
105 ((eq bar-part 'below-handle) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
106 (scroll-up)) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
107 ((eq bar-part 'down) |
19691
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
108 (goto-char (window-start window)) |
15265
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
109 (scroll-up 1)) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
110 ))) |
658224992372
(win32-handle-scroll-bar-event): Restore
Karl Heuer <kwzh@gnu.org>
parents:
15217
diff
changeset
|
111 (select-window old-window)))) |
15136
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
112 |
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
113 ;; The following definition is used for debugging. |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
114 ;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event)) |
15136
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
115 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
116 (global-set-key [vertical-scroll-bar mouse-1] 'w32-handle-scroll-bar-event) |
15136
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
117 |
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
118 ;; (scroll-bar-mode nil) |
13831
2b90a48bb3db
Disable scrollbars until fully functional.
Geoff Voelker <voelker@cs.washington.edu>
parents:
13434
diff
changeset
|
119 |
19691
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
120 (defvar mouse-wheel-scroll-amount 4 |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
121 "*Number of lines to scroll per click of the mouse wheel.") |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
122 |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
123 (defun mouse-wheel-scroll-line (event) |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
124 "Scroll the window in which EVENT occurred by `mouse-wheel-scroll-amount'." |
19691
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
125 (interactive "e") |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
126 (condition-case nil |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
127 (if (< (car (cdr (cdr event))) 0) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
128 (scroll-up mouse-wheel-scroll-amount) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
129 (scroll-down mouse-wheel-scroll-amount)) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
130 (error nil))) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
131 |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
132 ;; for scroll-in-place.el, this way the -scroll-line and -scroll-screen |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
133 ;; commands won't interact |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
134 (setq scroll-command-groups (list '(mouse-wheel-scroll-line))) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
135 |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
136 (defun mouse-wheel-scroll-screen (event) |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
137 "Scroll the window in which EVENT occurred by `mouse-wheel-scroll-amount'." |
19691
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
138 (interactive "e") |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
139 (condition-case nil |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
140 (if (< (car (cdr (cdr event))) 0) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
141 (scroll-up) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
142 (scroll-down)) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
143 (error nil))) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
144 |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
145 ;; Bind the mouse-wheel event: |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
146 (global-set-key [mouse-wheel] 'mouse-wheel-scroll-line) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
147 (global-set-key [C-mouse-wheel] 'mouse-wheel-scroll-screen) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
148 |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
149 (defun w32-drag-n-drop-debug (event) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
150 "Print the drag-n-drop EVENT in a readable form." |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
151 (interactive "e") |
21883
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
152 (princ event)) |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
153 |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
154 (defun w32-drag-n-drop (event) |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
155 "Edit the files listed in the drag-n-drop EVENT. |
21883
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
156 Switch to a buffer editing the last file dropped." |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
157 (interactive "e") |
24664
ce51d492b1ab
(w32-drag-n-drop): Select file in window where
Andrew Innes <andrewi@gnu.org>
parents:
24246
diff
changeset
|
158 (save-excursion |
26573
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
159 ;; Make sure the drop target has positive co-ords |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
160 ;; before setting the selected frame - otherwise it |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
161 ;; won't work. <skx@tardis.ed.ac.uk> |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
162 (let* ((window (posn-window (event-start event))) |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
163 (coords (posn-x-y (event-start event))) |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
164 (x (car coords)) |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
165 (y (cdr coords))) |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
166 (if (and (> x 0) (> y 0)) |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
167 (set-frame-selected-window nil window)) |
27404
dc6ba3cab915
(w32_create_initial_fontsets): Disabled as it conflicts with new face support.
Jason Rumney <jasonr@gnu.org>
parents:
27101
diff
changeset
|
168 (mapcar 'find-file (car (cdr (cdr event))))) |
26573
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
169 (raise-frame))) |
21883
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
170 |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
171 (defun w32-drag-n-drop-other-frame (event) |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
172 "Edit the files listed in the drag-n-drop EVENT, in other frames. |
21883
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
173 May create new frames, or reuse existing ones. The frame editing |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
174 the last file dropped is selected." |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
175 (interactive "e") |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
176 (mapcar 'find-file-other-frame (car (cdr (cdr event))))) |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
177 |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
178 ;; Bind the drag-n-drop event. |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
179 (global-set-key [drag-n-drop] 'w32-drag-n-drop) |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
180 (global-set-key [C-drag-n-drop] 'w32-drag-n-drop-other-frame) |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
181 |
23675
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
182 ;; Keyboard layout/language change events |
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
183 ;; For now ignore language-change events; in the future |
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
184 ;; we should switch the Emacs Input Method to match the |
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
185 ;; new layout/language selected by the user. |
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
186 (global-set-key [language-change] 'ignore) |
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
187 |
13434 | 188 (defvar x-invocation-args) |
189 | |
190 (defvar x-command-line-resources nil) | |
191 | |
192 (defconst x-option-alist | |
193 '(("-bw" . x-handle-numeric-switch) | |
194 ("-d" . x-handle-display) | |
195 ("-display" . x-handle-display) | |
196 ("-name" . x-handle-name-rn-switch) | |
197 ("-rn" . x-handle-name-rn-switch) | |
198 ("-T" . x-handle-switch) | |
199 ("-r" . x-handle-switch) | |
200 ("-rv" . x-handle-switch) | |
201 ("-reverse" . x-handle-switch) | |
202 ("-fn" . x-handle-switch) | |
203 ("-font" . x-handle-switch) | |
204 ("-ib" . x-handle-numeric-switch) | |
205 ("-g" . x-handle-geometry) | |
206 ("-geometry" . x-handle-geometry) | |
207 ("-fg" . x-handle-switch) | |
208 ("-foreground". x-handle-switch) | |
209 ("-bg" . x-handle-switch) | |
210 ("-background". x-handle-switch) | |
211 ("-ms" . x-handle-switch) | |
212 ("-itype" . x-handle-switch) | |
213 ("-i" . x-handle-switch) | |
214 ("-iconic" . x-handle-iconic) | |
215 ("-xrm" . x-handle-xrm-switch) | |
216 ("-cr" . x-handle-switch) | |
217 ("-vb" . x-handle-switch) | |
218 ("-hb" . x-handle-switch) | |
219 ("-bd" . x-handle-switch))) | |
220 | |
221 (defconst x-long-option-alist | |
222 '(("--border-width" . "-bw") | |
223 ("--display" . "-d") | |
224 ("--name" . "-name") | |
225 ("--title" . "-T") | |
226 ("--reverse-video" . "-reverse") | |
227 ("--font" . "-font") | |
228 ("--internal-border" . "-ib") | |
229 ("--geometry" . "-geometry") | |
230 ("--foreground-color" . "-fg") | |
231 ("--background-color" . "-bg") | |
232 ("--mouse-color" . "-ms") | |
233 ("--icon-type" . "-itype") | |
234 ("--iconic" . "-iconic") | |
235 ("--xrm" . "-xrm") | |
236 ("--cursor-color" . "-cr") | |
237 ("--vertical-scroll-bars" . "-vb") | |
238 ("--border-color" . "-bd"))) | |
239 | |
240 (defconst x-switch-definitions | |
241 '(("-name" name) | |
242 ("-T" name) | |
243 ("-r" reverse t) | |
244 ("-rv" reverse t) | |
245 ("-reverse" reverse t) | |
246 ("-fn" font) | |
247 ("-font" font) | |
248 ("-ib" internal-border-width) | |
249 ("-fg" foreground-color) | |
250 ("-foreground" foreground-color) | |
251 ("-bg" background-color) | |
252 ("-background" background-color) | |
253 ("-ms" mouse-color) | |
254 ("-cr" cursor-color) | |
255 ("-itype" icon-type t) | |
256 ("-i" icon-type t) | |
257 ("-vb" vertical-scroll-bars t) | |
258 ("-hb" horizontal-scroll-bars t) | |
259 ("-bd" border-color) | |
260 ("-bw" border-width))) | |
261 | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
262 |
13434 | 263 (defun x-handle-switch (switch) |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
264 "Handle SWITCH of the form \"-switch value\" or \"-switch\"." |
13434 | 265 (let ((aelt (assoc switch x-switch-definitions))) |
266 (if aelt | |
267 (if (nth 2 aelt) | |
268 (setq default-frame-alist | |
269 (cons (cons (nth 1 aelt) (nth 2 aelt)) | |
270 default-frame-alist)) | |
271 (setq default-frame-alist | |
272 (cons (cons (nth 1 aelt) | |
273 (car x-invocation-args)) | |
274 default-frame-alist) | |
275 x-invocation-args (cdr x-invocation-args)))))) | |
276 | |
277 (defun x-handle-iconic (switch) | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
278 "Make \"-iconic\" SWITCH apply only to the initial frame." |
13434 | 279 (setq initial-frame-alist |
280 (cons '(visibility . icon) initial-frame-alist))) | |
281 | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
282 |
13434 | 283 (defun x-handle-numeric-switch (switch) |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
284 "Handle SWITCH of the form \"-switch n\"." |
13434 | 285 (let ((aelt (assoc switch x-switch-definitions))) |
286 (if aelt | |
287 (setq default-frame-alist | |
288 (cons (cons (nth 1 aelt) | |
289 (string-to-int (car x-invocation-args))) | |
290 default-frame-alist) | |
291 x-invocation-args | |
292 (cdr x-invocation-args))))) | |
293 | |
294 (defun x-handle-xrm-switch (switch) | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
295 "Handle the \"-xrm\" SWITCH." |
13434 | 296 (or (consp x-invocation-args) |
297 (error "%s: missing argument to `%s' option" (invocation-name) switch)) | |
298 (setq x-command-line-resources (car x-invocation-args)) | |
299 (setq x-invocation-args (cdr x-invocation-args))) | |
300 | |
301 (defun x-handle-geometry (switch) | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
302 "Handle the \"-geometry\" SWITCH." |
13434 | 303 (let ((geo (x-parse-geometry (car x-invocation-args)))) |
304 (setq initial-frame-alist | |
305 (append initial-frame-alist | |
306 (if (or (assq 'left geo) (assq 'top geo)) | |
307 '((user-position . t))) | |
308 (if (or (assq 'height geo) (assq 'width geo)) | |
309 '((user-size . t))) | |
310 geo) | |
311 x-invocation-args (cdr x-invocation-args)))) | |
312 | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
313 (defun x-handle-name-rn-switch (switch) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
314 "Handle a \"-name\" or \"-rn\" SWITCH." |
13434 | 315 ;; Handle the -name and -rn options. Set the variable x-resource-name |
316 ;; to the option's operand; if the switch was `-name', set the name of | |
317 ;; the initial frame, too. | |
318 (or (consp x-invocation-args) | |
319 (error "%s: missing argument to `%s' option" (invocation-name) switch)) | |
320 (setq x-resource-name (car x-invocation-args) | |
321 x-invocation-args (cdr x-invocation-args)) | |
322 (if (string= switch "-name") | |
323 (setq initial-frame-alist (cons (cons 'name x-resource-name) | |
324 initial-frame-alist)))) | |
325 | |
326 (defvar x-display-name nil | |
327 "The display name specifying server and frame.") | |
328 | |
329 (defun x-handle-display (switch) | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
330 "Handle the \"-display\" SWITCH." |
13434 | 331 (setq x-display-name (car x-invocation-args) |
332 x-invocation-args (cdr x-invocation-args))) | |
333 | |
334 (defvar x-invocation-args nil) | |
335 | |
336 (defun x-handle-args (args) | |
337 "Process the X-related command line options in ARGS. | |
338 This is done before the user's startup file is loaded. They are copied to | |
339 x-invocation args from which the X-related things are extracted, first | |
340 the switch (e.g., \"-fg\") in the following code, and possible values | |
341 \(e.g., \"black\") in the option handler code (e.g., x-handle-switch). | |
342 This returns ARGS with the arguments that have been processed removed." | |
343 (setq x-invocation-args args | |
344 args nil) | |
345 (while x-invocation-args | |
346 (let* ((this-switch (car x-invocation-args)) | |
347 (orig-this-switch this-switch) | |
348 completion argval aelt) | |
349 (setq x-invocation-args (cdr x-invocation-args)) | |
350 ;; Check for long options with attached arguments | |
351 ;; and separate out the attached option argument into argval. | |
352 (if (string-match "^--[^=]*=" this-switch) | |
353 (setq argval (substring this-switch (match-end 0)) | |
354 this-switch (substring this-switch 0 (1- (match-end 0))))) | |
355 (setq completion (try-completion this-switch x-long-option-alist)) | |
356 (if (eq completion t) | |
357 ;; Exact match for long option. | |
358 (setq this-switch (cdr (assoc this-switch x-long-option-alist))) | |
359 (if (stringp completion) | |
360 (let ((elt (assoc completion x-long-option-alist))) | |
361 ;; Check for abbreviated long option. | |
362 (or elt | |
363 (error "Option `%s' is ambiguous" this-switch)) | |
364 (setq this-switch (cdr elt))) | |
365 ;; Check for a short option. | |
366 (setq argval nil this-switch orig-this-switch))) | |
367 (setq aelt (assoc this-switch x-option-alist)) | |
368 (if aelt | |
369 (if argval | |
370 (let ((x-invocation-args | |
371 (cons argval x-invocation-args))) | |
372 (funcall (cdr aelt) this-switch)) | |
373 (funcall (cdr aelt) this-switch)) | |
374 (setq args (cons this-switch args))))) | |
375 (setq args (nreverse args))) | |
376 | |
377 | |
378 | |
379 ;; | |
380 ;; Available colors | |
381 ;; | |
382 | |
383 (defvar x-colors '("aquamarine" | |
384 "Aquamarine" | |
385 "medium aquamarine" | |
386 "MediumAquamarine" | |
387 "black" | |
388 "Black" | |
389 "blue" | |
390 "Blue" | |
391 "cadet blue" | |
392 "CadetBlue" | |
393 "cornflower blue" | |
394 "CornflowerBlue" | |
395 "dark slate blue" | |
396 "DarkSlateBlue" | |
397 "light blue" | |
398 "LightBlue" | |
399 "light steel blue" | |
400 "LightSteelBlue" | |
401 "medium blue" | |
402 "MediumBlue" | |
403 "medium slate blue" | |
404 "MediumSlateBlue" | |
405 "midnight blue" | |
406 "MidnightBlue" | |
407 "navy blue" | |
408 "NavyBlue" | |
409 "navy" | |
410 "Navy" | |
411 "sky blue" | |
412 "SkyBlue" | |
413 "slate blue" | |
414 "SlateBlue" | |
415 "steel blue" | |
416 "SteelBlue" | |
417 "coral" | |
418 "Coral" | |
419 "cyan" | |
420 "Cyan" | |
421 "firebrick" | |
422 "Firebrick" | |
423 "brown" | |
424 "Brown" | |
425 "gold" | |
426 "Gold" | |
427 "goldenrod" | |
428 "Goldenrod" | |
429 "green" | |
430 "Green" | |
431 "dark green" | |
432 "DarkGreen" | |
433 "dark olive green" | |
434 "DarkOliveGreen" | |
435 "forest green" | |
436 "ForestGreen" | |
437 "lime green" | |
438 "LimeGreen" | |
439 "medium sea green" | |
440 "MediumSeaGreen" | |
441 "medium spring green" | |
442 "MediumSpringGreen" | |
443 "pale green" | |
444 "PaleGreen" | |
445 "sea green" | |
446 "SeaGreen" | |
447 "spring green" | |
448 "SpringGreen" | |
449 "yellow green" | |
450 "YellowGreen" | |
451 "dark slate grey" | |
452 "DarkSlateGrey" | |
453 "dark slate gray" | |
454 "DarkSlateGray" | |
455 "dim grey" | |
456 "DimGrey" | |
457 "dim gray" | |
458 "DimGray" | |
459 "light grey" | |
460 "LightGrey" | |
461 "light gray" | |
462 "LightGray" | |
463 "gray" | |
464 "grey" | |
465 "Gray" | |
466 "Grey" | |
467 "khaki" | |
468 "Khaki" | |
469 "magenta" | |
470 "Magenta" | |
471 "maroon" | |
472 "Maroon" | |
473 "orange" | |
474 "Orange" | |
475 "orchid" | |
476 "Orchid" | |
477 "dark orchid" | |
478 "DarkOrchid" | |
479 "medium orchid" | |
480 "MediumOrchid" | |
481 "pink" | |
482 "Pink" | |
483 "plum" | |
484 "Plum" | |
485 "red" | |
486 "Red" | |
487 "indian red" | |
488 "IndianRed" | |
489 "medium violet red" | |
490 "MediumVioletRed" | |
491 "orange red" | |
492 "OrangeRed" | |
493 "violet red" | |
494 "VioletRed" | |
495 "salmon" | |
496 "Salmon" | |
497 "sienna" | |
498 "Sienna" | |
499 "tan" | |
500 "Tan" | |
501 "thistle" | |
502 "Thistle" | |
503 "turquoise" | |
504 "Turquoise" | |
505 "dark turquoise" | |
506 "DarkTurquoise" | |
507 "medium turquoise" | |
508 "MediumTurquoise" | |
509 "violet" | |
510 "Violet" | |
511 "blue violet" | |
512 "BlueViolet" | |
513 "wheat" | |
514 "Wheat" | |
515 "white" | |
516 "White" | |
517 "yellow" | |
518 "Yellow" | |
519 "green yellow" | |
520 "GreenYellow") | |
521 "The full list of X colors from the `rgb.text' file.") | |
522 | |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
26573
diff
changeset
|
523 (defun xw-defined-colors (&optional frame) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
26573
diff
changeset
|
524 "Internal function called by `defined-colors', which see." |
13434 | 525 (or frame (setq frame (selected-frame))) |
16596
0f917c0edc53
(x-defined-colors): Use color names from w32-color-map.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16588
diff
changeset
|
526 (let* ((color-map-colors (mapcar (lambda (clr) (car clr)) w32-color-map)) |
0f917c0edc53
(x-defined-colors): Use color names from w32-color-map.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16588
diff
changeset
|
527 (all-colors (or color-map-colors x-colors)) |
0f917c0edc53
(x-defined-colors): Use color names from w32-color-map.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16588
diff
changeset
|
528 (this-color nil) |
0f917c0edc53
(x-defined-colors): Use color names from w32-color-map.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16588
diff
changeset
|
529 (defined-colors nil)) |
0f917c0edc53
(x-defined-colors): Use color names from w32-color-map.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16588
diff
changeset
|
530 (message "Defining colors...") |
13434 | 531 (while all-colors |
532 (setq this-color (car all-colors) | |
533 all-colors (cdr all-colors)) | |
27101
a5791b2ee668
(xw-defined-colors): Call color-supported-p,
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
534 (and (color-supported-p this-color frame t) |
13434 | 535 (setq defined-colors (cons this-color defined-colors)))) |
536 defined-colors)) | |
537 | |
19691
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
538 |
13434 | 539 ;;;; Function keys |
540 | |
19691
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
541 ;;; make f10 activate the real menubar rather than the mini-buffer menu |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
542 ;;; navigation feature. |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
543 (global-set-key [f10] (lambda () |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
544 (interactive) (w32-send-sys-command ?\xf100))) |
a96c6fa10e92
(w32-handle-scroll-bar-event): On up and
Geoff Voelker <voelker@cs.washington.edu>
parents:
19167
diff
changeset
|
545 |
13434 | 546 (defun iconify-or-deiconify-frame () |
547 "Iconify the selected frame, or deiconify if it's currently an icon." | |
548 (interactive) | |
549 (if (eq (cdr (assq 'visibility (frame-parameters))) t) | |
550 (iconify-frame) | |
551 (make-frame-visible))) | |
552 | |
553 (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame | |
554 global-map) | |
555 | |
556 | |
557 ;;;; Selections and cut buffers | |
558 | |
559 ;;; We keep track of the last text selected here, so we can check the | |
560 ;;; current selection against it, and avoid passing back our own text | |
561 ;;; from x-cut-buffer-or-selection-value. | |
562 (defvar x-last-selected-text nil) | |
563 | |
564 ;;; It is said that overlarge strings are slow to put into the cut buffer. | |
565 ;;; Note this value is overridden below. | |
566 (defvar x-cut-buffer-max 20000 | |
567 "Max number of characters to put in the cut buffer.") | |
568 | |
569 (defvar x-select-enable-clipboard t | |
570 "Non-nil means cutting and pasting uses the clipboard. | |
571 This is in addition to the primary selection.") | |
572 | |
573 (defun x-select-text (text &optional push) | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
574 "Make TEXT the last selected text. |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
575 If `x-select-enable-clipboard' is non-nil, copy the text to the system |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
576 clipboard as well. Optional PUSH is ignored on Windows." |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
577 (if x-select-enable-clipboard |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
578 (w32-set-clipboard-data text)) |
15048
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
579 (setq x-last-selected-text text)) |
13434 | 580 |
581 (defun x-get-selection-value () | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
582 "Return the value of the current selection. |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
583 Consult the selection, then the cut buffer. Treat empty strings as if |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
584 they were unset." |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
585 (if x-select-enable-clipboard |
13434 | 586 (let (text) |
587 ;; Don't die if x-get-selection signals an error. | |
588 (condition-case c | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
589 (setq text (w32-get-clipboard-data)) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
590 (error (message "w32-get-clipboard-data:%s" c))) |
13434 | 591 (if (string= text "") (setq text nil)) |
15048
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
592 (cond |
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
593 ((not text) nil) |
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
594 ((eq text x-last-selected-text) nil) |
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
595 ((string= text x-last-selected-text) |
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
596 ;; Record the newer string, so subsequent calls can use the 'eq' test. |
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
597 (setq x-last-selected-text text) |
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
598 nil) |
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
599 (t |
1f316fa0e840
(x-select-text): Remember selected text.
Richard M. Stallman <rms@gnu.org>
parents:
14811
diff
changeset
|
600 (setq x-last-selected-text text)))))) |
13434 | 601 |
23636
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
602 (defalias 'x-cut-buffer-or-selection-value 'x-get-selection-value) |
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
603 |
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
604 |
13434 | 605 ;;; Do the actual Windows setup here; the above code just defines |
606 ;;; functions and variables that we use now. | |
607 | |
608 (setq command-line-args (x-handle-args command-line-args)) | |
609 | |
610 ;;; Make sure we have a valid resource name. | |
611 (or (stringp x-resource-name) | |
612 (let (i) | |
613 (setq x-resource-name (invocation-name)) | |
614 | |
615 ;; Change any . or * characters in x-resource-name to hyphens, | |
616 ;; so as not to choke when we use it in X resource queries. | |
617 (while (setq i (string-match "[.*]" x-resource-name)) | |
618 (aset x-resource-name i ?-)))) | |
619 | |
620 ;; For the benefit of older Emacses (19.27 and earlier) that are sharing | |
621 ;; the same lisp directory, don't pass the third argument unless we seem | |
622 ;; to have the multi-display support. | |
623 (if (fboundp 'x-close-connection) | |
624 (x-open-connection "" | |
625 x-command-line-resources | |
626 ;; Exit Emacs with fatal error if this fails. | |
627 t) | |
628 (x-open-connection "" | |
629 x-command-line-resources)) | |
630 | |
631 (setq frame-creation-function 'x-create-frame-with-faces) | |
632 | |
633 (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100) | |
634 x-cut-buffer-max)) | |
635 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
636 ;; W32 expects the menu bar cut and paste commands to use the clipboard. |
13434 | 637 ;; This has ,? to match both on Sunos and on Solaris. |
638 (menu-bar-enable-clipboard) | |
639 | |
23636
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
640 ;; W32 systems have different fonts than commonly found on X, so |
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
641 ;; we define our own standard fontset here. |
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
642 (defvar w32-standard-fontset-spec |
24212
36652d90b38f
(w32-standard-fontset-spec): Remove wildcard
Geoff Voelker <voelker@cs.washington.edu>
parents:
24142
diff
changeset
|
643 "-*-Courier New-normal-r-*-*-13-*-*-*-c-*-fontset-standard" |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
644 "String of fontset spec of the standard fontset. |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
645 This defines a fontset consisting of the Courier New variations for |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
646 European languages which are distributed with Windows as |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
647 \"Multilanguage Support\". |
23636
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
648 |
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
649 See the documentation of `create-fontset-from-fontset-spec for the format.") |
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
650 |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
651 (if (fboundp 'new-fontset) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
652 (progn |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
653 ;; Create the standard fontset. |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
654 (create-fontset-from-fontset-spec w32-standard-fontset-spec t) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
655 ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1,...). |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
656 (create-fontset-from-x-resource) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
657 ;; Try to create a fontset from a font specification which comes |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
658 ;; from initial-frame-alist, default-frame-alist, or X resource. |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
659 ;; A font specification in command line argument (i.e. -fn XXXX) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
660 ;; should be already in default-frame-alist as a `font' |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
661 ;; parameter. However, any font specifications in site-start |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
662 ;; library, user's init file (.emacs), and default.el are not |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
663 ;; yet handled here. |
23636
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
664 |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
665 (let ((font (or (cdr (assq 'font initial-frame-alist)) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
666 (cdr (assq 'font default-frame-alist)) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
667 (x-get-resource "font" "Font"))) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
668 xlfd-fields resolved-name) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
669 (if (and font |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
670 (not (query-fontset font)) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
671 (setq resolved-name (x-resolve-font-name font)) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
672 (setq xlfd-fields (x-decompose-font-name font))) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
673 (if (string= "fontset" |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
674 (aref xlfd-fields xlfd-regexp-registry-subnum)) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
675 (new-fontset font |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
676 (x-complement-fontset-spec xlfd-fields nil)) |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
677 ;; Create a fontset from FONT. The fontset name is |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
678 ;; generated from FONT. |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
679 (create-fontset-from-ascii-font font |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
680 resolved-name "startup")))))) |
23636
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
681 |
13434 | 682 ;; Apply a geometry resource to the initial frame. Put it at the end |
683 ;; of the alist, so that anything specified on the command line takes | |
684 ;; precedence. | |
685 (let* ((res-geometry (x-get-resource "geometry" "Geometry")) | |
686 parsed) | |
687 (if res-geometry | |
688 (progn | |
689 (setq parsed (x-parse-geometry res-geometry)) | |
690 ;; If the resource specifies a position, | |
691 ;; call the position and size "user-specified". | |
692 (if (or (assq 'top parsed) (assq 'left parsed)) | |
693 (setq parsed (cons '(user-position . t) | |
694 (cons '(user-size . t) parsed)))) | |
695 ;; All geometry parms apply to the initial frame. | |
696 (setq initial-frame-alist (append initial-frame-alist parsed)) | |
697 ;; The size parms apply to all frames. | |
698 (if (assq 'height parsed) | |
699 (setq default-frame-alist | |
700 (cons (cons 'height (cdr (assq 'height parsed))) | |
701 default-frame-alist))) | |
702 (if (assq 'width parsed) | |
703 (setq default-frame-alist | |
704 (cons (cons 'width (cdr (assq 'width parsed))) | |
705 default-frame-alist)))))) | |
706 | |
707 ;; Check the reverseVideo resource. | |
708 (let ((case-fold-search t)) | |
709 (let ((rv (x-get-resource "reverseVideo" "ReverseVideo"))) | |
710 (if (and rv | |
711 (string-match "^\\(true\\|yes\\|on\\)$" rv)) | |
712 (setq default-frame-alist | |
713 (cons '(reverse . t) default-frame-alist))))) | |
714 | |
715 ;; Set x-selection-timeout, measured in milliseconds. | |
716 (let ((res-selection-timeout | |
717 (x-get-resource "selectionTimeout" "SelectionTimeout"))) | |
718 (setq x-selection-timeout 20000) | |
719 (if res-selection-timeout | |
720 (setq x-selection-timeout (string-to-number res-selection-timeout)))) | |
721 | |
722 (defun x-win-suspend-error () | |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
723 "Report an error when a suspend is attempted." |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
724 (error "Suspending an Emacs running under W32 makes no sense")) |
13434 | 725 (add-hook 'suspend-hook 'x-win-suspend-error) |
726 | |
727 ;;; Arrange for the kill and yank functions to set and check the clipboard. | |
728 (setq interprogram-cut-function 'x-select-text) | |
729 (setq interprogram-paste-function 'x-get-selection-value) | |
730 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
731 ;;; Turn off window-splitting optimization; w32 is usually fast enough |
13434 | 732 ;;; that this is only annoying. |
733 (setq split-window-keep-point t) | |
734 | |
735 ;; Don't show the frame name; that's redundant. | |
19167
337f5643498e
Set mode-line-frame-identification
Geoff Voelker <voelker@cs.washington.edu>
parents:
16889
diff
changeset
|
736 (setq-default mode-line-frame-identification " ") |
13434 | 737 |
738 ;;; Set to a system sound if you want a fancy bell. | |
739 (set-message-beep 'ok) | |
740 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
741 ;; Remap some functions to call w32 common dialogs |
13434 | 742 |
743 (defun internal-face-interactive (what &optional bool) | |
744 (let* ((fn (intern (concat "face-" what))) | |
27832
866f7a6b82b3
(internal-face-interactive): Update prompt for new read-face-name.
Dave Love <fx@gnu.org>
parents:
27623
diff
changeset
|
745 (prompt (concat "Set " what " of face ")) |
866f7a6b82b3
(internal-face-interactive): Update prompt for new read-face-name.
Dave Love <fx@gnu.org>
parents:
27623
diff
changeset
|
746 (face (read-face-name prompt)) |
13434 | 747 (default (if (fboundp fn) |
748 (or (funcall fn face (selected-frame)) | |
749 (funcall fn 'default (selected-frame))))) | |
750 (fn-win (intern (concat (symbol-name window-system) "-select-" what))) | |
22539
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
751 value) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
752 (setq value |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
753 (cond ((fboundp fn-win) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
754 (funcall fn-win)) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
755 ((eq bool 'color) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
756 (completing-read (concat prompt " " (symbol-name face) " to: ") |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
757 (mapcar (function (lambda (color) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
758 (cons color color))) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
759 x-colors) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
760 nil nil nil nil default)) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
761 (bool |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
762 (y-or-n-p (concat "Should face " (symbol-name face) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
763 " be " bool "? "))) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
764 (t |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
765 (read-string (concat prompt " " (symbol-name face) " to: ") |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
766 nil nil default)))) |
45ccce07729d
(internal-face-interactive): Handle case where BOOL is `color'.
Andrew Innes <andrewi@gnu.org>
parents:
21883
diff
changeset
|
767 (list face (if (equal value "") nil value)))) |
13434 | 768 |
16889
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
769 ;; Redefine the font selection to use the standard W32 dialog |
23560
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
770 (defvar w32-use-w32-font-dialog t |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
771 "*Use the standard font dialog if 't'. |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
772 Otherwise pop up a menu of some standard fonts like X does - including |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
773 fontsets.") |
23560
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
774 |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
775 (defvar w32-fixed-font-alist |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
776 '("Font menu" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
777 ("Misc" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
778 ;; For these, we specify the pixel height and width. |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
779 ("fixed" "Fixedsys") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
780 ("") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
781 ("Terminal 5x4" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
782 "-*-Terminal-normal-r-*-*-*-45-*-*-c-40-*-oem") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
783 ("Terminal 6x8" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
784 "-*-Terminal-normal-r-*-*-*-60-*-*-c-80-*-oem") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
785 ("Terminal 9x5" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
786 "-*-Terminal-normal-r-*-*-*-90-*-*-c-50-*-oem") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
787 ("Terminal 9x7" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
788 "-*-Terminal-normal-r-*-*-*-90-*-*-c-70-*-oem") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
789 ("Terminal 9x8" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
790 "-*-Terminal-normal-r-*-*-*-90-*-*-c-80-*-oem") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
791 ("Terminal 12x12" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
792 "-*-Terminal-normal-r-*-*-*-120-*-*-c-120-*-oem") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
793 ("Terminal 14x10" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
794 "-*-Terminal-normal-r-*-*-*-135-*-*-c-100-*-oem") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
795 ("Terminal 6x6 Bold" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
796 "-*-Terminal-bold-r-*-*-*-60-*-*-c-60-*-oem") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
797 ("") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
798 ("Lucida Sans Typewriter.8" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
799 "-*-Lucida Sans Typewriter-normal-r-*-*-11-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
800 ("Lucida Sans Typewriter.9" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
801 "-*-Lucida Sans Typewriter-normal-r-*-*-12-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
802 ("Lucida Sans Typewriter.10" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
803 "-*-Lucida Sans Typewriter-normal-r-*-*-13-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
804 ("Lucida Sans Typewriter.11" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
805 "-*-Lucida Sans Typewriter-normal-r-*-*-15-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
806 ("Lucida Sans Typewriter.12" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
807 "-*-Lucida Sans Typewriter-normal-r-*-*-16-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
808 ("Lucida Sans Typewriter.8 Bold" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
809 "-*-Lucida Sans Typewriter-semibold-r-*-*-11-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
810 ("Lucida Sans Typewriter.9 Bold" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
811 "-*-Lucida Sans Typewriter-semibold-r-*-*-12-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
812 ("Lucida Sans Typewriter.10 Bold" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
813 "-*-Lucida Sans Typewriter-semibold-r-*-*-13-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
814 ("Lucida Sans Typewriter.11 Bold" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
815 "-*-Lucida Sans Typewriter-semibold-r-*-*-15-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
816 ("Lucida Sans Typewriter.12 Bold" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
817 "-*-Lucida Sans Typewriter-semibold-r-*-*-16-*-*-*-c-*-iso8859-1")) |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
818 ("Courier" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
819 ("Courier 10x8" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
820 "-*-Courier-*normal-r-*-*-*-97-*-*-c-80-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
821 ("Courier 12x9" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
822 "-*-Courier-*normal-r-*-*-*-120-*-*-c-90-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
823 ("Courier 15x12" |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
824 "-*-Courier-*normal-r-*-*-*-150-*-*-c-120-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
825 ;; For these, we specify the point height. |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
826 ("") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
827 ("8" "-*-Courier New-normal-r-*-*-11-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
828 ("9" "-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
829 ("10" "-*-Courier New-normal-r-*-*-13-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
830 ("11" "-*-Courier New-normal-r-*-*-15-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
831 ("12" "-*-Courier New-normal-r-*-*-16-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
832 ("8 bold" "-*-Courier New-bold-r-*-*-11-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
833 ("9 bold" "-*-Courier New-bold-r-*-*-12-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
834 ("10 bold" "-*-Courier New-bold-r-*-*-13-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
835 ("11 bold" "-*-Courier New-bold-r-*-*-15-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
836 ("12 bold" "-*-Courier New-bold-r-*-*-16-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
837 ("8 italic" "-*-Courier New-normal-i-*-*-11-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
838 ("9 italic" "-*-Courier New-normal-i-*-*-12-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
839 ("10 italic" "-*-Courier New-normal-i-*-*-13-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
840 ("11 italic" "-*-Courier New-normal-i-*-*-15-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
841 ("12 italic" "-*-Courier New-normal-i-*-*-16-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
842 ("8 bold italic" "-*-Courier New-bold-i-*-*-11-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
843 ("9 bold italic" "-*-Courier New-bold-i-*-*-12-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
844 ("10 bold italic" "-*-Courier New-bold-i-*-*-13-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
845 ("11 bold italic" "-*-Courier New-bold-i-*-*-15-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
846 ("12 bold italic" "-*-Courier New-bold-i-*-*-16-*-*-*-c-*-iso8859-1") |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
847 )) |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
848 "Fonts suitable for use in Emacs. |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
849 Initially this is a list of some fixed width fonts that most people |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
850 will have like Terminal and Courier. These fonts are used in the font |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
851 menu if the variable `w32-use-w32-font-dialog' is nil.") |
13434 | 852 |
24686
f2ecc3b6a45f
Change the x-charset-registry property for the
Andrew Innes <andrewi@gnu.org>
parents:
24683
diff
changeset
|
853 ;;; Enable Japanese fonts on Windows to be used by default. |
30236
c6e051bf5f2e
Make FONTNAME arg to set-fontset-font a cons.
Jason Rumney <jasonr@gnu.org>
parents:
29322
diff
changeset
|
854 (set-fontset-font t (make-char 'katakana-jisx0201) '("*" . "JISX0208-SJIS")) |
c6e051bf5f2e
Make FONTNAME arg to set-fontset-font a cons.
Jason Rumney <jasonr@gnu.org>
parents:
29322
diff
changeset
|
855 (set-fontset-font t (make-char 'latin-jisx0201) '("*" . "JISX0208-SJIS")) |
c6e051bf5f2e
Make FONTNAME arg to set-fontset-font a cons.
Jason Rumney <jasonr@gnu.org>
parents:
29322
diff
changeset
|
856 (set-fontset-font t (make-char 'japanese-jisx0208) '("*" . "JISX0208-SJIS")) |
c6e051bf5f2e
Make FONTNAME arg to set-fontset-font a cons.
Jason Rumney <jasonr@gnu.org>
parents:
29322
diff
changeset
|
857 (set-fontset-font t (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS")) |
24686
f2ecc3b6a45f
Change the x-charset-registry property for the
Andrew Innes <andrewi@gnu.org>
parents:
24683
diff
changeset
|
858 |
13434 | 859 (defun mouse-set-font (&rest fonts) |
29322
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
860 "Select a font. |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
861 If `w32-use-w32-font-dialog' is non-nil (the default), use the Windows |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
862 font dialog to get the matching FONTS. Otherwise use a pop-up menu |
16e1a87707b5
Doc changes to reduce diffs with x-win.el.
Jason Rumney <jasonr@gnu.org>
parents:
27887
diff
changeset
|
863 (like Emacs on other platforms) initialized with the fonts in |
27887
a9f19a6bfb69
(mouse-set-font): Do not build fontset from chosen font.
Jason Rumney <jasonr@gnu.org>
parents:
27832
diff
changeset
|
864 `w32-fixed-font-alist'." |
23560
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
865 (interactive |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
866 (if w32-use-w32-font-dialog |
24964
22d526660026
(mouse-set-font): If user uses w32 dialog but
Karl Heuer <kwzh@gnu.org>
parents:
24686
diff
changeset
|
867 (let ((chosen-font (w32-select-font))) |
22d526660026
(mouse-set-font): If user uses w32 dialog but
Karl Heuer <kwzh@gnu.org>
parents:
24686
diff
changeset
|
868 (and chosen-font (list chosen-font))) |
23560
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
869 (x-popup-menu |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
870 last-nonmenu-event |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
871 ;; Append list of fontsets currently defined. |
23636
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
872 (if (fboundp 'new-fontset) |
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
873 (append w32-fixed-font-alist (list (generate-fontset-menu))))))) |
23560
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
874 (if fonts |
27887
a9f19a6bfb69
(mouse-set-font): Do not build fontset from chosen font.
Jason Rumney <jasonr@gnu.org>
parents:
27832
diff
changeset
|
875 (let (font) |
23560
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
876 (while fonts |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
877 (condition-case nil |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
878 (progn |
24212
36652d90b38f
(w32-standard-fontset-spec): Remove wildcard
Geoff Voelker <voelker@cs.washington.edu>
parents:
24142
diff
changeset
|
879 (setq font (car fonts)) |
27887
a9f19a6bfb69
(mouse-set-font): Do not build fontset from chosen font.
Jason Rumney <jasonr@gnu.org>
parents:
27832
diff
changeset
|
880 (set-default-font font) |
24212
36652d90b38f
(w32-standard-fontset-spec): Remove wildcard
Geoff Voelker <voelker@cs.washington.edu>
parents:
24142
diff
changeset
|
881 (setq fonts nil)) |
36652d90b38f
(w32-standard-fontset-spec): Remove wildcard
Geoff Voelker <voelker@cs.washington.edu>
parents:
24142
diff
changeset
|
882 (error (setq fonts (cdr fonts))))) |
23560
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
883 (if (null font) |
6414b7085648
(w32-use-w32-font-dialog, w32-fixed-font-alist):
Geoff Voelker <voelker@cs.washington.edu>
parents:
22539
diff
changeset
|
884 (error "Font not found"))))) |
13434 | 885 |
16889
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
886 ;;; w32-win.el ends here |