Mercurial > emacs
annotate lisp/term/w32-win.el @ 110620:cdab39f69698
tar-mode.el (tar-header-block-tokenize): Decode filenames in "ustar" format.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 27 Sep 2010 14:00:46 +0900 |
parents | 1d1d5d9bd884 |
children | 188673195616 704900942a8e |
rev | line source |
---|---|
38431
853c3674f20a
Fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38241
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 |
105322 | 3 ;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
106815 | 4 ;; 2008, 2009, 2010 Free Software Foundation, Inc. |
13434 | 5 |
6 ;; Author: Kevin Gallo | |
7 ;; Keywords: terminals | |
8 | |
14170
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
9 ;; This file is part of GNU Emacs. |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
10 |
94671
f3ab0c2464f5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91507
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
14170
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
12 ;; it under the terms of the GNU General Public License as published by |
94671
f3ab0c2464f5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91507
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
f3ab0c2464f5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91507
diff
changeset
|
14 ;; (at your option) any later version. |
14170
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
15 |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
16 ;; 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
|
17 ;; 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
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
19 ;; GNU General Public License for more details. |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
20 |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
13831
diff
changeset
|
21 ;; You should have received a copy of the GNU General Public License |
94671
f3ab0c2464f5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91507
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
13434 | 23 |
24 ;;; Commentary: | |
25 | |
16889
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
26 ;; 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
|
27 ;; 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
|
28 ;; 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
|
29 ;; W32 display is opened and hooks are set for popping up the initial window. |
13434 | 30 |
31 ;; startup.el will then examine startup files, and eventually call the hooks | |
32 ;; which create the first window (s). | |
33 | |
34 ;;; Code: | |
35 | |
36 | |
37 ;; These are the standard X switches from the Xt Initialize.c file of | |
38 ;; Release 4. | |
39 | |
40 ;; Command line Resource Manager string | |
41 | |
42 ;; +rv *reverseVideo | |
43 ;; +synchronous *synchronous | |
44 ;; -background *background | |
45 ;; -bd *borderColor | |
46 ;; -bg *background | |
47 ;; -bordercolor *borderColor | |
48 ;; -borderwidth .borderWidth | |
49 ;; -bw .borderWidth | |
50 ;; -display .display | |
51 ;; -fg *foreground | |
52 ;; -fn *font | |
53 ;; -font *font | |
54 ;; -foreground *foreground | |
55 ;; -geometry .geometry | |
56 ;; -i .iconType | |
57 ;; -itype .iconType | |
58 ;; -iconic .iconic | |
59 ;; -name .name | |
60 ;; -reverse *reverseVideo | |
61 ;; -rv *reverseVideo | |
62 ;; -selectionTimeout .selectionTimeout | |
63 ;; -synchronous *synchronous | |
64 ;; -xrm | |
65 | |
66 ;; An alist of X options and the function which handles them. See | |
67 ;; ../startup.el. | |
68 | |
83587 | 69 ;; (if (not (eq window-system 'w32)) |
70 ;; (error "%s: Loading w32-win.el but not compiled for w32" (invocation-name))) | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49290
diff
changeset
|
71 |
13434 | 72 (require 'frame) |
73 (require 'mouse) | |
74 (require 'scroll-bar) | |
75 (require 'faces) | |
76 (require 'select) | |
77 (require 'menu-bar) | |
61477
5d9760bd65eb
* term/w32-win.el (dnd): Require dnd
Jan Djärv <jan.h.d@swipnet.se>
parents:
59704
diff
changeset
|
78 (require 'dnd) |
85500
0dcd1f3c9909
* textmodes/reftex.el: Move require easymenu before first use.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
84795
diff
changeset
|
79 (require 'w32-vars) |
55467 | 80 |
95892
bb82cfdc467f
(mouse-set-font): Remove overridden function.
Jason Rumney <jasonr@gnu.org>
parents:
95841
diff
changeset
|
81 ;; Keep an obsolete alias for w32-focus-frame and w32-select-font in case |
bb82cfdc467f
(mouse-set-font): Remove overridden function.
Jason Rumney <jasonr@gnu.org>
parents:
95841
diff
changeset
|
82 ;; they are used by code outside Emacs. |
84633
74f243cb2274
(w32-focus-frame): Make obsolete alias for x-focus-frame.
Jason Rumney <jasonr@gnu.org>
parents:
83648
diff
changeset
|
83 (define-obsolete-function-alias 'w32-focus-frame 'x-focus-frame "23.1") |
99714 | 84 (declare-function x-select-font "w32font.c" |
85 (&optional frame exclude-proportional)) | |
95892
bb82cfdc467f
(mouse-set-font): Remove overridden function.
Jason Rumney <jasonr@gnu.org>
parents:
95841
diff
changeset
|
86 (define-obsolete-function-alias 'w32-select-font 'x-select-font "23.1") |
55467 | 87 |
85500
0dcd1f3c9909
* textmodes/reftex.el: Move require easymenu before first use.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
84795
diff
changeset
|
88 (defvar w32-color-map) ;; defined in w32fns.c |
65258
c50250830b62
(xlfd-regexp-registry-subnum): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents:
64701
diff
changeset
|
89 |
86289
8a7ed478f7bc
* international/titdic-cnv.el (dos-8+3-filename):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86277
diff
changeset
|
90 (declare-function w32-send-sys-command "w32fns.c") |
8a7ed478f7bc
* international/titdic-cnv.el (dos-8+3-filename):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86277
diff
changeset
|
91 (declare-function set-message-beep "w32console.c") |
65258
c50250830b62
(xlfd-regexp-registry-subnum): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents:
64701
diff
changeset
|
92 |
42812
c9282c43bb5a
Add comments to avoid future deletion of conditionals that seem
Jason Rumney <jasonr@gnu.org>
parents:
42810
diff
changeset
|
93 ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles |
42810
e0a03741d896
Only require fontset when new-fontset is bound.
Jason Rumney <jasonr@gnu.org>
parents:
42542
diff
changeset
|
94 (if (fboundp 'new-fontset) |
e0a03741d896
Only require fontset when new-fontset is bound.
Jason Rumney <jasonr@gnu.org>
parents:
42542
diff
changeset
|
95 (require 'fontset)) |
15136
6a1b4fcbb216
(win32-handle-scroll-bar-event): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15048
diff
changeset
|
96 |
42542
691ca802270d
Require fontset unconditionally.
Jason Rumney <jasonr@gnu.org>
parents:
42286
diff
changeset
|
97 ;; The following definition is used for debugging scroll bar events. |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15265
diff
changeset
|
98 ;(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
|
99 |
102488
c6f1ce79df9a
(w32-initialize-window-system): Don't override
Jason Rumney <jasonr@gnu.org>
parents:
102487
diff
changeset
|
100 ;; (defun w32-drag-n-drop-debug (event) |
c6f1ce79df9a
(w32-initialize-window-system): Don't override
Jason Rumney <jasonr@gnu.org>
parents:
102487
diff
changeset
|
101 ;; "Print the drag-n-drop EVENT in a readable form." |
c6f1ce79df9a
(w32-initialize-window-system): Don't override
Jason Rumney <jasonr@gnu.org>
parents:
102487
diff
changeset
|
102 ;; (interactive "e") |
c6f1ce79df9a
(w32-initialize-window-system): Don't override
Jason Rumney <jasonr@gnu.org>
parents:
102487
diff
changeset
|
103 ;; (princ event)) |
21883
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
104 |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
105 (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
|
106 "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
|
107 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
|
108 (interactive "e") |
24664
ce51d492b1ab
(w32-drag-n-drop): Select file in window where
Andrew Innes <andrewi@gnu.org>
parents:
24246
diff
changeset
|
109 (save-excursion |
26573
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
110 ;; 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
|
111 ;; 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
|
112 ;; 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
|
113 (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
|
114 (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
|
115 (x (car coords)) |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
116 (y (cdr coords))) |
e219195abf40
(w32-drag-n-drop): Load files in current window, if
Gerd Moellmann <gerd@gnu.org>
parents:
24964
diff
changeset
|
117 (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
|
118 (set-frame-selected-window nil window)) |
84795
6aed7b3522e4
* term/w32-win.el (w32-drag-n-drop): Use mapc instead of mapcar.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
84633
diff
changeset
|
119 (mapc (lambda (file-name) |
70764
0cfc01cbdd73
(w32-drag-n-drop): Substitute '/' for '\',
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
69546
diff
changeset
|
120 (let ((f (subst-char-in-string ?\\ ?/ file-name)) |
0cfc01cbdd73
(w32-drag-n-drop): Substitute '/' for '\',
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
69546
diff
changeset
|
121 (coding (or file-name-coding-system |
0cfc01cbdd73
(w32-drag-n-drop): Substitute '/' for '\',
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
69546
diff
changeset
|
122 default-file-name-coding-system))) |
0cfc01cbdd73
(w32-drag-n-drop): Substitute '/' for '\',
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
69546
diff
changeset
|
123 (setq file-name |
0cfc01cbdd73
(w32-drag-n-drop): Substitute '/' for '\',
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
69546
diff
changeset
|
124 (mapconcat 'url-hexify-string |
0cfc01cbdd73
(w32-drag-n-drop): Substitute '/' for '\',
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
69546
diff
changeset
|
125 (split-string (encode-coding-string f coding) |
0cfc01cbdd73
(w32-drag-n-drop): Substitute '/' for '\',
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
69546
diff
changeset
|
126 "/") |
0cfc01cbdd73
(w32-drag-n-drop): Substitute '/' for '\',
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
69546
diff
changeset
|
127 "/"))) |
64701
34bd8e434dd7
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64084
diff
changeset
|
128 (dnd-handle-one-url window 'private |
61477
5d9760bd65eb
* term/w32-win.el (dnd): Require dnd
Jan Djärv <jan.h.d@swipnet.se>
parents:
59704
diff
changeset
|
129 (concat "file:" file-name))) |
55288
e304cb532417
(w32-drag-n-drop): Use x-dnd.el functions.
Jason Rumney <jasonr@gnu.org>
parents:
52401
diff
changeset
|
130 (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
|
131 (raise-frame))) |
21883
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
132 |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
133 (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
|
134 "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
|
135 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
|
136 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
|
137 (interactive "e") |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
138 (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
|
139 |
93c99b3a57f1
(w32-drag-n-drop-debug, w32-drag-n-drop)
Richard M. Stallman <rms@gnu.org>
parents:
19691
diff
changeset
|
140 ;; 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
|
141 (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
|
142 (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
|
143 |
23675
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
144 ;; Keyboard layout/language change events |
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
145 ;; 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
|
146 ;; 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
|
147 ;; new layout/language selected by the user. |
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
148 (global-set-key [language-change] 'ignore) |
8dcfae475b98
([language-change]): For now ignore
Geoff Voelker <voelker@cs.washington.edu>
parents:
23636
diff
changeset
|
149 |
95841
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
150 (defvar x-resource-name) |
97422
6e551caf98f6
Add declarations for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
96830
diff
changeset
|
151 (defvar x-colors) |
95841
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
152 |
13434 | 153 |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
26573
diff
changeset
|
154 (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
|
155 "Internal function called by `defined-colors', which see." |
13434 | 156 (or frame (setq frame (selected-frame))) |
59704 | 157 (let ((defined-colors nil)) |
158 (dolist (this-color (or (mapcar 'car w32-color-map) x-colors)) | |
27101
a5791b2ee668
(xw-defined-colors): Call color-supported-p,
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
159 (and (color-supported-p this-color frame t) |
96661
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
160 (setq defined-colors (cons this-color defined-colors)))) |
13434 | 161 defined-colors)) |
162 | |
163 ;;;; Function keys | |
164 | |
83644 | 165 ;;; make f10 activate the real menubar rather than the mini-buffer menu |
166 ;;; navigation feature. | |
95804
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
167 (defun w32-menu-bar-open (&optional frame) |
83644 | 168 "Start key navigation of the menu bar in FRAME. |
105322 | 169 |
95804
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
170 This initially activates the first menu-bar item, and you can then navigate |
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
171 with the arrow keys, select a menu entry with the Return key or cancel with |
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
172 the Escape key. If FRAME has no menu bar, this function does nothing. |
105322 | 173 |
95804
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
174 If FRAME is nil or not given, use the selected frame. |
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
175 If FRAME does not have the menu bar enabled, display a text menu using |
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
176 `tmm-menubar'." |
83644 | 177 (interactive "i") |
95804
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
178 (if menu-bar-mode |
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
179 (w32-send-sys-command ?\xf100 frame) |
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
180 (with-selected-frame (or frame (selected-frame)) |
ea2762d2d847
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Jason Rumney <jasonr@gnu.org>
parents:
94852
diff
changeset
|
181 (tmm-menubar)))) |
13434 | 182 |
183 | |
23636
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
184 ;; 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
|
185 ;; we define our own standard fontset here. |
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
186 (defvar w32-standard-fontset-spec |
24212
36652d90b38f
(w32-standard-fontset-spec): Remove wildcard
Geoff Voelker <voelker@cs.washington.edu>
parents:
24142
diff
changeset
|
187 "-*-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
|
188 "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
|
189 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
|
190 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
|
191 \"Multilanguage Support\". |
23636
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
192 |
73490
aedc3ce99a17
(x-handle-name-switch): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
70764
diff
changeset
|
193 See the documentation of `create-fontset-from-fontset-spec' for the format.") |
23636
3246160c5469
(x-get-selection-value): Alias to
Geoff Voelker <voelker@cs.washington.edu>
parents:
23625
diff
changeset
|
194 |
13434 | 195 (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
|
196 "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
|
197 (error "Suspending an Emacs running under W32 makes no sense")) |
13434 | 198 |
95841
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
199 (defvar image-library-alist) |
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
200 |
56107
a5bfa1a26af3
(image-library-alist): Initialize to a known set of probable library names.
Juanma Barranquero <lekktu@gmail.com>
parents:
55467
diff
changeset
|
201 ;;; Set default known names for image libraries |
a5bfa1a26af3
(image-library-alist): Initialize to a known set of probable library names.
Juanma Barranquero <lekktu@gmail.com>
parents:
55467
diff
changeset
|
202 (setq image-library-alist |
79970
e4615708e4e3
(image-library-alist): Prefer libxpm.dll.
Jason Rumney <jasonr@gnu.org>
parents:
79718
diff
changeset
|
203 '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll") |
79990
4c9e3f8637a0
(image-library-alist): Prefer libpng12 to libpng13, because
Juanma Barranquero <lekktu@gmail.com>
parents:
79970
diff
changeset
|
204 (png "libpng12d.dll" "libpng12.dll" "libpng.dll" |
4c9e3f8637a0
(image-library-alist): Prefer libpng12 to libpng13, because
Juanma Barranquero <lekktu@gmail.com>
parents:
79970
diff
changeset
|
205 ;; these are libpng 1.2.8 from GTK+ |
4c9e3f8637a0
(image-library-alist): Prefer libpng12 to libpng13, because
Juanma Barranquero <lekktu@gmail.com>
parents:
79970
diff
changeset
|
206 "libpng13d.dll" "libpng13.dll") |
56107
a5bfa1a26af3
(image-library-alist): Initialize to a known set of probable library names.
Juanma Barranquero <lekktu@gmail.com>
parents:
55467
diff
changeset
|
207 (jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll") |
a5bfa1a26af3
(image-library-alist): Initialize to a known set of probable library names.
Juanma Barranquero <lekktu@gmail.com>
parents:
55467
diff
changeset
|
208 (tiff "libtiff3.dll" "libtiff.dll") |
84633
74f243cb2274
(w32-focus-frame): Make obsolete alias for x-focus-frame.
Jason Rumney <jasonr@gnu.org>
parents:
83648
diff
changeset
|
209 (gif "giflib4.dll" "libungif4.dll" "libungif.dll") |
74f243cb2274
(w32-focus-frame): Make obsolete alias for x-focus-frame.
Jason Rumney <jasonr@gnu.org>
parents:
83648
diff
changeset
|
210 (svg "librsvg-2-2.dll") |
74f243cb2274
(w32-focus-frame): Make obsolete alias for x-focus-frame.
Jason Rumney <jasonr@gnu.org>
parents:
83648
diff
changeset
|
211 (gdk-pixbuf "libgdk_pixbuf-2.0-0.dll") |
100835
06da6fdc594a
(image-library-alist): Add gobject library.
Jason Rumney <jasonr@gnu.org>
parents:
99714
diff
changeset
|
212 (glib "libglib-2.0-0.dll") |
06da6fdc594a
(image-library-alist): Add gobject library.
Jason Rumney <jasonr@gnu.org>
parents:
99714
diff
changeset
|
213 (gobject "libgobject-2.0-0.dll"))) |
56107
a5bfa1a26af3
(image-library-alist): Initialize to a known set of probable library names.
Juanma Barranquero <lekktu@gmail.com>
parents:
55467
diff
changeset
|
214 |
83605
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
215 ;;; multi-tty support |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
216 (defvar w32-initialized nil |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
217 "Non-nil if the w32 window system has been initialized.") |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
218 |
95841
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
219 (declare-function x-open-connection "w32fns.c" |
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
220 (display &optional xrm-string must-succeed)) |
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
221 (declare-function create-fontset-from-fontset-spec "fontset" |
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
222 (fontset-spec &optional style-variant noerror)) |
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
223 (declare-function create-fontset-from-x-resource "fontset" ()) |
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
224 (declare-function x-get-resource "frame.c" |
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
225 (attribute class &optional component subclass)) |
97422
6e551caf98f6
Add declarations for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
96830
diff
changeset
|
226 (declare-function x-handle-args "common-win" (args)) |
6e551caf98f6
Add declarations for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
96830
diff
changeset
|
227 (declare-function x-parse-geometry "frame.c" (string)) |
6e551caf98f6
Add declarations for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
96830
diff
changeset
|
228 (defvar x-command-line-resources) |
95841
b4e36ff621b3
Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
95804
diff
changeset
|
229 |
83587 | 230 (defun w32-initialize-window-system () |
231 "Initialize Emacs for W32 GUI frames." | |
83598
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
232 |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
233 ;; Do the actual Windows setup here; the above code just defines |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
234 ;; functions and variables that we use now. |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
235 |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
236 (setq command-line-args (x-handle-args command-line-args)) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
237 |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
238 ;; Make sure we have a valid resource name. |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
239 (or (stringp x-resource-name) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
240 (setq x-resource-name |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
241 ;; Change any . or * characters in x-resource-name to hyphens, |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
242 ;; so as not to choke when we use it in X resource queries. |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
243 (replace-regexp-in-string "[.*]" "-" (invocation-name)))) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
244 |
83605
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
245 (x-open-connection "" x-command-line-resources |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
246 ;; Exit with a fatal error if this fails and we |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
247 ;; are the initial display |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
248 (eq initial-window-system 'w32)) |
83598
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
249 |
102640
9b74238fc6c2
(w32-initialize-window-system): Call
Kenichi Handa <handa@m17n.org>
parents:
102488
diff
changeset
|
250 ;; Create the default fontset. |
9b74238fc6c2
(w32-initialize-window-system): Call
Kenichi Handa <handa@m17n.org>
parents:
102488
diff
changeset
|
251 (create-default-fontset) |
83598
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
252 ;; Create the standard fontset. |
102640
9b74238fc6c2
(w32-initialize-window-system): Call
Kenichi Handa <handa@m17n.org>
parents:
102488
diff
changeset
|
253 (condition-case err |
9b74238fc6c2
(w32-initialize-window-system): Call
Kenichi Handa <handa@m17n.org>
parents:
102488
diff
changeset
|
254 (create-fontset-from-fontset-spec w32-standard-fontset-spec t) |
105322 | 255 (error (display-warning |
102640
9b74238fc6c2
(w32-initialize-window-system): Call
Kenichi Handa <handa@m17n.org>
parents:
102488
diff
changeset
|
256 'initialization |
9b74238fc6c2
(w32-initialize-window-system): Call
Kenichi Handa <handa@m17n.org>
parents:
102488
diff
changeset
|
257 (format "Creation of the standard fontset failed: %s" err) |
9b74238fc6c2
(w32-initialize-window-system): Call
Kenichi Handa <handa@m17n.org>
parents:
102488
diff
changeset
|
258 :error))) |
83598
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
259 ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1,...). |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
260 (create-fontset-from-x-resource) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
261 |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
262 ;; Apply a geometry resource to the initial frame. Put it at the end |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
263 ;; of the alist, so that anything specified on the command line takes |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
264 ;; precedence. |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
265 (let* ((res-geometry (x-get-resource "geometry" "Geometry")) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
266 parsed) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
267 (if res-geometry |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
268 (progn |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
269 (setq parsed (x-parse-geometry res-geometry)) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
270 ;; If the resource specifies a position, |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
271 ;; call the position and size "user-specified". |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
272 (if (or (assq 'top parsed) (assq 'left parsed)) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
273 (setq parsed (cons '(user-position . t) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
274 (cons '(user-size . t) parsed)))) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
275 ;; All geometry parms apply to the initial frame. |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
276 (setq initial-frame-alist (append initial-frame-alist parsed)) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
277 ;; The size parms apply to all frames. |
96661
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
278 (if (and (assq 'height parsed) |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
279 (not (assq 'height default-frame-alist))) |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
280 (setq default-frame-alist |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
281 (cons (cons 'height (cdr (assq 'height parsed))) |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
282 default-frame-alist)) |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
283 (if (and (assq 'width parsed) |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
284 (not (assq 'width default-frame-alist))) |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
285 (setq default-frame-alist |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
286 (cons (cons 'width (cdr (assq 'width parsed))) |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
287 default-frame-alist))))))) |
83598
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
288 |
83605
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
289 ;; Check the reverseVideo resource. |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
290 (let ((case-fold-search t)) |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
291 (let ((rv (x-get-resource "reverseVideo" "ReverseVideo"))) |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
292 (if (and rv (string-match "^\\(true\\|yes\\|on\\)$" rv)) |
96661
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
293 (setq default-frame-alist |
0b232de63205
(x-handle-switch, x-handle-name-switch)
Jason Rumney <jasonr@gnu.org>
parents:
95892
diff
changeset
|
294 (cons '(reverse . t) default-frame-alist))))) |
83605
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
295 |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
296 ;; Don't let Emacs suspend under w32 gui |
83598
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
297 (add-hook 'suspend-hook 'x-win-suspend-error) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
298 |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
299 ;; Turn off window-splitting optimization; w32 is usually fast enough |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
300 ;; that this is only annoying. |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
301 (setq split-window-keep-point t) |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
302 |
83605
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
303 ;; W32 expects the menu bar cut and paste commands to use the clipboard. |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
304 (menu-bar-enable-clipboard) |
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
305 |
83598
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
306 ;; Don't show the frame name; that's redundant. |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
307 (setq-default mode-line-frame-identification " ") |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
308 |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
309 ;; Set to a system sound if you want a fancy bell. |
9ebefb43d02d
(x-setup-function-keys): New function.
Jason Rumney <jasonr@gnu.org>
parents:
83587
diff
changeset
|
310 (set-message-beep 'ok) |
83605
117c33233c18
Reorder to match x-win.el more closely.
Jason Rumney <jasonr@gnu.org>
parents:
83598
diff
changeset
|
311 (setq w32-initialized t)) |
83587 | 312 |
313 (add-to-list 'handle-args-function-alist '(w32 . x-handle-args)) | |
314 (add-to-list 'frame-creation-function-alist '(w32 . x-create-frame-with-faces)) | |
315 (add-to-list 'window-system-initialization-alist '(w32 . w32-initialize-window-system)) | |
316 | |
317 (provide 'w32-win) | |
56107
a5bfa1a26af3
(image-library-alist): Initialize to a known set of probable library names.
Juanma Barranquero <lekktu@gmail.com>
parents:
55467
diff
changeset
|
318 |
59704 | 319 ;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166 |
16889
8de32e992e4d
Change uses of win32 to w32.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16596
diff
changeset
|
320 ;;; w32-win.el ends here |