comparison lisp/msw-init.el @ 4478:ec442dc06fe1

Merge.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 10 Jul 2008 23:37:52 +0200
parents e34711681f30
children 308d34e9f07d
comparison
equal deleted inserted replaced
4476:dbf79a1732ba 4478:ec442dc06fe1
21 ;; You should have received a copy of the GNU General Public License 21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING. If not, write to the 22 ;; along with XEmacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, 59 Temple Place - Suite 330, 23 ;; Free Software Foundation, 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA. 24 ;; Boston, MA 02111-1307, USA.
25 25
26 (defvar mswindows-win-initted nil) 26 (defvar make-device-early-mswindows-entry-point-called-p nil
27 (defvar mswindows-pre-win-initted nil) 27 "Whether `make-device-early-mswindows-entry-point' has been called")
28 (defvar mswindows-post-win-initted nil)
29 28
30 (defun init-pre-mswindows-win () 29 (defvar make-device-late-mswindows-entry-point-called-p nil
31 "Initialize mswindows GUI at startup (pre). Don't call this." 30 "Whether `make-device-late-mswindows-entry-point' has been called")
32 (unless mswindows-pre-win-initted
33 (setq mswindows-pre-win-initted t)))
34 31
35 (defun init-mswindows-win () 32 (defun make-device-early-mswindows-entry-point ()
36 "Initialize mswindows GUI at startup. Don't call this." 33 "Lisp code called before an `mswindows' device is created."
37 (unless mswindows-win-initted 34 (unless make-device-early-mswindows-entry-point-called-p
38 (init-pre-mswindows-win)
39 (make-mswindows-device)
40 (init-post-mswindows-win (selected-console))
41 (setq mswindows-win-initted t)))
42
43 (defun init-post-mswindows-win (console)
44 "Initialize mswindows GUI at startup (post). Don't call this."
45 (unless mswindows-post-win-initted
46 ;; Old-style mswindows bindings. The new-style mswindows bindings 35 ;; Old-style mswindows bindings. The new-style mswindows bindings
47 ;; (namely Ctrl-X, Ctrl-C and Ctrl-V) are already spoken for by XEmacs. 36 ;; (namely Ctrl-X, Ctrl-C and Ctrl-V) are already spoken for by XEmacs.
48 (global-set-key '(shift delete) 'kill-primary-selection) 37 (global-set-key '(shift delete) 'kill-primary-selection)
49 (global-set-key '(shift insert) 'yank-clipboard-selection) 38 (global-set-key '(shift insert) 'yank-clipboard-selection)
50 (global-set-key '(control insert) 'copy-primary-selection) 39 (global-set-key '(control insert) 'copy-primary-selection)
51 40
52 (global-set-key '(meta f4) 'save-buffers-kill-emacs) 41 (global-set-key '(meta f4) 'save-buffers-kill-emacs)
42 (setq make-device-early-mswindows-entry-point-called-p t)))
53 43
54 (setq mswindows-post-win-initted t))) 44 (defun make-device-late-mswindows-entry-point (device)
45 "Lisp code called after an `mswindows' device is created."
46 (unless make-device-late-mswindows-entry-point-called-p
47 (setq make-device-late-mswindows-entry-point-called-p t)))
55 48