diff options
| author | Miles Bader | 2005-04-14 05:03:52 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-04-14 05:03:52 +0000 |
| commit | 4a4ae7ad21e9e53ed9a0006c39d69108333bc896 (patch) | |
| tree | 514ec70cdfdd49c518599e15b8fdf1e85850e7d7 /src | |
| parent | 6f14f88410854410caf4b402cfbe0f93a80c3f86 (diff) | |
| parent | 24531f226fb1150c3a52a3ebf9273d1af36062ea (diff) | |
| download | emacs-4a4ae7ad21e9e53ed9a0006c39d69108333bc896.tar.gz emacs-4a4ae7ad21e9e53ed9a0006c39d69108333bc896.zip | |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-37
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 241-257)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 59-65)
- Update from CVS
- Merge from emacs--cvs-trunk--0
- (mm-string-to-multibyte): Use Gnus trunk definition.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 61 | ||||
| -rw-r--r-- | src/buffer.c | 18 | ||||
| -rw-r--r-- | src/dispnew.c | 22 | ||||
| -rw-r--r-- | src/emacs.c | 6 | ||||
| -rw-r--r-- | src/fns.c | 17 | ||||
| -rw-r--r-- | src/keyboard.c | 29 | ||||
| -rw-r--r-- | src/keymap.c | 19 | ||||
| -rw-r--r-- | src/lread.c | 2 | ||||
| -rw-r--r-- | src/macterm.c | 101 | ||||
| -rw-r--r-- | src/print.c | 16 | ||||
| -rw-r--r-- | src/termhooks.h | 9 | ||||
| -rw-r--r-- | src/window.c | 34 |
12 files changed, 198 insertions, 136 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 170838bef49..5847c35f37a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,52 @@ | |||
| 1 | 2005-04-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * window.c (Fset_window_configuration): Be careful when you choose | ||
| 4 | among several possible points for the new_current_buffer. | ||
| 5 | |||
| 6 | 2005-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 7 | |||
| 8 | * keyboard.c (poll_for_input) [SYNC_INPUT]: Don't call | ||
| 9 | poll_for_input_1. Set interrupt_input_pending to 1 instead. | ||
| 10 | (Qlanguage_change) [MAC_OS]: New variable. | ||
| 11 | (syms_of_keyboard) [MAC_OS]: Intern and staticpro it. | ||
| 12 | (kbd_buffer_get_event) [MAC_OS]: Make event for LANGUAGE_CHANGE_EVENT. | ||
| 13 | |||
| 14 | * macterm.c (mac_keyboard_text_encoding) | ||
| 15 | (current_mac_keyboard_text_encoding): Remove variables. | ||
| 16 | (XTread_socket): Store language-change event if keyboard script | ||
| 17 | change is detected. Don't convert input to | ||
| 18 | `mac_keyboard_text_encoding'. | ||
| 19 | (syms_of_macterm): Delete DEFVAR_INT for mac-keyboard-text-encoding. | ||
| 20 | |||
| 21 | * termhooks.h (enum event_kind) [MAC_OS]: | ||
| 22 | Add LANGUAGE_CHANGE_EVENT. | ||
| 23 | |||
| 24 | 2005-04-10 Richard M. Stallman <rms@gnu.org> | ||
| 25 | |||
| 26 | * emacs.c (standard_args): Rename --bare-bones to --quick. | ||
| 27 | Add -D aka --basic-display. | ||
| 28 | |||
| 29 | * buffer.c (Fmake_indirect_buffer): Clear out some local variables. | ||
| 30 | |||
| 31 | 2005-04-09 Richard M. Stallman <rms@gnu.org> | ||
| 32 | |||
| 33 | * keymap.c (where_is_internal): Convert a string used as event type | ||
| 34 | into "(any string)". | ||
| 35 | |||
| 36 | * lread.c (Vloads_in_progress): Not static. | ||
| 37 | |||
| 38 | * fns.c (Vloads_in_progress): Add extern. | ||
| 39 | (Frequire): Don't do LOADHIST_ATTACH if Vloads_in_progress is nil. | ||
| 40 | |||
| 41 | 2005-04-09 Thien-Thi Nguyen <ttn@surf.glug.org> | ||
| 42 | |||
| 43 | * dispnew.c (mirror_line_dance): Avoid crash if W2 is null. | ||
| 44 | |||
| 45 | 2005-04-09 Lute Kamstra <lute@gnu.org> | ||
| 46 | |||
| 47 | * print.c (PRINTPREPARE): Check if the marker PRINTCHARFUN is | ||
| 48 | within the accessible part of the buffer. | ||
| 49 | |||
| 1 | 2005-04-09 Kim F. Storm <storm@cua.dk> | 50 | 2005-04-09 Kim F. Storm <storm@cua.dk> |
| 2 | 51 | ||
| 3 | * lread.c (readevalloop): Add args START and END as region in | 52 | * lread.c (readevalloop): Add args START and END as region in |
| @@ -22,8 +71,8 @@ | |||
| 22 | * mac.c (cfdate_to_lisp): Add `const' for variable `epoch_gdate'. | 71 | * mac.c (cfdate_to_lisp): Add `const' for variable `epoch_gdate'. |
| 23 | (Fmac_get_preference): Doc fix. | 72 | (Fmac_get_preference): Doc fix. |
| 24 | 73 | ||
| 25 | * macfns.c (Fx_create_frame, x_create_tip_frame): Add | 74 | * macfns.c (Fx_create_frame, x_create_tip_frame): |
| 26 | "fontset-mac" to fallback font/fontsets. | 75 | Add "fontset-mac" to fallback font/fontsets. |
| 27 | 76 | ||
| 28 | 2005-04-04 Kim F. Storm <storm@cua.dk> | 77 | 2005-04-04 Kim F. Storm <storm@cua.dk> |
| 29 | 78 | ||
| @@ -41,8 +90,8 @@ | |||
| 41 | 90 | ||
| 42 | 2005-04-01 Kenichi Handa <handa@m17n.org> | 91 | 2005-04-01 Kenichi Handa <handa@m17n.org> |
| 43 | 92 | ||
| 44 | * lisp.h (Vascii_upcase_table, Vascii_canon_table, | 93 | * lisp.h (Vascii_upcase_table, Vascii_canon_table) |
| 45 | Vascii_eqv_table): Extern them. | 94 | (Vascii_eqv_table): Extern them. |
| 46 | 95 | ||
| 47 | * casetab.c (set_case_table): If standard is nonzero, setup | 96 | * casetab.c (set_case_table): If standard is nonzero, setup |
| 48 | Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table. | 97 | Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table. |
| @@ -54,8 +103,8 @@ | |||
| 54 | Vascii_downcase_table. | 103 | Vascii_downcase_table. |
| 55 | (fast_string_match_ignore_case): Likewise. | 104 | (fast_string_match_ignore_case): Likewise. |
| 56 | (search_buffer): Fix checking of boyer-moore usability. | 105 | (search_buffer): Fix checking of boyer-moore usability. |
| 57 | (boyer_moore): Calculate translate_prev_byte1/2/3 in advance. No | 106 | (boyer_moore): Calculate translate_prev_byte1/2/3 in advance. |
| 58 | need of tranlating characters in PAT. Fix calculation of | 107 | No need of tranlating characters in PAT. Fix calculation of |
| 59 | simple_translate. | 108 | simple_translate. |
| 60 | 109 | ||
| 61 | 2005-03-31 Stefan Monnier <monnier@iro.umontreal.ca> | 110 | 2005-03-31 Stefan Monnier <monnier@iro.umontreal.ca> |
diff --git a/src/buffer.c b/src/buffer.c index dcda7bc80ab..d24deb0a9a1 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -631,7 +631,21 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 631 | XMARKER (b->zv_marker)->insertion_type = 1; | 631 | XMARKER (b->zv_marker)->insertion_type = 1; |
| 632 | } | 632 | } |
| 633 | else | 633 | else |
| 634 | clone_per_buffer_values (b->base_buffer, b); | 634 | { |
| 635 | struct buffer *old_b = current_buffer; | ||
| 636 | |||
| 637 | clone_per_buffer_values (b->base_buffer, b); | ||
| 638 | b->filename = Qnil; | ||
| 639 | b->file_truename = Qnil; | ||
| 640 | b->display_count = make_number (0); | ||
| 641 | b->backed_up = Qnil; | ||
| 642 | b->auto_save_file_name = Qnil; | ||
| 643 | set_buffer_internal_1 (b); | ||
| 644 | Fset (intern ("buffer-save-without-query"), Qnil); | ||
| 645 | Fset (intern ("buffer-file-number"), Qnil); | ||
| 646 | Fset (intern ("buffer-stale-function"), Qnil); | ||
| 647 | set_buffer_internal_1 (old_b); | ||
| 648 | } | ||
| 635 | 649 | ||
| 636 | return buf; | 650 | return buf; |
| 637 | } | 651 | } |
| @@ -932,7 +946,7 @@ is the default binding of variable. */) | |||
| 932 | } | 946 | } |
| 933 | 947 | ||
| 934 | /* Return an alist of the Lisp-level buffer-local bindings of | 948 | /* Return an alist of the Lisp-level buffer-local bindings of |
| 935 | buffer BUF. That is, do't include the variables maintained | 949 | buffer BUF. That is, don't include the variables maintained |
| 936 | in special slots in the buffer object. */ | 950 | in special slots in the buffer object. */ |
| 937 | 951 | ||
| 938 | static Lisp_Object | 952 | static Lisp_Object |
diff --git a/src/dispnew.c b/src/dispnew.c index 7283747047c..cdd7f694ceb 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -3151,14 +3151,20 @@ mirror_line_dance (w, unchanged_at_top, nlines, copy_from, retained_p) | |||
| 3151 | int m2_from; | 3151 | int m2_from; |
| 3152 | 3152 | ||
| 3153 | w2 = frame_row_to_window (root, frame_from); | 3153 | w2 = frame_row_to_window (root, frame_from); |
| 3154 | m2 = w2->current_matrix; | 3154 | /* ttn@surf.glug.org: when enabling menu bar using `emacs |
| 3155 | m2_from = frame_from - m2->matrix_y; | 3155 | -nw', FROM_FRAME sometimes has no associated window. |
| 3156 | copy_row_except_pointers (m->rows + window_to, | 3156 | This check avoids a segfault if W2 is null. */ |
| 3157 | m2->rows + m2_from); | 3157 | if (w2) |
| 3158 | 3158 | { | |
| 3159 | /* If frame line is empty, window line is empty, too. */ | 3159 | m2 = w2->current_matrix; |
| 3160 | if (!retained_p[copy_from[i]]) | 3160 | m2_from = frame_from - m2->matrix_y; |
| 3161 | m->rows[window_to].enabled_p = 0; | 3161 | copy_row_except_pointers (m->rows + window_to, |
| 3162 | m2->rows + m2_from); | ||
| 3163 | |||
| 3164 | /* If frame line is empty, window line is empty, too. */ | ||
| 3165 | if (!retained_p[copy_from[i]]) | ||
| 3166 | m->rows[window_to].enabled_p = 0; | ||
| 3167 | } | ||
| 3162 | sync_p = 1; | 3168 | sync_p = 1; |
| 3163 | } | 3169 | } |
| 3164 | else if (from_inside_window_p) | 3170 | else if (from_inside_window_p) |
diff --git a/src/emacs.c b/src/emacs.c index 1ddde867d0b..79c0654d379 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1814,8 +1814,8 @@ struct standard_args standard_args[] = | |||
| 1814 | { "-d", "--display", 60, 1 }, | 1814 | { "-d", "--display", 60, 1 }, |
| 1815 | { "-display", 0, 60, 1 }, | 1815 | { "-display", 0, 60, 1 }, |
| 1816 | /* Now for the options handled in startup.el. */ | 1816 | /* Now for the options handled in startup.el. */ |
| 1817 | { "-Q", "--bare-bones", 55, 0 }, | 1817 | { "-Q", "--quick", 55, 0 }, |
| 1818 | { "-bare-bones", 0, 55, 0 }, | 1818 | { "-quick", 0, 55, 0 }, |
| 1819 | { "-q", "--no-init-file", 50, 0 }, | 1819 | { "-q", "--no-init-file", 50, 0 }, |
| 1820 | { "-no-init-file", 0, 50, 0 }, | 1820 | { "-no-init-file", 0, 50, 0 }, |
| 1821 | { "-no-site-file", "--no-site-file", 40, 0 }, | 1821 | { "-no-site-file", "--no-site-file", 40, 0 }, |
| @@ -1826,6 +1826,8 @@ struct standard_args standard_args[] = | |||
| 1826 | { "-i", "--icon-type", 15, 0 }, | 1826 | { "-i", "--icon-type", 15, 0 }, |
| 1827 | { "-itype", 0, 15, 0 }, | 1827 | { "-itype", 0, 15, 0 }, |
| 1828 | { "-iconic", "--iconic", 15, 0 }, | 1828 | { "-iconic", "--iconic", 15, 0 }, |
| 1829 | { "-D", "--basic-display", 12, 0}, | ||
| 1830 | { "--basic-display", 0, 12, 0}, | ||
| 1829 | { "-bg", "--background-color", 10, 1 }, | 1831 | { "-bg", "--background-color", 10, 1 }, |
| 1830 | { "-background", 0, 10, 1 }, | 1832 | { "-background", 0, 10, 1 }, |
| 1831 | { "-fg", "--foreground-color", 10, 1 }, | 1833 | { "-fg", "--foreground-color", 10, 1 }, |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Random utility Lisp functions. | 1 | /* Random utility Lisp functions. |
| 2 | Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 98, 99, 2000, 2001, 02, 03, 2004 | 2 | Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000, |
| 3 | Free Software Foundation, Inc. | 3 | 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -66,6 +66,7 @@ int use_file_dialog; | |||
| 66 | extern int minibuffer_auto_raise; | 66 | extern int minibuffer_auto_raise; |
| 67 | extern Lisp_Object minibuf_window; | 67 | extern Lisp_Object minibuf_window; |
| 68 | extern Lisp_Object Vlocale_coding_system; | 68 | extern Lisp_Object Vlocale_coding_system; |
| 69 | extern Lisp_Object Vloads_in_progress; | ||
| 69 | 70 | ||
| 70 | Lisp_Object Qstring_lessp, Qprovide, Qrequire; | 71 | Lisp_Object Qstring_lessp, Qprovide, Qrequire; |
| 71 | Lisp_Object Qyes_or_no_p_history; | 72 | Lisp_Object Qyes_or_no_p_history; |
| @@ -2907,9 +2908,15 @@ The normal messages at start and end of loading FILENAME are suppressed. */) | |||
| 2907 | CHECK_SYMBOL (feature); | 2908 | CHECK_SYMBOL (feature); |
| 2908 | 2909 | ||
| 2909 | /* Record the presence of `require' in this file | 2910 | /* Record the presence of `require' in this file |
| 2910 | even if the feature specified is already loaded. */ | 2911 | even if the feature specified is already loaded. |
| 2911 | LOADHIST_ATTACH (Fcons (Qrequire, feature)); | 2912 | But not more than once in any file, |
| 2912 | 2913 | and not when we aren't loading a file. */ | |
| 2914 | if (! NILP (Vloads_in_progress)) | ||
| 2915 | { | ||
| 2916 | tem = Fcons (Qrequire, feature); | ||
| 2917 | if (NILP (Fmember (tem, Vcurrent_load_list))) | ||
| 2918 | LOADHIST_ATTACH (tem); | ||
| 2919 | } | ||
| 2913 | tem = Fmemq (feature, Vfeatures); | 2920 | tem = Fmemq (feature, Vfeatures); |
| 2914 | 2921 | ||
| 2915 | if (NILP (tem)) | 2922 | if (NILP (tem)) |
diff --git a/src/keyboard.c b/src/keyboard.c index bd3e27c0f1a..ab8c8907c00 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -530,7 +530,7 @@ Lisp_Object Qmouse_fixup_help_message; | |||
| 530 | /* Symbols to denote kinds of events. */ | 530 | /* Symbols to denote kinds of events. */ |
| 531 | Lisp_Object Qfunction_key; | 531 | Lisp_Object Qfunction_key; |
| 532 | Lisp_Object Qmouse_click; | 532 | Lisp_Object Qmouse_click; |
| 533 | #ifdef WINDOWSNT | 533 | #if defined (WINDOWSNT) || defined (MAC_OS) |
| 534 | Lisp_Object Qlanguage_change; | 534 | Lisp_Object Qlanguage_change; |
| 535 | #endif | 535 | #endif |
| 536 | Lisp_Object Qdrag_n_drop; | 536 | Lisp_Object Qdrag_n_drop; |
| @@ -2115,7 +2115,11 @@ poll_for_input (timer) | |||
| 2115 | struct atimer *timer; | 2115 | struct atimer *timer; |
| 2116 | { | 2116 | { |
| 2117 | if (poll_suppress_count == 0) | 2117 | if (poll_suppress_count == 0) |
| 2118 | #ifdef SYNC_INPUT | ||
| 2119 | interrupt_input_pending = 1; | ||
| 2120 | #else | ||
| 2118 | poll_for_input_1 (); | 2121 | poll_for_input_1 (); |
| 2122 | #endif | ||
| 2119 | } | 2123 | } |
| 2120 | 2124 | ||
| 2121 | #endif /* POLL_FOR_INPUT */ | 2125 | #endif /* POLL_FOR_INPUT */ |
| @@ -2258,12 +2262,16 @@ make_ctrl_char (c) | |||
| 2258 | return c; | 2262 | return c; |
| 2259 | } | 2263 | } |
| 2260 | 2264 | ||
| 2261 | /* Display help echo in the echo area. | 2265 | /* Display the help-echo property of the character after the mouse pointer. |
| 2266 | Either show it in the echo area, or call show-help-function to display | ||
| 2267 | it by other means (maybe in a tooltip). | ||
| 2268 | |||
| 2269 | If HELP is nil, that means clear the previous help echo. | ||
| 2262 | 2270 | ||
| 2263 | HELP a string means display that string, HELP nil means clear the | 2271 | If HELP is a string, display that string. If HELP is a function, |
| 2264 | help echo. If HELP is a function, call it with OBJECT and POS as | 2272 | call it with OBJECT and POS as arguments; the function should |
| 2265 | arguments; the function should return a help string or nil for | 2273 | return a help string or nil for none. For all other types of HELP, |
| 2266 | none. For all other types of HELP evaluate it to obtain a string. | 2274 | evaluate it to obtain a string. |
| 2267 | 2275 | ||
| 2268 | WINDOW is the window in which the help was generated, if any. | 2276 | WINDOW is the window in which the help was generated, if any. |
| 2269 | It is nil if not in a window. | 2277 | It is nil if not in a window. |
| @@ -4027,11 +4035,16 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 4027 | x_activate_menubar (XFRAME (event->frame_or_window)); | 4035 | x_activate_menubar (XFRAME (event->frame_or_window)); |
| 4028 | } | 4036 | } |
| 4029 | #endif | 4037 | #endif |
| 4030 | #ifdef WINDOWSNT | 4038 | #if defined (WINDOWSNT) || defined (MAC_OS) |
| 4031 | else if (event->kind == LANGUAGE_CHANGE_EVENT) | 4039 | else if (event->kind == LANGUAGE_CHANGE_EVENT) |
| 4032 | { | 4040 | { |
| 4041 | #ifdef MAC_OS | ||
| 4042 | /* Make an event (language-change (KEY_SCRIPT)). */ | ||
| 4043 | obj = Fcons (make_number (event->code), Qnil); | ||
| 4044 | #else | ||
| 4033 | /* Make an event (language-change (FRAME CHARSET LCID)). */ | 4045 | /* Make an event (language-change (FRAME CHARSET LCID)). */ |
| 4034 | obj = Fcons (event->frame_or_window, Qnil); | 4046 | obj = Fcons (event->frame_or_window, Qnil); |
| 4047 | #endif | ||
| 4035 | obj = Fcons (Qlanguage_change, Fcons (obj, Qnil)); | 4048 | obj = Fcons (Qlanguage_change, Fcons (obj, Qnil)); |
| 4036 | kbd_fetch_ptr = event + 1; | 4049 | kbd_fetch_ptr = event + 1; |
| 4037 | } | 4050 | } |
| @@ -10835,7 +10848,7 @@ syms_of_keyboard () | |||
| 10835 | staticpro (&Qfunction_key); | 10848 | staticpro (&Qfunction_key); |
| 10836 | Qmouse_click = intern ("mouse-click"); | 10849 | Qmouse_click = intern ("mouse-click"); |
| 10837 | staticpro (&Qmouse_click); | 10850 | staticpro (&Qmouse_click); |
| 10838 | #ifdef WINDOWSNT | 10851 | #if defined (WINDOWSNT) || defined (MAC_OS) |
| 10839 | Qlanguage_change = intern ("language-change"); | 10852 | Qlanguage_change = intern ("language-change"); |
| 10840 | staticpro (&Qlanguage_change); | 10853 | staticpro (&Qlanguage_change); |
| 10841 | #endif | 10854 | #endif |
diff --git a/src/keymap.c b/src/keymap.c index 3aaecf1a5d7..3484186404a 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -739,7 +739,9 @@ usage: (map-keymap FUNCTION KEYMAP) */) | |||
| 739 | remove that. Also remove a menu help string as second element. | 739 | remove that. Also remove a menu help string as second element. |
| 740 | 740 | ||
| 741 | If AUTOLOAD is nonzero, load autoloadable keymaps | 741 | If AUTOLOAD is nonzero, load autoloadable keymaps |
| 742 | that are referred to with indirection. */ | 742 | that are referred to with indirection. |
| 743 | |||
| 744 | This can GC because menu_item_eval_property calls Feval. */ | ||
| 743 | 745 | ||
| 744 | Lisp_Object | 746 | Lisp_Object |
| 745 | get_keyelt (object, autoload) | 747 | get_keyelt (object, autoload) |
| @@ -2543,6 +2545,19 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap) | |||
| 2543 | continue; | 2545 | continue; |
| 2544 | 2546 | ||
| 2545 | record_sequence: | 2547 | record_sequence: |
| 2548 | /* Don't annoy user with strings from a menu such as | ||
| 2549 | Select Paste. Change them all to "(any string)", | ||
| 2550 | so that there seems to be only one menu item | ||
| 2551 | to report. */ | ||
| 2552 | if (! NILP (sequence)) | ||
| 2553 | { | ||
| 2554 | Lisp_Object tem; | ||
| 2555 | tem = Faref (sequence, make_number (XVECTOR (sequence)->size - 1)); | ||
| 2556 | if (STRINGP (tem)) | ||
| 2557 | Faset (sequence, make_number (XVECTOR (sequence)->size - 1), | ||
| 2558 | build_string ("(any string)")); | ||
| 2559 | } | ||
| 2560 | |||
| 2546 | /* It is a true unshadowed match. Record it, unless it's already | 2561 | /* It is a true unshadowed match. Record it, unless it's already |
| 2547 | been seen (as could happen when inheriting keymaps). */ | 2562 | been seen (as could happen when inheriting keymaps). */ |
| 2548 | if (NILP (Fmember (sequence, found))) | 2563 | if (NILP (Fmember (sequence, found))) |
| @@ -2750,7 +2765,7 @@ where_is_internal_2 (args, key, binding) | |||
| 2750 | } | 2765 | } |
| 2751 | 2766 | ||
| 2752 | 2767 | ||
| 2753 | /* This function cannot GC. */ | 2768 | /* This function can GC because get_keyelt can. */ |
| 2754 | 2769 | ||
| 2755 | static Lisp_Object | 2770 | static Lisp_Object |
| 2756 | where_is_internal_1 (binding, key, definition, noindirect, this, last, | 2771 | where_is_internal_1 (binding, key, definition, noindirect, this, last, |
diff --git a/src/lread.c b/src/lread.c index 9b0b5b90ec6..7fe626fa07c 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -203,7 +203,7 @@ static int new_backquote_flag; | |||
| 203 | /* A list of file names for files being loaded in Fload. Used to | 203 | /* A list of file names for files being loaded in Fload. Used to |
| 204 | check for recursive loads. */ | 204 | check for recursive loads. */ |
| 205 | 205 | ||
| 206 | static Lisp_Object Vloads_in_progress; | 206 | Lisp_Object Vloads_in_progress; |
| 207 | 207 | ||
| 208 | /* Non-zero means load dangerous compiled Lisp files. */ | 208 | /* Non-zero means load dangerous compiled Lisp files. */ |
| 209 | 209 | ||
diff --git a/src/macterm.c b/src/macterm.c index 9434cb9a5a2..614158309dd 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -7172,11 +7172,6 @@ Lisp_Object Vmac_pass_command_to_system; | |||
| 7172 | Lisp_Object Vmac_pass_control_to_system; | 7172 | Lisp_Object Vmac_pass_control_to_system; |
| 7173 | #endif | 7173 | #endif |
| 7174 | 7174 | ||
| 7175 | /* convert input from Mac keyboard (assumed to be in Mac Roman coding) | ||
| 7176 | to this text encoding */ | ||
| 7177 | int mac_keyboard_text_encoding; | ||
| 7178 | int current_mac_keyboard_text_encoding = kTextEncodingMacRoman; | ||
| 7179 | |||
| 7180 | /* Set in term/mac-win.el to indicate that event loop can now generate | 7175 | /* Set in term/mac-win.el to indicate that event loop can now generate |
| 7181 | drag and drop events. */ | 7176 | drag and drop events. */ |
| 7182 | Lisp_Object Qmac_ready_for_drag_n_drop; | 7177 | Lisp_Object Qmac_ready_for_drag_n_drop; |
| @@ -8990,6 +8985,23 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8990 | break; | 8985 | break; |
| 8991 | } | 8986 | } |
| 8992 | #endif | 8987 | #endif |
| 8988 | { | ||
| 8989 | static SInt16 last_key_script = -1; | ||
| 8990 | SInt16 current_key_script = GetScriptManagerVariable (smKeyScript); | ||
| 8991 | |||
| 8992 | if (last_key_script != current_key_script) | ||
| 8993 | { | ||
| 8994 | struct input_event event; | ||
| 8995 | |||
| 8996 | EVENT_INIT (event); | ||
| 8997 | event.kind = LANGUAGE_CHANGE_EVENT; | ||
| 8998 | event.arg = Qnil; | ||
| 8999 | event.code = current_key_script; | ||
| 9000 | kbd_buffer_store_event (&event); | ||
| 9001 | count++; | ||
| 9002 | } | ||
| 9003 | last_key_script = current_key_script; | ||
| 9004 | } | ||
| 8993 | 9005 | ||
| 8994 | ObscureCursor (); | 9006 | ObscureCursor (); |
| 8995 | 9007 | ||
| @@ -9042,70 +9054,6 @@ XTread_socket (sd, expected, hold_quit) | |||
| 9042 | } | 9054 | } |
| 9043 | } | 9055 | } |
| 9044 | 9056 | ||
| 9045 | /* If variable mac-convert-keyboard-input-to-latin-1 is | ||
| 9046 | non-nil, convert non-ASCII characters typed at the Mac | ||
| 9047 | keyboard (presumed to be in the Mac Roman encoding) to | ||
| 9048 | iso-latin-1 encoding before they are passed to Emacs. | ||
| 9049 | This enables the Mac keyboard to be used to enter | ||
| 9050 | non-ASCII iso-latin-1 characters directly. */ | ||
| 9051 | if (mac_keyboard_text_encoding != kTextEncodingMacRoman | ||
| 9052 | && inev.kind == ASCII_KEYSTROKE_EVENT && inev.code >= 128) | ||
| 9053 | { | ||
| 9054 | static TECObjectRef converter = NULL; | ||
| 9055 | OSStatus the_err = noErr; | ||
| 9056 | OSStatus convert_status = noErr; | ||
| 9057 | |||
| 9058 | if (converter == NULL) | ||
| 9059 | { | ||
| 9060 | the_err = TECCreateConverter (&converter, | ||
| 9061 | kTextEncodingMacRoman, | ||
| 9062 | mac_keyboard_text_encoding); | ||
| 9063 | current_mac_keyboard_text_encoding | ||
| 9064 | = mac_keyboard_text_encoding; | ||
| 9065 | } | ||
| 9066 | else if (mac_keyboard_text_encoding | ||
| 9067 | != current_mac_keyboard_text_encoding) | ||
| 9068 | { | ||
| 9069 | /* Free the converter for the current encoding | ||
| 9070 | before creating a new one. */ | ||
| 9071 | TECDisposeConverter (converter); | ||
| 9072 | the_err = TECCreateConverter (&converter, | ||
| 9073 | kTextEncodingMacRoman, | ||
| 9074 | mac_keyboard_text_encoding); | ||
| 9075 | current_mac_keyboard_text_encoding | ||
| 9076 | = mac_keyboard_text_encoding; | ||
| 9077 | } | ||
| 9078 | |||
| 9079 | if (the_err == noErr) | ||
| 9080 | { | ||
| 9081 | unsigned char ch = inev.code; | ||
| 9082 | ByteCount actual_input_length, actual_output_length; | ||
| 9083 | unsigned char outbuf[32]; | ||
| 9084 | |||
| 9085 | convert_status = TECConvertText (converter, &ch, 1, | ||
| 9086 | &actual_input_length, | ||
| 9087 | outbuf, 1, | ||
| 9088 | &actual_output_length); | ||
| 9089 | if (convert_status == noErr | ||
| 9090 | && actual_input_length == 1 | ||
| 9091 | && actual_output_length == 1) | ||
| 9092 | inev.code = *outbuf; | ||
| 9093 | |||
| 9094 | /* Reset internal states of the converter object. | ||
| 9095 | If it fails, create another one. */ | ||
| 9096 | convert_status = TECFlushText (converter, outbuf, | ||
| 9097 | sizeof (outbuf), | ||
| 9098 | &actual_output_length); | ||
| 9099 | if (convert_status != noErr) | ||
| 9100 | { | ||
| 9101 | TECDisposeConverter (converter); | ||
| 9102 | TECCreateConverter (&converter, | ||
| 9103 | kTextEncodingMacRoman, | ||
| 9104 | mac_keyboard_text_encoding); | ||
| 9105 | } | ||
| 9106 | } | ||
| 9107 | } | ||
| 9108 | |||
| 9109 | #if USE_CARBON_EVENTS | 9057 | #if USE_CARBON_EVENTS |
| 9110 | inev.modifiers = mac_event_to_emacs_modifiers (eventRef); | 9058 | inev.modifiers = mac_event_to_emacs_modifiers (eventRef); |
| 9111 | #else | 9059 | #else |
| @@ -9918,21 +9866,6 @@ Toolbox for processing before Emacs sees it. */); | |||
| 9918 | The text will be rendered using Core Graphics text rendering which | 9866 | The text will be rendered using Core Graphics text rendering which |
| 9919 | may anti-alias the text. */); | 9867 | may anti-alias the text. */); |
| 9920 | Vmac_use_core_graphics = Qnil; | 9868 | Vmac_use_core_graphics = Qnil; |
| 9921 | |||
| 9922 | DEFVAR_INT ("mac-keyboard-text-encoding", &mac_keyboard_text_encoding, | ||
| 9923 | doc: /* One of the Text Encoding Base constant values defined in the | ||
| 9924 | Basic Text Constants section of Inside Macintosh - Text Encoding | ||
| 9925 | Conversion Manager. Its value determines the encoding characters | ||
| 9926 | typed at the Mac keyboard (presumed to be in the MacRoman encoding) | ||
| 9927 | will convert into. E.g., if it is set to kTextEncodingMacRoman (0), | ||
| 9928 | its default value, no conversion takes place. If it is set to | ||
| 9929 | kTextEncodingISOLatin1 (0x201) or kTextEncodingISOLatin2 (0x202), | ||
| 9930 | characters typed on Mac keyboard are first converted into the | ||
| 9931 | ISO Latin-1 or ISO Latin-2 encoding, respectively before being | ||
| 9932 | passed to Emacs. Together with Emacs's set-keyboard-coding-system | ||
| 9933 | command, this enables the Mac keyboard to be used to enter non-ASCII | ||
| 9934 | characters directly. */); | ||
| 9935 | mac_keyboard_text_encoding = kTextEncodingMacRoman; | ||
| 9936 | } | 9869 | } |
| 9937 | 9870 | ||
| 9938 | /* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b | 9871 | /* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b |
diff --git a/src/print.c b/src/print.c index 3a21ef29560..145287707eb 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Lisp object printing and output streams. | 1 | /* Lisp object printing and output streams. |
| 2 | Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 01, 03, 2004 | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | Free Software Foundation, Inc. | 3 | 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -212,13 +212,17 @@ void print_interval (); | |||
| 212 | } \ | 212 | } \ |
| 213 | if (MARKERP (printcharfun)) \ | 213 | if (MARKERP (printcharfun)) \ |
| 214 | { \ | 214 | { \ |
| 215 | if (!(XMARKER (original)->buffer)) \ | 215 | EMACS_INT marker_pos; \ |
| 216 | if (!(XMARKER (printcharfun)->buffer)) \ | ||
| 216 | error ("Marker does not point anywhere"); \ | 217 | error ("Marker does not point anywhere"); \ |
| 217 | if (XMARKER (original)->buffer != current_buffer) \ | 218 | if (XMARKER (printcharfun)->buffer != current_buffer) \ |
| 218 | set_buffer_internal (XMARKER (original)->buffer); \ | 219 | set_buffer_internal (XMARKER (printcharfun)->buffer); \ |
| 220 | marker_pos = marker_position (printcharfun); \ | ||
| 221 | if (marker_pos < BEGV || marker_pos > ZV) \ | ||
| 222 | error ("Marker is outside the accessible part of the buffer"); \ | ||
| 219 | old_point = PT; \ | 223 | old_point = PT; \ |
| 220 | old_point_byte = PT_BYTE; \ | 224 | old_point_byte = PT_BYTE; \ |
| 221 | SET_PT_BOTH (marker_position (printcharfun), \ | 225 | SET_PT_BOTH (marker_pos, \ |
| 222 | marker_byte_position (printcharfun)); \ | 226 | marker_byte_position (printcharfun)); \ |
| 223 | start_point = PT; \ | 227 | start_point = PT; \ |
| 224 | start_point_byte = PT_BYTE; \ | 228 | start_point_byte = PT_BYTE; \ |
diff --git a/src/termhooks.h b/src/termhooks.h index 83721f65912..3e39e644173 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -252,10 +252,11 @@ enum event_kind | |||
| 252 | the wheel event occurred in. | 252 | the wheel event occurred in. |
| 253 | .timestamp gives a timestamp (in | 253 | .timestamp gives a timestamp (in |
| 254 | milliseconds) for the event. */ | 254 | milliseconds) for the event. */ |
| 255 | #ifdef WINDOWSNT | 255 | #if defined (WINDOWSNT) || defined (MAC_OS) |
| 256 | LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is generated | 256 | LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is |
| 257 | on WINDOWSNT when the keyboard layout | 257 | generated on WINDOWSNT or Mac OS |
| 258 | or input language is changed by the | 258 | when the keyboard layout or input |
| 259 | language is changed by the | ||
| 259 | user. */ | 260 | user. */ |
| 260 | #endif | 261 | #endif |
| 261 | SCROLL_BAR_CLICK_EVENT, /* .code gives the number of the mouse button | 262 | SCROLL_BAR_CLICK_EVENT, /* .code gives the number of the mouse button |
diff --git a/src/window.c b/src/window.c index be0f47da8d4..ec69c5b9aa5 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Window creation, deletion and examination for GNU Emacs. | 1 | /* Window creation, deletion and examination for GNU Emacs. |
| 2 | Does not include redisplay. | 2 | Does not include redisplay. |
| 3 | Copyright (C) 1985,86,87, 1993,94,95,96,97,98, 2000,01,02,03,04 | 3 | Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000, |
| 4 | Free Software Foundation, Inc. | 4 | 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -3171,6 +3171,9 @@ selects the buffer of the selected window before each command. */) | |||
| 3171 | if (EQ (window, selected_window)) | 3171 | if (EQ (window, selected_window)) |
| 3172 | return window; | 3172 | return window; |
| 3173 | 3173 | ||
| 3174 | /* Store the current buffer's actual point into the | ||
| 3175 | old selected window. It belongs to that window, | ||
| 3176 | and when the window is not selected, must be in the window. */ | ||
| 3174 | if (!NILP (selected_window)) | 3177 | if (!NILP (selected_window)) |
| 3175 | { | 3178 | { |
| 3176 | ow = XWINDOW (selected_window); | 3179 | ow = XWINDOW (selected_window); |
| @@ -5591,7 +5594,20 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5591 | if (XBUFFER (new_current_buffer) == current_buffer) | 5594 | if (XBUFFER (new_current_buffer) == current_buffer) |
| 5592 | old_point = PT; | 5595 | old_point = PT; |
| 5593 | else | 5596 | else |
| 5594 | old_point = BUF_PT (XBUFFER (new_current_buffer)); | 5597 | /* BUF_PT (XBUFFER (new_current_buffer)) gives us the position of |
| 5598 | point in new_current_buffer as of the last time this buffer was | ||
| 5599 | used. This can be non-deterministic since it can be changed by | ||
| 5600 | things like jit-lock by mere temporary selection of some random | ||
| 5601 | window that happens to show this buffer. | ||
| 5602 | So if possible we want this arbitrary choice of "which point" to | ||
| 5603 | be the one from the to-be-selected-window so as to prevent this | ||
| 5604 | window's cursor from being copied from another window. */ | ||
| 5605 | if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer) | ||
| 5606 | /* If current_window = selected_window, its point is in BUF_PT. */ | ||
| 5607 | && !EQ (selected_window, data->current_window)) | ||
| 5608 | old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos; | ||
| 5609 | else | ||
| 5610 | old_point = BUF_PT (XBUFFER (new_current_buffer)); | ||
| 5595 | } | 5611 | } |
| 5596 | 5612 | ||
| 5597 | frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; | 5613 | frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; |
| @@ -5636,8 +5652,9 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5636 | #endif | 5652 | #endif |
| 5637 | #endif | 5653 | #endif |
| 5638 | 5654 | ||
| 5639 | /* "Swap out" point from the selected window | 5655 | /* "Swap out" point from the selected window's buffer |
| 5640 | into its buffer. We do this now, before | 5656 | into the window itself. (Normally the pointm of the selected |
| 5657 | window holds garbage.) We do this now, before | ||
| 5641 | restoring the window contents, and prevent it from | 5658 | restoring the window contents, and prevent it from |
| 5642 | being done later on when we select a new window. */ | 5659 | being done later on when we select a new window. */ |
| 5643 | if (! NILP (XWINDOW (selected_window)->buffer)) | 5660 | if (! NILP (XWINDOW (selected_window)->buffer)) |
| @@ -5787,10 +5804,11 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5787 | FRAME_ROOT_WINDOW (f) = data->root_window; | 5804 | FRAME_ROOT_WINDOW (f) = data->root_window; |
| 5788 | /* Prevent "swapping out point" in the old selected window | 5805 | /* Prevent "swapping out point" in the old selected window |
| 5789 | using the buffer that has been restored into it. | 5806 | using the buffer that has been restored into it. |
| 5790 | Use the point value from the beginning of this function | 5807 | We already swapped out point that from that window's old buffer. */ |
| 5791 | since unshow_buffer (called from delete_all_subwindows) | ||
| 5792 | could have altered it. */ | ||
| 5793 | selected_window = Qnil; | 5808 | selected_window = Qnil; |
| 5809 | |||
| 5810 | /* Arrange *not* to restore point in the buffer that was | ||
| 5811 | current when the window configuration was saved. */ | ||
| 5794 | if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) | 5812 | if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) |
| 5795 | set_marker_restricted (XWINDOW (data->current_window)->pointm, | 5813 | set_marker_restricted (XWINDOW (data->current_window)->pointm, |
| 5796 | make_number (old_point), | 5814 | make_number (old_point), |