aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorDan Nicolaescu2007-05-19 19:08:02 +0000
committerDan Nicolaescu2007-05-19 19:08:02 +0000
commit80ca7302d820bd3460a06db39165bbc35144c684 (patch)
tree9cbfeba96180f4d60e44037a71bf4a1fff4a2022 /lisp
parent696758702fa8eae3cfa46859cc260398b15d71bd (diff)
downloademacs-80ca7302d820bd3460a06db39165bbc35144c684.tar.gz
emacs-80ca7302d820bd3460a06db39165bbc35144c684.zip
* s/darwin.h (SYSTEM_PURESIZE_EXTRA): Define here.
* termhooks.h (union display_info): Add mac_display_info. * term.c (init_tty): Only use terminal->kboard when MULTI_KBOARD is defined. * macterm.h (struct mac_display_info): Add terminal. * w32term.c (w32_initialize): Make static. * macterm.c (XTset_terminal_modes): Add a terminal parameter. (XTreset_terminal_modes): Likewise. (x_clear_frame): Add a frame parameter. (note_mouse_movement): Get rif from the frame. (mac_term_init): Initialize the terminal. (mac_initialize): Make static and move terminal initialization ... (mac_create_terminal): ... in this new function. * macmenu.c: Reorder includes. (Fx_popup_menu): Use terminal specific mouse_position_hook. * macfns.c (x_set_mouse_color): Get rif from the frame. (x_set_tool_bar_lines): Don't use updating_frame. (mac_window): Add 2 new parameters for consistency with other systems. (Fx_create_frame): Fix doc string. Rename the parameter. (Fx_create_frame): Set the frame parameters following what is done in X11 and w32. (Fx_open_connection): Remove window-system check. (start_hourglass): Likewise. (x_create_tip_frame): Get the keyboard from the terminal. * w32fns.c (Fx_create_frame): Use kboard from the terminal. * term/mac-win.el: Provide mac-win. (mac-initialized): New variable. (mac-initialize-window-system): New function. Move global setup here. (handle-args-function-alist, frame-creation-function-alist): (window-system-initialization-alist): Add mac entries. * loadup.el: Load mac-win on a Mac.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog.multi-tty11
-rw-r--r--lisp/loadup.el3
-rw-r--r--lisp/term/mac-win.el26
3 files changed, 36 insertions, 4 deletions
diff --git a/lisp/ChangeLog.multi-tty b/lisp/ChangeLog.multi-tty
index a1de7328c03..e1189407bb6 100644
--- a/lisp/ChangeLog.multi-tty
+++ b/lisp/ChangeLog.multi-tty
@@ -1,3 +1,14 @@
12007-05-19 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * term/mac-win.el: Provide mac-win.
4 (mac-initialized): New variable.
5 (mac-initialize-window-system): New function. Move global setup
6 here.
7 (handle-args-function-alist, frame-creation-function-alist):
8 (window-system-initialization-alist): Add mac entries.
9
10 * loadup.el: Load mac-win on a Mac.
11
12007-05-17 Jason Rumney <jasonr@gnu.org> 122007-05-17 Jason Rumney <jasonr@gnu.org>
2 13
3 * term/w32-win.el (internal-face-interactive): Remove obsolete function. 14 * term/w32-win.el (internal-face-interactive): Remove obsolete function.
diff --git a/lisp/loadup.el b/lisp/loadup.el
index b20b40bc6c2..8c03610043d 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -212,6 +212,9 @@
212(if (eq system-type 'macos) 212(if (eq system-type 'macos)
213 (progn 213 (progn
214 (load "ls-lisp"))) 214 (load "ls-lisp")))
215(if (eq system-type 'darwin)
216 (progn
217 (load "term/mac-win")))
215(if (fboundp 'atan) ; preload some constants and 218(if (fboundp 'atan) ; preload some constants and
216 (progn ; floating pt. functions if we have float support. 219 (progn ; floating pt. functions if we have float support.
217 (load "emacs-lisp/float-sup"))) 220 (load "emacs-lisp/float-sup")))
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 7be231f3a2a..281aaf2e83b 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -65,8 +65,8 @@
65;; An alist of X options and the function which handles them. See 65;; An alist of X options and the function which handles them. See
66;; ../startup.el. 66;; ../startup.el.
67 67
68(if (not (eq window-system 'mac)) 68;; (if (not (eq window-system 'mac))
69 (error "%s: Loading mac-win.el but not compiled for Mac" (invocation-name))) 69;; (error "%s: Loading mac-win.el but not compiled for Mac" (invocation-name)))
70 70
71(require 'frame) 71(require 'frame)
72(require 'mouse) 72(require 'mouse)
@@ -2594,13 +2594,23 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
2594 2594
2595(defun x-win-suspend-error () 2595(defun x-win-suspend-error ()
2596 (error "Suspending an Emacs running under Mac makes no sense")) 2596 (error "Suspending an Emacs running under Mac makes no sense"))
2597
2598(defalias 'x-cut-buffer-or-selection-value 'x-get-selection-value)
2599
2600(defvar mac-initialized nil
2601 "Non-nil if the w32 window system has been initialized.")
2602
2603(defun mac-initialize-window-system ()
2604 "Initialize Emacs for Mac GUI frames."
2605
2597(add-hook 'suspend-hook 'x-win-suspend-error) 2606(add-hook 'suspend-hook 'x-win-suspend-error)
2598 2607
2599;;; Arrange for the kill and yank functions to set and check the clipboard. 2608;;; Arrange for the kill and yank functions to set and check the clipboard.
2600(setq interprogram-cut-function 'x-select-text) 2609(setq interprogram-cut-function 'x-select-text)
2601(setq interprogram-paste-function 'x-get-selection-value) 2610(setq interprogram-paste-function 'x-get-selection-value)
2602 2611
2603(defalias 'x-cut-buffer-or-selection-value 'x-get-selection-value) 2612
2613
2604 2614
2605;;; Turn off window-splitting optimization; Mac is usually fast enough 2615;;; Turn off window-splitting optimization; Mac is usually fast enough
2606;;; that this is only annoying. 2616;;; that this is only annoying.
@@ -2616,6 +2626,7 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
2616;; Enable CLIPBOARD copy/paste through menu bar commands. 2626;; Enable CLIPBOARD copy/paste through menu bar commands.
2617(menu-bar-enable-clipboard) 2627(menu-bar-enable-clipboard)
2618 2628
2629
2619;; Initiate drag and drop 2630;; Initiate drag and drop
2620 2631
2621(define-key special-event-map [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) 2632(define-key special-event-map [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event)
@@ -2637,6 +2648,8 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
2637(global-unset-key [vertical-scroll-bar drag-mouse-1]) 2648(global-unset-key [vertical-scroll-bar drag-mouse-1])
2638(global-unset-key [vertical-scroll-bar mouse-1]) 2649(global-unset-key [vertical-scroll-bar mouse-1])
2639 2650
2651(setq mac-initialized t)))
2652
2640(defun mac-handle-scroll-bar-event (event) 2653(defun mac-handle-scroll-bar-event (event)
2641 "Handle scroll bar EVENT to emulate Mac Toolbox style scrolling." 2654 "Handle scroll bar EVENT to emulate Mac Toolbox style scrolling."
2642 (interactive "e") 2655 (interactive "e")
@@ -2683,7 +2696,6 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
2683 (mac-scroll-ignore-events) 2696 (mac-scroll-ignore-events)
2684 (scroll-up 1))) 2697 (scroll-up 1)))
2685 2698
2686)
2687 2699
2688 2700
2689;;;; Others 2701;;;; Others
@@ -2721,5 +2733,11 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
2721;; or bold bitmap versions will not display these variants correctly. 2733;; or bold bitmap versions will not display these variants correctly.
2722(setq scalable-fonts-allowed t) 2734(setq scalable-fonts-allowed t)
2723 2735
2736(add-to-list 'handle-args-function-alist '(mac . x-handle-args))
2737(add-to-list 'frame-creation-function-alist '(mac . x-create-frame-with-faces))
2738(add-to-list 'window-system-initialization-alist '(mac . mac-initialize-window-system))
2739
2740(provide 'mac-win)
2741
2724;; arch-tag: 71dfcd14-cde8-4d66-b05c-85ec94fb23a6 2742;; arch-tag: 71dfcd14-cde8-4d66-b05c-85ec94fb23a6
2725;;; mac-win.el ends here 2743;;; mac-win.el ends here