Commit 202c09a8 authored by Dan Nicolaescu's avatar Dan Nicolaescu
Browse files

* term/mac-win.el (x-setup-function-keys): Only setup

local-function-key-map if it has not been setup already for the
current frame. Move the suspend-emacs processing here.

* s/darwin.h (MULTI_KBOARD): Remove.

* macfns.c (x_create_tip_frame, Fx_create_frame)
(x_create_tip_frame): Don't deal with MULTI_KBOARD.
parent 1571d112
2007-11-20 Dan Nicolaescu <dann@ics.uci.edu>
* term/mac-win.el (x-setup-function-keys): Only setup
local-function-key-map if it has not been setup already for the
current frame. Move the suspend-emacs processing here.
2007-11-20 Juanma Barranquero <lekktu@gmail.com>
* progmodes/grep.el (xargs-program): New variable.
......
......@@ -1058,28 +1058,31 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
;;;; Function keys
(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
global-map)
(defun x-setup-function-keys (frame)
"Setup Function Keys for mac."
;; Map certain keypad keys into ASCII characters
;; that people usually expect.
(define-key local-function-key-map [backspace] [?\d])
(define-key local-function-key-map [delete] [?\d])
(define-key local-function-key-map [tab] [?\t])
(define-key local-function-key-map [linefeed] [?\n])
(define-key local-function-key-map [clear] [?\C-l])
(define-key local-function-key-map [return] [?\C-m])
(define-key local-function-key-map [escape] [?\e])
(define-key local-function-key-map [M-backspace] [?\M-\d])
(define-key local-function-key-map [M-delete] [?\M-\d])
(define-key local-function-key-map [M-tab] [?\M-\t])
(define-key local-function-key-map [M-linefeed] [?\M-\n])
(define-key local-function-key-map [M-clear] [?\M-\C-l])
(define-key local-function-key-map [M-return] [?\M-\C-m])
(define-key local-function-key-map [M-escape] [?\M-\e])
)
;; Don't do this twice on the same display, or it would break
;; normal-erase-is-backspace-mode.
(unless (terminal-parameter frame 'x-setup-function-keys)
(with-selected-frame frame
;; Map certain keypad keys into ASCII characters
;; that people usually expect.
(define-key local-function-key-map [backspace] [?\d])
(define-key local-function-key-map [delete] [?\d])
(define-key local-function-key-map [tab] [?\t])
(define-key local-function-key-map [linefeed] [?\n])
(define-key local-function-key-map [clear] [?\C-l])
(define-key local-function-key-map [return] [?\C-m])
(define-key local-function-key-map [escape] [?\e])
(define-key local-function-key-map [M-backspace] [?\M-\d])
(define-key local-function-key-map [M-delete] [?\M-\d])
(define-key local-function-key-map [M-tab] [?\M-\t])
(define-key local-function-key-map [M-linefeed] [?\M-\n])
(define-key local-function-key-map [M-clear] [?\M-\C-l])
(define-key local-function-key-map [M-return] [?\M-\C-m])
(define-key local-function-key-map [M-escape] [?\M-\e])
(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
local-function-key-map global-map))
(set-terminal-parameter frame 'x-setup-function-keys t))))
;; These tell read-char how to convert
;; these special chars to ASCII.
......
2007-11-20 Dan Nicolaescu <dann@ics.uci.edu>
* s/darwin.h (MULTI_KBOARD): Remove.
* macfns.c (x_create_tip_frame, Fx_create_frame)
(x_create_tip_frame): Don't deal with MULTI_KBOARD.
2007-11-19 Stefan Monnier <monnier@iro.umontreal.ca>
* buffer.c (Fbuffer_local_value): Remove redundant test.
......
......@@ -2547,11 +2547,7 @@ This function is an internal primitive--use `make-frame' instead. */)
if (EQ (display, Qunbound))
display = Qnil;
dpyinfo = check_x_display_info (display);
#ifdef MULTI_KBOARD
kb = dpyinfo->terminal->kboard;
#else
kb = &the_only_kboard;
#endif
name = mac_get_arg (parameters, Qname, "name", "Name", RES_TYPE_STRING);
if (!STRINGP (name)
......@@ -2615,9 +2611,7 @@ This function is an internal primitive--use `make-frame' instead. */)
image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount;
dpyinfo_refcount = dpyinfo->reference_count;
#endif /* GLYPH_DEBUG */
#ifdef MULTI_KBOARD
FRAME_KBOARD (f) = kb;
#endif
/* Specify the parent under which to make this window. */
......@@ -3809,11 +3803,7 @@ x_create_tip_frame (dpyinfo, parms, text)
parms = Fcopy_alist (parms);
#ifdef MULTI_KBOARD
kb = dpyinfo->terminal->kboard;
#else
kb = &the_only_kboard;
#endif
/* Get the name of the frame to use for resource lookup. */
name = mac_get_arg (parms, Qname, "name", "Name", RES_TYPE_STRING);
......@@ -3859,9 +3849,7 @@ x_create_tip_frame (dpyinfo, parms, text)
image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount;
dpyinfo_refcount = dpyinfo->reference_count;
#endif /* GLYPH_DEBUG */
#ifdef MULTI_KBOARD
FRAME_KBOARD (f) = kb;
#endif
f->output_data.mac->parent_desc = FRAME_MAC_DISPLAY_INFO (f)->root_window;
f->output_data.mac->explicit_parent = 0;
......
......@@ -12823,7 +12823,6 @@ mac_create_terminal (struct mac_display_info *dpyinfo)
/* FIXME: This keyboard setup is 100% untested, just copied from
w32_create_terminal in order to set window-system now that it's
a keyboard object. */
#ifdef MULTI_KBOARD
/* We don't yet support separate terminals on Mac, so don't try to share
keyboards between virtual terminals that are on the same physical
terminal like X does. */
......@@ -12838,7 +12837,6 @@ mac_create_terminal (struct mac_display_info *dpyinfo)
if (current_kboard == initial_kboard)
current_kboard = terminal->kboard;
terminal->kboard->reference_count++;
#endif
return terminal;
}
......
......@@ -53,9 +53,6 @@ Boston, MA 02110-1301, USA. */
/* We need a little extra space, see ../../lisp/loadup.el. */
#define SYSTEM_PURESIZE_EXTRA 30000
/* XXX The MULTI_KBOARD support does not work yet on this platform. */
#undef MULTI_KBOARD
#endif
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment