diff options
| author | Miles Bader | 2007-08-13 13:51:08 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-08-13 13:51:08 +0000 |
| commit | aaf34461ff5804e5cebe163b31e535da72e81d87 (patch) | |
| tree | b096310b459b78e437f08ac0f1f00954840a5db5 /src | |
| parent | 61d032dfd91b811d59acd7605ac02758be97e912 (diff) | |
| parent | 37cc095b6a175fb5a2fb18fa029eaf3aa3b3fa53 (diff) | |
| download | emacs-aaf34461ff5804e5cebe163b31e535da72e81d87.tar.gz emacs-aaf34461ff5804e5cebe163b31e535da72e81d87.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 846-851)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 88-92)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 242-244)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-31
Diffstat (limited to 'src')
129 files changed, 842 insertions, 560 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 87376db4e7f..e3c212924b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,131 @@ | |||
| 1 | 2007-08-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * gtkutil.c (update_frame_tool_bar): Use -1 as index | ||
| 4 | to gtk_toolbar_insert. | ||
| 5 | |||
| 6 | 2007-08-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 7 | |||
| 8 | * fileio.c (Finsert_file_contents): Yet Another Int/Lisp_Object Mixup. | ||
| 9 | |||
| 10 | * insdel.c (reset_var_on_error): New fun. | ||
| 11 | (signal_before_change, signal_after_change): | ||
| 12 | Use it to reset (after|before)-change-functions to nil in case of error. | ||
| 13 | Bind inhibit-modification-hooks to t. | ||
| 14 | Don't bind (after|before)-change-functions to nil while they run. | ||
| 15 | |||
| 16 | 2007-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 17 | |||
| 18 | * xterm.c (x_draw_image_glyph_string): Adjust stipple origin when | ||
| 19 | filling pixmap with stippled background. | ||
| 20 | |||
| 21 | 2007-08-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 22 | |||
| 23 | * macterm.c [TARGET_API_MAC_CARBON] (mac_handle_window_event): | ||
| 24 | Don't use invisible frame as parent window for repositioning. | ||
| 25 | |||
| 26 | 2007-08-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 27 | |||
| 28 | * print.c (new_backquote_output): Rename from old_backquote_output. | ||
| 29 | (print): Inverse its logic (according to its name) so as to match the | ||
| 30 | behavior of new_backquote_flag in lread.c. | ||
| 31 | |||
| 32 | 2007-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 33 | |||
| 34 | * gmalloc.c (posix_memalign): New function. | ||
| 35 | |||
| 36 | * macterm.c (frame_highlight, frame_unhighlight): Don't call | ||
| 37 | ActivateControl/DeactivateControl here. | ||
| 38 | [USE_MAC_TOOLBAR] (free_frame_tool_bar): Suppress animation when | ||
| 39 | frame-notice-user-settings is non-nil. | ||
| 40 | [USE_MAC_FONT_PANEL] (mac_handle_font_event): Also record parameter | ||
| 41 | for kEventParamFMFontStyle. | ||
| 42 | [TARGET_API_MAC_CARBON] (mac_handle_keyboard_event): Don't check | ||
| 43 | mac_pass_command_to_system and mac_pass_control_to_system here. | ||
| 44 | (XTread_socket): Call ActivateControl/DeactivateControl here. | ||
| 45 | (XTread_socket) [TARGET_API_MAC_CARBON]: | ||
| 46 | Check mac_pass_command_to_system and mac_pass_control_to_system here. | ||
| 47 | (mac_handle_window_event) [USE_MAC_TOOLBAR]: Add further workaround | ||
| 48 | for window repositioning. | ||
| 49 | |||
| 50 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 51 | |||
| 52 | * Replace `iff' in doc-strings and comments. | ||
| 53 | |||
| 54 | 2007-08-07 Chong Yidong <cyd@stupidchicken.com> | ||
| 55 | |||
| 56 | * xdisp.c (move_it_by_lines): Remove incorrect optimization. | ||
| 57 | |||
| 58 | 2007-08-07 Martin Rudalics <rudalics@gmx.at> | ||
| 59 | |||
| 60 | * fileio.c (Finsert_file_contents): Run format-decode and | ||
| 61 | after_insert_file_functions on entire buffer when REPLACE is | ||
| 62 | non-nil and inhibit modification_hooks and point_motion_hooks. | ||
| 63 | For consistency, run after_insert_file_functions iff something | ||
| 64 | got inserted. Move signal_after_change and update_compositions | ||
| 65 | after code running after_insert_file_functions. Make sure that | ||
| 66 | undo_list doesn't record intermediate steps of the decoding | ||
| 67 | process. | ||
| 68 | |||
| 69 | 2007-08-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 70 | |||
| 71 | * emacs.c (main) | ||
| 72 | [HAVE_GTK_AND_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]: | ||
| 73 | Call malloc_enable_thread on interactive startup. | ||
| 74 | |||
| 75 | * gmalloc.c (_malloc_thread_enabled_p) [USE_PTHREAD]: New variable. | ||
| 76 | (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS, UNLOCK_ALIGNED_BLOCKS) | ||
| 77 | [USE_PTHREAD]: Conditionalize with it. | ||
| 78 | (malloc_atfork_handler_prepare, malloc_atfork_handler_parent) | ||
| 79 | (malloc_atfork_handler_child, malloc_enable_thread) [USE_PTHREAD]: | ||
| 80 | New functions. | ||
| 81 | |||
| 82 | 2007-08-06 Chong Yidong <cyd@stupidchicken.com> | ||
| 83 | |||
| 84 | * xdisp.c (redisplay_window): When restoring original buffer | ||
| 85 | position, make sure it is still valid. | ||
| 86 | |||
| 87 | * image.c (png_load): Ignore png-supplied background color. | ||
| 88 | |||
| 89 | 2007-08-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 90 | |||
| 91 | * mac.c [TARGET_API_MAC_CARBON] (cfdate_to_lisp): Obtain microsec value. | ||
| 92 | Use kCFAbsoluteTimeIntervalSince1970. | ||
| 93 | |||
| 94 | * macmenu.c (quit_dialog_event_loop) [TARGET_API_MAC_CARBON]: | ||
| 95 | New variable. | ||
| 96 | [TARGET_API_MAC_CARBON] (mac_handle_dialog_event): Set it if dialog | ||
| 97 | event loop should be quit. | ||
| 98 | [TARGET_API_MAC_CARBON] (create_and_show_dialog) [!MAC_OSX]: | ||
| 99 | Quit dialog event loop if quit_dialog_event_loop is set. | ||
| 100 | |||
| 101 | * macselect.c [!TARGET_API_MAC_CARBON]: Include Scrap.h. | ||
| 102 | (Selection): New typedef. Use instead of ScrapRef. | ||
| 103 | (mac_get_selection_from_symbol): Rename from get_scrap_from_symbol. | ||
| 104 | (mac_valid_selection_target_p): Rename from valid_scrap_target_type_p. | ||
| 105 | (mac_clear_selection): Rename from clear_scrap. | ||
| 106 | (get_flavor_type_from_symbol): New argument SEL and subsume function of | ||
| 107 | scrap_has_target_type. All uses changed. | ||
| 108 | (mac_get_selection_ownership_info, mac_valid_selection_value_p) | ||
| 109 | (mac_selection_has_target_p): New functions. | ||
| 110 | (mac_put_selection_value): Rename from put_scrap_string. | ||
| 111 | (mac_get_selection_value): Rename from get_scrap_string. | ||
| 112 | (mac_get_selection_target_list): Rename from get_scrap_target_type_list. | ||
| 113 | (put_scrap_private_timestamp, scrap_has_target_type) | ||
| 114 | (get_scrap_private_timestamp): Remove functions. | ||
| 115 | (SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP): Remove define. | ||
| 116 | (x_own_selection, x_get_local_selection): | ||
| 117 | Use mac_valid_selection_value_p. | ||
| 118 | (x_own_selection): Don't use put_scrap_private_timestamp. | ||
| 119 | Record OWNERSHIP-INFO into Vselection_alist instead. | ||
| 120 | (x_get_local_selection): Don't check type if request is local. | ||
| 121 | (Fx_selection_owner_p): Don't use get_scrap_private_timestamp. | ||
| 122 | Detect ownership change with OWNERSHIP-INFO in Vselection_alist instead. | ||
| 123 | |||
| 124 | 2007-08-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 125 | |||
| 126 | * gtkutil.c (xg_tool_bar_callback): Generate two TOOL_BAR_EVENT:s, | ||
| 127 | add comment explaining why. | ||
| 128 | |||
| 1 | 2007-08-03 Richard Stallman <rms@gnu.org> | 129 | 2007-08-03 Richard Stallman <rms@gnu.org> |
| 2 | 130 | ||
| 3 | * fileio.c (Fvisited_file_modtime): Use make_time. | 131 | * fileio.c (Fvisited_file_modtime): Use make_time. |
diff --git a/src/buffer.h b/src/buffer.h index 65cfef4f04f..ed99dc4ffb1 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -561,7 +561,7 @@ struct buffer | |||
| 561 | Lisp_Object filename; | 561 | Lisp_Object filename; |
| 562 | /* Dir for expanding relative file names. */ | 562 | /* Dir for expanding relative file names. */ |
| 563 | Lisp_Object directory; | 563 | Lisp_Object directory; |
| 564 | /* True iff this buffer has been backed up (if you write to the | 564 | /* True if this buffer has been backed up (if you write to the |
| 565 | visited file and it hasn't been backed up, then a backup will | 565 | visited file and it hasn't been backed up, then a backup will |
| 566 | be made). */ | 566 | be made). */ |
| 567 | /* This isn't really used by the C code, so could be deleted. */ | 567 | /* This isn't really used by the C code, so could be deleted. */ |
diff --git a/src/callproc.c b/src/callproc.c index 65a75d685a5..5bd4cee9cfa 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -119,7 +119,7 @@ Lisp_Object Vprocess_environment; | |||
| 119 | Lisp_Object Qbuffer_file_type; | 119 | Lisp_Object Qbuffer_file_type; |
| 120 | #endif /* DOS_NT */ | 120 | #endif /* DOS_NT */ |
| 121 | 121 | ||
| 122 | /* True iff we are about to fork off a synchronous process or if we | 122 | /* True if we are about to fork off a synchronous process or if we |
| 123 | are waiting for it. */ | 123 | are waiting for it. */ |
| 124 | int synch_process_alive; | 124 | int synch_process_alive; |
| 125 | 125 | ||
diff --git a/src/casetab.c b/src/casetab.c index bf0e022f139..952a320dda3 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -40,7 +40,7 @@ static void set_identity (); | |||
| 40 | static void shuffle (); | 40 | static void shuffle (); |
| 41 | 41 | ||
| 42 | DEFUN ("case-table-p", Fcase_table_p, Scase_table_p, 1, 1, 0, | 42 | DEFUN ("case-table-p", Fcase_table_p, Scase_table_p, 1, 1, 0, |
| 43 | doc: /* Return t iff OBJECT is a case table. | 43 | doc: /* Return t if OBJECT is a case table. |
| 44 | See `set-case-table' for more information on these data structures. */) | 44 | See `set-case-table' for more information on these data structures. */) |
| 45 | (object) | 45 | (object) |
| 46 | Lisp_Object object; | 46 | Lisp_Object object; |
diff --git a/src/category.c b/src/category.c index 55e752045e7..7ea9b7810fa 100644 --- a/src/category.c +++ b/src/category.c | |||
| @@ -559,7 +559,7 @@ syms_of_category () | |||
| 559 | doc: /* List of pair (cons) of categories to determine word boundary. | 559 | doc: /* List of pair (cons) of categories to determine word boundary. |
| 560 | 560 | ||
| 561 | Emacs treats a sequence of word constituent characters as a single | 561 | Emacs treats a sequence of word constituent characters as a single |
| 562 | word (i.e. finds no word boundary between them) iff they belongs to | 562 | word (i.e. finds no word boundary between them) only if they belong to |
| 563 | the same charset. But, exceptions are allowed in the following cases. | 563 | the same charset. But, exceptions are allowed in the following cases. |
| 564 | 564 | ||
| 565 | \(1) The case that characters are in different charsets is controlled | 565 | \(1) The case that characters are in different charsets is controlled |
| @@ -659,13 +659,13 @@ while (0) | |||
| 659 | 659 | ||
| 660 | #define CCL_LookupIntConstTbl 0x13 /* Lookup multibyte character by | 660 | #define CCL_LookupIntConstTbl 0x13 /* Lookup multibyte character by |
| 661 | integer key. Afterwards R7 set | 661 | integer key. Afterwards R7 set |
| 662 | to 1 iff lookup succeeded. | 662 | to 1 if lookup succeeded. |
| 663 | 1:ExtendedCOMMNDRrrRRRXXXXXXXX | 663 | 1:ExtendedCOMMNDRrrRRRXXXXXXXX |
| 664 | 2:ARGUMENT(Hash table ID) */ | 664 | 2:ARGUMENT(Hash table ID) */ |
| 665 | 665 | ||
| 666 | #define CCL_LookupCharConstTbl 0x14 /* Lookup integer by multibyte | 666 | #define CCL_LookupCharConstTbl 0x14 /* Lookup integer by multibyte |
| 667 | character key. Afterwards R7 set | 667 | character key. Afterwards R7 set |
| 668 | to 1 iff lookup succeeded. | 668 | to 1 if lookup succeeded. |
| 669 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX | 669 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX |
| 670 | 2:ARGUMENT(Hash table ID) */ | 670 | 2:ARGUMENT(Hash table ID) */ |
| 671 | 671 | ||
diff --git a/src/charset.c b/src/charset.c index a6ec309cbb3..1a85cd39c72 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -337,7 +337,7 @@ split_string (str, len, charset, c1, c2) | |||
| 337 | return 0; | 337 | return 0; |
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | /* Return 1 iff character C has valid printable glyph. | 340 | /* Return 1 if character C has valid printable glyph. |
| 341 | Use the macro CHAR_PRINTABLE_P instead. */ | 341 | Use the macro CHAR_PRINTABLE_P instead. */ |
| 342 | int | 342 | int |
| 343 | char_printable_p (c) | 343 | char_printable_p (c) |
| @@ -1102,8 +1102,8 @@ DIMENSION, CHARS, and FINAL-CHAR. */) | |||
| 1102 | return CHARSET_SYMBOL (charset); | 1102 | return CHARSET_SYMBOL (charset); |
| 1103 | } | 1103 | } |
| 1104 | 1104 | ||
| 1105 | /* If GENERICP is nonzero, return nonzero iff C is a valid normal or | 1105 | /* If GENERICP is nonzero, return nonzero if C is a valid normal or |
| 1106 | generic character. If GENERICP is zero, return nonzero iff C is a | 1106 | generic character. If GENERICP is zero, return nonzero if C is a |
| 1107 | valid normal character. Do not call this function directly, | 1107 | valid normal character. Do not call this function directly, |
| 1108 | instead use macro CHAR_VALID_P. */ | 1108 | instead use macro CHAR_VALID_P. */ |
| 1109 | int | 1109 | int |
diff --git a/src/charset.h b/src/charset.h index 984d466d97d..c20766f910b 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -413,8 +413,8 @@ extern int width_by_char_head[256]; | |||
| 413 | | ((c1) <= 0 ? 0 : (((c1) & 0x7F) << 7)))))) | 413 | | ((c1) <= 0 ? 0 : (((c1) & 0x7F) << 7)))))) |
| 414 | 414 | ||
| 415 | 415 | ||
| 416 | /* If GENERICP is nonzero, return nonzero iff C is a valid normal or | 416 | /* If GENERICP is nonzero, return nonzero if C is a valid normal or |
| 417 | generic character. If GENERICP is zero, return nonzero iff C is a | 417 | generic character. If GENERICP is zero, return nonzero if C is a |
| 418 | valid normal character. */ | 418 | valid normal character. */ |
| 419 | #define CHAR_VALID_P(c, genericp) \ | 419 | #define CHAR_VALID_P(c, genericp) \ |
| 420 | ((c) >= 0 \ | 420 | ((c) >= 0 \ |
| @@ -450,7 +450,7 @@ extern int width_by_char_head[256]; | |||
| 450 | #define VALID_LEADING_CODE_P(code) \ | 450 | #define VALID_LEADING_CODE_P(code) \ |
| 451 | (! NILP (CHARSET_TABLE_ENTRY (code))) | 451 | (! NILP (CHARSET_TABLE_ENTRY (code))) |
| 452 | 452 | ||
| 453 | /* Return 1 iff the byte sequence at unibyte string STR (LENGTH bytes) | 453 | /* Return 1 if the byte sequence at unibyte string STR (LENGTH bytes) |
| 454 | is valid as a multibyte form. If valid, by a side effect, BYTES is | 454 | is valid as a multibyte form. If valid, by a side effect, BYTES is |
| 455 | set to the byte length of the multibyte form. */ | 455 | set to the byte length of the multibyte form. */ |
| 456 | 456 | ||
| @@ -471,7 +471,7 @@ extern int width_by_char_head[256]; | |||
| 471 | && VALID_LEADING_CODE_P (str[1])))))))) | 471 | && VALID_LEADING_CODE_P (str[1])))))))) |
| 472 | 472 | ||
| 473 | 473 | ||
| 474 | /* Return 1 iff the byte sequence at multibyte string STR is valid as | 474 | /* Return 1 if the byte sequence at multibyte string STR is valid as |
| 475 | a unibyte form. By a side effect, BYTES is set to the byte length | 475 | a unibyte form. By a side effect, BYTES is set to the byte length |
| 476 | of one character at STR. */ | 476 | of one character at STR. */ |
| 477 | 477 | ||
| @@ -499,7 +499,7 @@ extern int width_by_char_head[256]; | |||
| 499 | c1 = CHAR_FIELD3 (c), \ | 499 | c1 = CHAR_FIELD3 (c), \ |
| 500 | c2 = -1))) | 500 | c2 = -1))) |
| 501 | 501 | ||
| 502 | /* Return 1 iff character C has valid printable glyph. */ | 502 | /* Return 1 if character C has valid printable glyph. */ |
| 503 | #define CHAR_PRINTABLE_P(c) (ASCII_BYTE_P (c) || char_printable_p (c)) | 503 | #define CHAR_PRINTABLE_P(c) (ASCII_BYTE_P (c) || char_printable_p (c)) |
| 504 | 504 | ||
| 505 | /* The charset of the character at STR is stored in CHARSET, and the | 505 | /* The charset of the character at STR is stored in CHARSET, and the |
diff --git a/src/coding.h b/src/coding.h index 39feeea96af..a53a74ec161 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -263,7 +263,7 @@ enum coding_type | |||
| 263 | eol-type is not consistent | 263 | eol-type is not consistent |
| 264 | through the file. */ | 264 | through the file. */ |
| 265 | 265 | ||
| 266 | /* 1 iff composing. */ | 266 | /* 1 if composing. */ |
| 267 | #define COMPOSING_P(coding) ((int) coding->composing > (int) COMPOSITION_NO) | 267 | #define COMPOSING_P(coding) ((int) coding->composing > (int) COMPOSITION_NO) |
| 268 | 268 | ||
| 269 | #define COMPOSITION_DATA_SIZE 4080 | 269 | #define COMPOSITION_DATA_SIZE 4080 |
| @@ -372,7 +372,7 @@ struct coding_system | |||
| 372 | /* The current status of composition handling. */ | 372 | /* The current status of composition handling. */ |
| 373 | int composing; | 373 | int composing; |
| 374 | 374 | ||
| 375 | /* 1 iff the next character is a composition rule. */ | 375 | /* 1 if the next character is a composition rule. */ |
| 376 | int composition_rule_follows; | 376 | int composition_rule_follows; |
| 377 | 377 | ||
| 378 | /* Information of compositions are stored here on decoding and set | 378 | /* Information of compositions are stored here on decoding and set |
diff --git a/src/composite.h b/src/composite.h index 5dc8dde62e2..ba8f8c84104 100644 --- a/src/composite.h +++ b/src/composite.h | |||
| @@ -56,7 +56,7 @@ enum composition_method { | |||
| 56 | /* Temporary variable used only in the following macros. */ | 56 | /* Temporary variable used only in the following macros. */ |
| 57 | extern Lisp_Object composition_temp; | 57 | extern Lisp_Object composition_temp; |
| 58 | 58 | ||
| 59 | /* Return 1 iff the composition is already registered. */ | 59 | /* Return 1 if the composition is already registered. */ |
| 60 | #define COMPOSITION_REGISTERD_P(prop) INTEGERP (XCAR (prop)) | 60 | #define COMPOSITION_REGISTERD_P(prop) INTEGERP (XCAR (prop)) |
| 61 | 61 | ||
| 62 | /* Return ID number of the already registered composition. */ | 62 | /* Return ID number of the already registered composition. */ |
| @@ -91,7 +91,7 @@ extern Lisp_Object composition_temp; | |||
| 91 | ? COMPOSITION_WITH_ALTCHARS \ | 91 | ? COMPOSITION_WITH_ALTCHARS \ |
| 92 | : COMPOSITION_WITH_RULE_ALTCHARS)))) | 92 | : COMPOSITION_WITH_RULE_ALTCHARS)))) |
| 93 | 93 | ||
| 94 | /* Return 1 iff the composition is valid. It is valid if length of | 94 | /* Return 1 if the composition is valid. It is valid if length of |
| 95 | the composition equals to (END - START). */ | 95 | the composition equals to (END - START). */ |
| 96 | #define COMPOSITION_VALID_P(start, end, prop) \ | 96 | #define COMPOSITION_VALID_P(start, end, prop) \ |
| 97 | (CONSP (prop) \ | 97 | (CONSP (prop) \ |
diff --git a/src/dired.c b/src/dired.c index 22283b66ea0..1fb5387268a 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -916,7 +916,7 @@ Elements of the attribute list are: | |||
| 916 | 7. Size in bytes. | 916 | 7. Size in bytes. |
| 917 | This is a floating point number if the size is too large for an integer. | 917 | This is a floating point number if the size is too large for an integer. |
| 918 | 8. File modes, as a string of ten letters or dashes as in ls -l. | 918 | 8. File modes, as a string of ten letters or dashes as in ls -l. |
| 919 | 9. t iff file's gid would change if file were deleted and recreated. | 919 | 9. t if file's gid would change if file were deleted and recreated. |
| 920 | 10. inode number. If inode number is larger than the Emacs integer, | 920 | 10. inode number. If inode number is larger than the Emacs integer, |
| 921 | this is a cons cell containing two integers: first the high part, | 921 | this is a cons cell containing two integers: first the high part, |
| 922 | then the low 16 bits. | 922 | then the low 16 bits. |
diff --git a/src/editfns.c b/src/editfns.c index 7bb74958c2c..dac7eb83af2 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3514,7 +3514,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3514 | precision ::= '.' [0-9]* | 3514 | precision ::= '.' [0-9]* |
| 3515 | 3515 | ||
| 3516 | If a field-width is specified, it specifies to which width | 3516 | If a field-width is specified, it specifies to which width |
| 3517 | the output should be padded with blanks, iff the output | 3517 | the output should be padded with blanks, if the output |
| 3518 | string is shorter than field-width. | 3518 | string is shorter than field-width. |
| 3519 | 3519 | ||
| 3520 | If precision is specified, it specifies the number of | 3520 | If precision is specified, it specifies the number of |
diff --git a/src/emacs.c b/src/emacs.c index 373eab33e11..e23f8083a31 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1165,6 +1165,13 @@ main (argc, argv | |||
| 1165 | setpgrp (); | 1165 | setpgrp (); |
| 1166 | #endif | 1166 | #endif |
| 1167 | #endif | 1167 | #endif |
| 1168 | #if defined (HAVE_GTK_AND_PTHREAD) && !defined (SYSTEM_MALLOC) && !defined (DOUG_LEA_MALLOC) | ||
| 1169 | { | ||
| 1170 | extern void malloc_enable_thread P_ ((void)); | ||
| 1171 | |||
| 1172 | malloc_enable_thread (); | ||
| 1173 | } | ||
| 1174 | #endif | ||
| 1168 | } | 1175 | } |
| 1169 | 1176 | ||
| 1170 | init_signals (); | 1177 | init_signals (); |
diff --git a/src/eval.c b/src/eval.c index 9a03e5fac83..13ea0ba7ebf 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1793,7 +1793,7 @@ signal_error (s, arg) | |||
| 1793 | } | 1793 | } |
| 1794 | 1794 | ||
| 1795 | 1795 | ||
| 1796 | /* Return nonzero iff LIST is a non-nil atom or | 1796 | /* Return nonzero if LIST is a non-nil atom or |
| 1797 | a list containing one of CONDITIONS. */ | 1797 | a list containing one of CONDITIONS. */ |
| 1798 | 1798 | ||
| 1799 | static int | 1799 | static int |
diff --git a/src/fileio.c b/src/fileio.c index 6e47670f09c..37a694da01d 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3692,27 +3692,25 @@ DEFUN ("insert-file-contents", Finsert_file_contents, Sinsert_file_contents, | |||
| 3692 | 1, 5, 0, | 3692 | 1, 5, 0, |
| 3693 | doc: /* Insert contents of file FILENAME after point. | 3693 | doc: /* Insert contents of file FILENAME after point. |
| 3694 | Returns list of absolute file name and number of characters inserted. | 3694 | Returns list of absolute file name and number of characters inserted. |
| 3695 | If second argument VISIT is non-nil, the buffer's visited filename | 3695 | If second argument VISIT is non-nil, the buffer's visited filename and |
| 3696 | and last save file modtime are set, and it is marked unmodified. | 3696 | last save file modtime are set, and it is marked unmodified. If |
| 3697 | If visiting and the file does not exist, visiting is completed | 3697 | visiting and the file does not exist, visiting is completed before the |
| 3698 | before the error is signaled. | 3698 | error is signaled. |
| 3699 | The optional third and fourth arguments BEG and END | 3699 | |
| 3700 | specify what portion of the file to insert. | 3700 | The optional third and fourth arguments BEG and END specify what portion |
| 3701 | These arguments count bytes in the file, not characters in the buffer. | 3701 | of the file to insert. These arguments count bytes in the file, not |
| 3702 | If VISIT is non-nil, BEG and END must be nil. | 3702 | characters in the buffer. If VISIT is non-nil, BEG and END must be nil. |
| 3703 | 3703 | ||
| 3704 | If optional fifth argument REPLACE is non-nil, | 3704 | If optional fifth argument REPLACE is non-nil, replace the current |
| 3705 | it means replace the current buffer contents (in the accessible portion) | 3705 | buffer contents (in the accessible portion) with the file contents. |
| 3706 | with the file contents. This is better than simply deleting and inserting | 3706 | This is better than simply deleting and inserting the whole thing |
| 3707 | the whole thing because (1) it preserves some marker positions | 3707 | because (1) it preserves some marker positions and (2) it puts less data |
| 3708 | and (2) it puts less data in the undo list. | 3708 | in the undo list. When REPLACE is non-nil, the second return value is |
| 3709 | When REPLACE is non-nil, the value is the number of characters actually read, | 3709 | the number of characters that replace previous buffer contents. |
| 3710 | which is often less than the number of characters to be read. | 3710 | |
| 3711 | 3711 | This function does code conversion according to the value of | |
| 3712 | This does code conversion according to the value of | 3712 | `coding-system-for-read' or `file-coding-system-alist', and sets the |
| 3713 | `coding-system-for-read' or `file-coding-system-alist', | 3713 | variable `last-coding-system-used' to the coding system actually used. */) |
| 3714 | and sets the variable `last-coding-system-used' to the coding system | ||
| 3715 | actually used. */) | ||
| 3716 | (filename, visit, beg, end, replace) | 3714 | (filename, visit, beg, end, replace) |
| 3717 | Lisp_Object filename, visit, beg, end, replace; | 3715 | Lisp_Object filename, visit, beg, end, replace; |
| 3718 | { | 3716 | { |
| @@ -3722,8 +3720,8 @@ actually used. */) | |||
| 3722 | register int how_much; | 3720 | register int how_much; |
| 3723 | register int unprocessed; | 3721 | register int unprocessed; |
| 3724 | int count = SPECPDL_INDEX (); | 3722 | int count = SPECPDL_INDEX (); |
| 3725 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 3723 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 3726 | Lisp_Object handler, val, insval, orig_filename; | 3724 | Lisp_Object handler, val, insval, orig_filename, old_undo; |
| 3727 | Lisp_Object p; | 3725 | Lisp_Object p; |
| 3728 | int total = 0; | 3726 | int total = 0; |
| 3729 | int not_regular = 0; | 3727 | int not_regular = 0; |
| @@ -3746,8 +3744,9 @@ actually used. */) | |||
| 3746 | val = Qnil; | 3744 | val = Qnil; |
| 3747 | p = Qnil; | 3745 | p = Qnil; |
| 3748 | orig_filename = Qnil; | 3746 | orig_filename = Qnil; |
| 3747 | old_undo = Qnil; | ||
| 3749 | 3748 | ||
| 3750 | GCPRO4 (filename, val, p, orig_filename); | 3749 | GCPRO5 (filename, val, p, orig_filename, old_undo); |
| 3751 | 3750 | ||
| 3752 | CHECK_STRING (filename); | 3751 | CHECK_STRING (filename); |
| 3753 | filename = Fexpand_file_name (filename, Qnil); | 3752 | filename = Fexpand_file_name (filename, Qnil); |
| @@ -4706,24 +4705,103 @@ actually used. */) | |||
| 4706 | /* Decode file format */ | 4705 | /* Decode file format */ |
| 4707 | if (inserted > 0) | 4706 | if (inserted > 0) |
| 4708 | { | 4707 | { |
| 4709 | int empty_undo_list_p = 0; | 4708 | /* Don't run point motion or modification hooks when decoding. */ |
| 4709 | int count = SPECPDL_INDEX (); | ||
| 4710 | specbind (Qinhibit_point_motion_hooks, Qt); | ||
| 4711 | specbind (Qinhibit_modification_hooks, Qt); | ||
| 4712 | |||
| 4713 | /* Save old undo list and don't record undo for decoding. */ | ||
| 4714 | old_undo = current_buffer->undo_list; | ||
| 4715 | current_buffer->undo_list = Qt; | ||
| 4710 | 4716 | ||
| 4711 | /* If we're anyway going to discard undo information, don't | 4717 | if (NILP (replace)) |
| 4712 | record it in the first place. The buffer's undo list at this | ||
| 4713 | point is either nil or t when visiting a file. */ | ||
| 4714 | if (!NILP (visit)) | ||
| 4715 | { | 4718 | { |
| 4716 | empty_undo_list_p = NILP (current_buffer->undo_list); | 4719 | insval = call3 (Qformat_decode, |
| 4717 | current_buffer->undo_list = Qt; | 4720 | Qnil, make_number (inserted), visit); |
| 4721 | CHECK_NUMBER (insval); | ||
| 4722 | inserted = XFASTINT (insval); | ||
| 4723 | } | ||
| 4724 | else | ||
| 4725 | { | ||
| 4726 | /* If REPLACE is non-nil and we succeeded in not replacing the | ||
| 4727 | beginning or end of the buffer text with the file's contents, | ||
| 4728 | call format-decode with `point' positioned at the beginning of | ||
| 4729 | the buffer and `inserted' equalling the number of characters | ||
| 4730 | in the buffer. Otherwise, format-decode might fail to | ||
| 4731 | correctly analyze the beginning or end of the buffer. Hence | ||
| 4732 | we temporarily save `point' and `inserted' here and restore | ||
| 4733 | `point' iff format-decode did not insert or delete any text. | ||
| 4734 | Otherwise we leave `point' at point-min. */ | ||
| 4735 | int opoint = PT; | ||
| 4736 | int opoint_byte = PT_BYTE; | ||
| 4737 | int oinserted = ZV - BEGV; | ||
| 4738 | |||
| 4739 | TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); | ||
| 4740 | insval = call3 (Qformat_decode, | ||
| 4741 | Qnil, make_number (oinserted), visit); | ||
| 4742 | CHECK_NUMBER (insval); | ||
| 4743 | if (XINT (insval) == oinserted) | ||
| 4744 | SET_PT_BOTH (opoint, opoint_byte); | ||
| 4745 | inserted = XFASTINT (insval); | ||
| 4718 | } | 4746 | } |
| 4719 | 4747 | ||
| 4720 | insval = call3 (Qformat_decode, | 4748 | /* For consistency with format-decode call these now iff inserted > 0 |
| 4721 | Qnil, make_number (inserted), visit); | 4749 | (martin 2007-06-28) */ |
| 4722 | CHECK_NUMBER (insval); | 4750 | p = Vafter_insert_file_functions; |
| 4723 | inserted = XFASTINT (insval); | 4751 | while (CONSP (p)) |
| 4752 | { | ||
| 4753 | if (NILP (replace)) | ||
| 4754 | { | ||
| 4755 | insval = call1 (XCAR (p), make_number (inserted)); | ||
| 4756 | if (!NILP (insval)) | ||
| 4757 | { | ||
| 4758 | CHECK_NUMBER (insval); | ||
| 4759 | inserted = XFASTINT (insval); | ||
| 4760 | } | ||
| 4761 | } | ||
| 4762 | else | ||
| 4763 | { | ||
| 4764 | /* For the rationale of this see the comment on format-decode above. */ | ||
| 4765 | int opoint = PT; | ||
| 4766 | int opoint_byte = PT_BYTE; | ||
| 4767 | int oinserted = ZV - BEGV; | ||
| 4768 | |||
| 4769 | TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); | ||
| 4770 | insval = call1 (XCAR (p), make_number (oinserted)); | ||
| 4771 | if (!NILP (insval)) | ||
| 4772 | { | ||
| 4773 | CHECK_NUMBER (insval); | ||
| 4774 | if (XINT (insval) == oinserted) | ||
| 4775 | SET_PT_BOTH (opoint, opoint_byte); | ||
| 4776 | inserted = XFASTINT (insval); | ||
| 4777 | } | ||
| 4778 | } | ||
| 4779 | |||
| 4780 | QUIT; | ||
| 4781 | p = XCDR (p); | ||
| 4782 | } | ||
| 4783 | |||
| 4784 | if (NILP (visit)) | ||
| 4785 | { | ||
| 4786 | Lisp_Object lbeg, lend; | ||
| 4787 | XSETINT (lbeg, PT); | ||
| 4788 | XSETINT (lend, PT + inserted); | ||
| 4789 | if (CONSP (old_undo)) | ||
| 4790 | { | ||
| 4791 | Lisp_Object tem = XCAR (old_undo); | ||
| 4792 | if (CONSP (tem) && INTEGERP (XCAR (tem)) && | ||
| 4793 | INTEGERP (XCDR (tem)) && EQ (XCAR (tem), lbeg)) | ||
| 4794 | /* In the non-visiting case record only the final insertion. */ | ||
| 4795 | current_buffer->undo_list = | ||
| 4796 | Fcons (Fcons (lbeg, lend), Fcdr (old_undo)); | ||
| 4797 | } | ||
| 4798 | } | ||
| 4799 | else | ||
| 4800 | /* If undo_list was Qt before, keep it that way. | ||
| 4801 | Otherwise start with an empty undo_list. */ | ||
| 4802 | current_buffer->undo_list = EQ (old_undo, Qt) ? Qt : Qnil; | ||
| 4724 | 4803 | ||
| 4725 | if (!NILP (visit)) | 4804 | unbind_to (count, Qnil); |
| 4726 | current_buffer->undo_list = empty_undo_list_p ? Qnil : Qt; | ||
| 4727 | } | 4805 | } |
| 4728 | 4806 | ||
| 4729 | /* Call after-change hooks for the inserted text, aside from the case | 4807 | /* Call after-change hooks for the inserted text, aside from the case |
| @@ -4736,19 +4814,6 @@ actually used. */) | |||
| 4736 | update_compositions (PT, PT, CHECK_BORDER); | 4814 | update_compositions (PT, PT, CHECK_BORDER); |
| 4737 | } | 4815 | } |
| 4738 | 4816 | ||
| 4739 | p = Vafter_insert_file_functions; | ||
| 4740 | while (CONSP (p)) | ||
| 4741 | { | ||
| 4742 | insval = call1 (XCAR (p), make_number (inserted)); | ||
| 4743 | if (!NILP (insval)) | ||
| 4744 | { | ||
| 4745 | CHECK_NUMBER (insval); | ||
| 4746 | inserted = XFASTINT (insval); | ||
| 4747 | } | ||
| 4748 | QUIT; | ||
| 4749 | p = XCDR (p); | ||
| 4750 | } | ||
| 4751 | |||
| 4752 | if (!NILP (visit) | 4817 | if (!NILP (visit) |
| 4753 | && current_buffer->modtime == -1) | 4818 | && current_buffer->modtime == -1) |
| 4754 | { | 4819 | { |
| @@ -5193,7 +5258,7 @@ This does code conversion according to the value of | |||
| 5193 | * if we do writes that don't end with a carriage return. Furthermore | 5258 | * if we do writes that don't end with a carriage return. Furthermore |
| 5194 | * it cannot handle writes of more then 16K. The modified | 5259 | * it cannot handle writes of more then 16K. The modified |
| 5195 | * version of "sys_write" in SYSDEP.C (see comment there) copes with | 5260 | * version of "sys_write" in SYSDEP.C (see comment there) copes with |
| 5196 | * this EXCEPT for the last record (iff it doesn't end with a carriage | 5261 | * this EXCEPT for the last record (if it doesn't end with a carriage |
| 5197 | * return). This implies that if your buffer doesn't end with a carriage | 5262 | * return). This implies that if your buffer doesn't end with a carriage |
| 5198 | * return, you get one free... tough. However it also means that if | 5263 | * return, you get one free... tough. However it also means that if |
| 5199 | * we make two calls to sys_write (a la the following code) you can | 5264 | * we make two calls to sys_write (a la the following code) you can |
diff --git a/src/fontset.c b/src/fontset.c index d76ed658de6..1d6e73517b6 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -501,7 +501,7 @@ free_face_fontset (f, face) | |||
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | 503 | ||
| 504 | /* Return 1 iff FACE is suitable for displaying character C. | 504 | /* Return 1 if FACE is suitable for displaying character C. |
| 505 | Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P | 505 | Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P |
| 506 | when C is not a single byte character.. */ | 506 | when C is not a single byte character.. */ |
| 507 | 507 | ||
diff --git a/src/fontset.h b/src/fontset.h index 5b5c5cbcfaa..c8bd1e36eab 100644 --- a/src/fontset.h +++ b/src/fontset.h | |||
| @@ -66,7 +66,7 @@ struct font_info | |||
| 66 | /* Average width of glyphs in the font. */ | 66 | /* Average width of glyphs in the font. */ |
| 67 | int average_width; | 67 | int average_width; |
| 68 | 68 | ||
| 69 | /* 1 iff `vertical-centering-font-regexp' matches this font name. | 69 | /* 1 if `vertical-centering-font-regexp' matches this font name. |
| 70 | In this case, we render characters at vartical center positions | 70 | In this case, we render characters at vartical center positions |
| 71 | of lines. */ | 71 | of lines. */ |
| 72 | int vertical_centering; | 72 | int vertical_centering; |
diff --git a/src/getloadavg.c b/src/getloadavg.c index f40149a8c47..6d66cbfd8a1 100644 --- a/src/getloadavg.c +++ b/src/getloadavg.c | |||
| @@ -484,7 +484,7 @@ static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */ | |||
| 484 | #if !defined(HAVE_LIBKSTAT) && defined(LOAD_AVE_TYPE) | 484 | #if !defined(HAVE_LIBKSTAT) && defined(LOAD_AVE_TYPE) |
| 485 | /* File descriptor open to /dev/kmem or VMS load ave driver. */ | 485 | /* File descriptor open to /dev/kmem or VMS load ave driver. */ |
| 486 | static int channel; | 486 | static int channel; |
| 487 | /* Nonzero iff channel is valid. */ | 487 | /* Nonzero if channel is valid. */ |
| 488 | static int getloadavg_initialized; | 488 | static int getloadavg_initialized; |
| 489 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ | 489 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ |
| 490 | static long offset; | 490 | static long offset; |
diff --git a/src/gmalloc.c b/src/gmalloc.c index cf79b9159f2..ccc08e1ff68 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c | |||
| @@ -129,6 +129,8 @@ extern FREE_RETURN_TYPE free PP ((__ptr_t __ptr)); | |||
| 129 | #if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict. */ | 129 | #if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict. */ |
| 130 | extern __ptr_t memalign PP ((__malloc_size_t __alignment, | 130 | extern __ptr_t memalign PP ((__malloc_size_t __alignment, |
| 131 | __malloc_size_t __size)); | 131 | __malloc_size_t __size)); |
| 132 | extern int posix_memalign PP ((__ptr_t *, __malloc_size_t, | ||
| 133 | __malloc_size_t size)); | ||
| 132 | #endif | 134 | #endif |
| 133 | 135 | ||
| 134 | /* Allocate SIZE bytes on a page boundary. */ | 136 | /* Allocate SIZE bytes on a page boundary. */ |
| @@ -136,6 +138,10 @@ extern __ptr_t memalign PP ((__malloc_size_t __alignment, | |||
| 136 | extern __ptr_t valloc PP ((__malloc_size_t __size)); | 138 | extern __ptr_t valloc PP ((__malloc_size_t __size)); |
| 137 | #endif | 139 | #endif |
| 138 | 140 | ||
| 141 | #ifdef USE_PTHREAD | ||
| 142 | /* Set up mutexes and make malloc etc. thread-safe. */ | ||
| 143 | extern void malloc_enable_thread PP ((void)); | ||
| 144 | #endif | ||
| 139 | 145 | ||
| 140 | #ifdef _MALLOC_INTERNAL | 146 | #ifdef _MALLOC_INTERNAL |
| 141 | 147 | ||
| @@ -242,10 +248,27 @@ extern void _free_internal_nolock PP ((__ptr_t __ptr)); | |||
| 242 | 248 | ||
| 243 | #ifdef USE_PTHREAD | 249 | #ifdef USE_PTHREAD |
| 244 | extern pthread_mutex_t _malloc_mutex, _aligned_blocks_mutex; | 250 | extern pthread_mutex_t _malloc_mutex, _aligned_blocks_mutex; |
| 245 | #define LOCK() pthread_mutex_lock (&_malloc_mutex) | 251 | extern int _malloc_thread_enabled_p; |
| 246 | #define UNLOCK() pthread_mutex_unlock (&_malloc_mutex) | 252 | #define LOCK() \ |
| 247 | #define LOCK_ALIGNED_BLOCKS() pthread_mutex_lock (&_aligned_blocks_mutex) | 253 | do { \ |
| 248 | #define UNLOCK_ALIGNED_BLOCKS() pthread_mutex_unlock (&_aligned_blocks_mutex) | 254 | if (_malloc_thread_enabled_p) \ |
| 255 | pthread_mutex_lock (&_malloc_mutex); \ | ||
| 256 | } while (0) | ||
| 257 | #define UNLOCK() \ | ||
| 258 | do { \ | ||
| 259 | if (_malloc_thread_enabled_p) \ | ||
| 260 | pthread_mutex_unlock (&_malloc_mutex); \ | ||
| 261 | } while (0) | ||
| 262 | #define LOCK_ALIGNED_BLOCKS() \ | ||
| 263 | do { \ | ||
| 264 | if (_malloc_thread_enabled_p) \ | ||
| 265 | pthread_mutex_lock (&_aligned_blocks_mutex); \ | ||
| 266 | } while (0) | ||
| 267 | #define UNLOCK_ALIGNED_BLOCKS() \ | ||
| 268 | do { \ | ||
| 269 | if (_malloc_thread_enabled_p) \ | ||
| 270 | pthread_mutex_unlock (&_aligned_blocks_mutex); \ | ||
| 271 | } while (0) | ||
| 249 | #else | 272 | #else |
| 250 | #define LOCK() | 273 | #define LOCK() |
| 251 | #define UNLOCK() | 274 | #define UNLOCK() |
| @@ -563,6 +586,47 @@ register_heapinfo () | |||
| 563 | #ifdef USE_PTHREAD | 586 | #ifdef USE_PTHREAD |
| 564 | pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; | 587 | pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; |
| 565 | pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; | 588 | pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; |
| 589 | int _malloc_thread_enabled_p; | ||
| 590 | |||
| 591 | static void | ||
| 592 | malloc_atfork_handler_prepare () | ||
| 593 | { | ||
| 594 | LOCK (); | ||
| 595 | LOCK_ALIGNED_BLOCKS (); | ||
| 596 | } | ||
| 597 | |||
| 598 | static void | ||
| 599 | malloc_atfork_handler_parent () | ||
| 600 | { | ||
| 601 | UNLOCK_ALIGNED_BLOCKS (); | ||
| 602 | UNLOCK (); | ||
| 603 | } | ||
| 604 | |||
| 605 | static void | ||
| 606 | malloc_atfork_handler_child () | ||
| 607 | { | ||
| 608 | UNLOCK_ALIGNED_BLOCKS (); | ||
| 609 | UNLOCK (); | ||
| 610 | } | ||
| 611 | |||
| 612 | /* Set up mutexes and make malloc etc. thread-safe. */ | ||
| 613 | void | ||
| 614 | malloc_enable_thread () | ||
| 615 | { | ||
| 616 | if (_malloc_thread_enabled_p) | ||
| 617 | return; | ||
| 618 | |||
| 619 | /* Some pthread implementations call malloc for statically | ||
| 620 | initialized mutexes when they are used first. To avoid such a | ||
| 621 | situation, we initialize mutexes here while their use is | ||
| 622 | disabled in malloc etc. */ | ||
| 623 | pthread_mutex_init (&_malloc_mutex, NULL); | ||
| 624 | pthread_mutex_init (&_aligned_blocks_mutex, NULL); | ||
| 625 | pthread_atfork (malloc_atfork_handler_prepare, | ||
| 626 | malloc_atfork_handler_parent, | ||
| 627 | malloc_atfork_handler_child); | ||
| 628 | _malloc_thread_enabled_p = 1; | ||
| 629 | } | ||
| 566 | #endif | 630 | #endif |
| 567 | 631 | ||
| 568 | static void | 632 | static void |
| @@ -575,19 +639,6 @@ malloc_initialize_1 () | |||
| 575 | if (__malloc_initialize_hook) | 639 | if (__malloc_initialize_hook) |
| 576 | (*__malloc_initialize_hook) (); | 640 | (*__malloc_initialize_hook) (); |
| 577 | 641 | ||
| 578 | /* We don't use recursive mutex because pthread_mutexattr_init may | ||
| 579 | call malloc internally. */ | ||
| 580 | #if 0 /* defined (USE_PTHREAD) */ | ||
| 581 | { | ||
| 582 | pthread_mutexattr_t attr; | ||
| 583 | |||
| 584 | pthread_mutexattr_init (&attr); | ||
| 585 | pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); | ||
| 586 | pthread_mutex_init (&_malloc_mutex, &attr); | ||
| 587 | pthread_mutexattr_destroy (&attr); | ||
| 588 | } | ||
| 589 | #endif | ||
| 590 | |||
| 591 | heapsize = HEAP / BLOCKSIZE; | 642 | heapsize = HEAP / BLOCKSIZE; |
| 592 | _heapinfo = (malloc_info *) align (heapsize * sizeof (malloc_info)); | 643 | _heapinfo = (malloc_info *) align (heapsize * sizeof (malloc_info)); |
| 593 | if (_heapinfo == NULL) | 644 | if (_heapinfo == NULL) |
| @@ -1808,6 +1859,36 @@ memalign (alignment, size) | |||
| 1808 | return result; | 1859 | return result; |
| 1809 | } | 1860 | } |
| 1810 | 1861 | ||
| 1862 | #ifndef ENOMEM | ||
| 1863 | #define ENOMEM 12 | ||
| 1864 | #endif | ||
| 1865 | |||
| 1866 | #ifndef EINVAL | ||
| 1867 | #define EINVAL 22 | ||
| 1868 | #endif | ||
| 1869 | |||
| 1870 | int | ||
| 1871 | posix_memalign (memptr, alignment, size) | ||
| 1872 | __ptr_t *memptr; | ||
| 1873 | __malloc_size_t alignment; | ||
| 1874 | __malloc_size_t size; | ||
| 1875 | { | ||
| 1876 | __ptr_t mem; | ||
| 1877 | |||
| 1878 | if (alignment == 0 | ||
| 1879 | || alignment % sizeof (__ptr_t) != 0 | ||
| 1880 | || (alignment & (alignment - 1)) != 0) | ||
| 1881 | return EINVAL; | ||
| 1882 | |||
| 1883 | mem = memalign (alignment, size); | ||
| 1884 | if (mem == NULL) | ||
| 1885 | return ENOMEM; | ||
| 1886 | |||
| 1887 | *memptr = mem; | ||
| 1888 | |||
| 1889 | return 0; | ||
| 1890 | } | ||
| 1891 | |||
| 1811 | #endif /* Not DJGPP v1 */ | 1892 | #endif /* Not DJGPP v1 */ |
| 1812 | /* Allocate memory on a page boundary. | 1893 | /* Allocate memory on a page boundary. |
| 1813 | Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc. | 1894 | Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc. |
diff --git a/src/gtkutil.c b/src/gtkutil.c index a4c0522c49b..0f95acaa2c7 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -3372,8 +3372,16 @@ xg_tool_bar_callback (w, client_data) | |||
| 3372 | 3372 | ||
| 3373 | key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); | 3373 | key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); |
| 3374 | XSETFRAME (frame, f); | 3374 | XSETFRAME (frame, f); |
| 3375 | |||
| 3376 | /* We generate two events here. The first one is to set the prefix | ||
| 3377 | to `(tool_bar)', see keyboard.c. */ | ||
| 3375 | event.kind = TOOL_BAR_EVENT; | 3378 | event.kind = TOOL_BAR_EVENT; |
| 3376 | event.frame_or_window = frame; | 3379 | event.frame_or_window = frame; |
| 3380 | event.arg = frame; | ||
| 3381 | kbd_buffer_store_event (&event); | ||
| 3382 | |||
| 3383 | event.kind = TOOL_BAR_EVENT; | ||
| 3384 | event.frame_or_window = frame; | ||
| 3377 | event.arg = key; | 3385 | event.arg = key; |
| 3378 | /* Convert between the modifier bits GDK uses and the modifier bits | 3386 | /* Convert between the modifier bits GDK uses and the modifier bits |
| 3379 | Emacs uses. This assumes GDK an X masks are the same, which they are when | 3387 | Emacs uses. This assumes GDK an X masks are the same, which they are when |
| @@ -3794,7 +3802,7 @@ update_frame_tool_bar (f) | |||
| 3794 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); | 3802 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); |
| 3795 | ti = gtk_tool_item_new (); | 3803 | ti = gtk_tool_item_new (); |
| 3796 | gtk_container_add (GTK_CONTAINER (ti), weventbox); | 3804 | gtk_container_add (GTK_CONTAINER (ti), weventbox); |
| 3797 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); | 3805 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1); |
| 3798 | } | 3806 | } |
| 3799 | continue; | 3807 | continue; |
| 3800 | } | 3808 | } |
| @@ -3811,7 +3819,7 @@ update_frame_tool_bar (f) | |||
| 3811 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); | 3819 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); |
| 3812 | ti = gtk_tool_item_new (); | 3820 | ti = gtk_tool_item_new (); |
| 3813 | gtk_container_add (GTK_CONTAINER (ti), weventbox); | 3821 | gtk_container_add (GTK_CONTAINER (ti), weventbox); |
| 3814 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); | 3822 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1); |
| 3815 | 3823 | ||
| 3816 | 3824 | ||
| 3817 | /* The EMACS_INT cast avoids a warning. */ | 3825 | /* The EMACS_INT cast avoids a warning. */ |
diff --git a/src/image.c b/src/image.c index d38ca04e083..96335558afa 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1644,6 +1644,8 @@ search_image_cache (f, spec, hash) | |||
| 1644 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); | 1644 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); |
| 1645 | int i = hash % IMAGE_CACHE_BUCKETS_SIZE; | 1645 | int i = hash % IMAGE_CACHE_BUCKETS_SIZE; |
| 1646 | 1646 | ||
| 1647 | if (!c) return NULL; | ||
| 1648 | |||
| 1647 | /* If the image spec does not specify a background color, the cached | 1649 | /* If the image spec does not specify a background color, the cached |
| 1648 | image must have the same background color as the current frame. | 1650 | image must have the same background color as the current frame. |
| 1649 | The foreground color must also match, for the sake of monochrome | 1651 | The foreground color must also match, for the sake of monochrome |
| @@ -1655,13 +1657,10 @@ search_image_cache (f, spec, hash) | |||
| 1655 | for formats that don't use transparency (such as jpeg), or if the | 1657 | for formats that don't use transparency (such as jpeg), or if the |
| 1656 | image spec specifies :background. However, the extra memory | 1658 | image spec specifies :background. However, the extra memory |
| 1657 | usage is probably negligible in practice, so we don't bother. */ | 1659 | usage is probably negligible in practice, so we don't bother. */ |
| 1658 | if (!c) return NULL; | ||
| 1659 | 1660 | ||
| 1660 | for (img = c->buckets[i]; img; img = img->next) | 1661 | for (img = c->buckets[i]; img; img = img->next) |
| 1661 | if (img->hash == hash | 1662 | if (img->hash == hash |
| 1662 | && !NILP (Fequal (img->spec, spec)) | 1663 | && !NILP (Fequal (img->spec, spec)) |
| 1663 | /* If the image spec specifies a background, it doesn't matter | ||
| 1664 | what the frame background is. */ | ||
| 1665 | && img->frame_foreground == FRAME_FOREGROUND_PIXEL (f) | 1664 | && img->frame_foreground == FRAME_FOREGROUND_PIXEL (f) |
| 1666 | && img->frame_background == FRAME_BACKGROUND_PIXEL (f)) | 1665 | && img->frame_background == FRAME_BACKGROUND_PIXEL (f)) |
| 1667 | break; | 1666 | break; |
| @@ -6362,11 +6361,14 @@ png_load (f, img) | |||
| 6362 | PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); | 6361 | PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); |
| 6363 | } | 6362 | } |
| 6364 | } | 6363 | } |
| 6364 | /* The commented-out code checked if the png specifies a default | ||
| 6365 | background color, and uses that. Since we use the current | ||
| 6366 | frame background, it is OK for us to ignore this. | ||
| 6367 | |||
| 6365 | else if (fn_png_get_bKGD (png_ptr, info_ptr, &image_bg)) | 6368 | else if (fn_png_get_bKGD (png_ptr, info_ptr, &image_bg)) |
| 6366 | /* Image contains a background color with which to | ||
| 6367 | combine the image. */ | ||
| 6368 | fn_png_set_background (png_ptr, image_bg, | 6369 | fn_png_set_background (png_ptr, image_bg, |
| 6369 | PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); | 6370 | PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); |
| 6371 | */ | ||
| 6370 | else | 6372 | else |
| 6371 | { | 6373 | { |
| 6372 | /* Image does not contain a background color with which | 6374 | /* Image does not contain a background color with which |
diff --git a/src/indent.c b/src/indent.c index c4ed2b94854..88856814279 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -118,7 +118,7 @@ character_width (c, dp) | |||
| 118 | return 0; | 118 | return 0; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | /* Return true iff the display table DISPTAB specifies the same widths | 121 | /* Return true if the display table DISPTAB specifies the same widths |
| 122 | for characters as WIDTHTAB. We use this to decide when to | 122 | for characters as WIDTHTAB. We use this to decide when to |
| 123 | invalidate the buffer's width_run_cache. */ | 123 | invalidate the buffer's width_run_cache. */ |
| 124 | 124 | ||
diff --git a/src/indent.h b/src/indent.h index 2d3c158b069..2e873769603 100644 --- a/src/indent.h +++ b/src/indent.h | |||
| @@ -61,7 +61,7 @@ extern int last_known_column_point; | |||
| 61 | 61 | ||
| 62 | /* Functions for dealing with the column cache. */ | 62 | /* Functions for dealing with the column cache. */ |
| 63 | 63 | ||
| 64 | /* Return true iff the display table DISPTAB specifies the same widths | 64 | /* Return true if the display table DISPTAB specifies the same widths |
| 65 | for characters as WIDTHTAB. We use this to decide when to | 65 | for characters as WIDTHTAB. We use this to decide when to |
| 66 | invalidate the buffer's column_cache. */ | 66 | invalidate the buffer's column_cache. */ |
| 67 | int disptab_matches_widthtab P_ ((struct Lisp_Char_Table *disptab, | 67 | int disptab_matches_widthtab P_ ((struct Lisp_Char_Table *disptab, |
diff --git a/src/insdel.c b/src/insdel.c index 14e7478e69a..19823623091 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -2137,6 +2137,20 @@ prepare_to_modify_buffer (start, end, preserve_ptr) | |||
| 2137 | #define FETCH_END \ | 2137 | #define FETCH_END \ |
| 2138 | (! NILP (end_marker) ? Fmarker_position (end_marker) : end) | 2138 | (! NILP (end_marker) ? Fmarker_position (end_marker) : end) |
| 2139 | 2139 | ||
| 2140 | /* Set a variable to nil if an error occurred. | ||
| 2141 | VAL is a cons-cell whose car is the variable name, and whose cdr is | ||
| 2142 | either nil (to mean that there was indeed an error), or non-nil to mean | ||
| 2143 | that the was no error (which thus causes this function to do | ||
| 2144 | nothing). */ | ||
| 2145 | Lisp_Object | ||
| 2146 | reset_var_on_error (val) | ||
| 2147 | Lisp_Object val; | ||
| 2148 | { | ||
| 2149 | if (NILP (XCDR (val))) | ||
| 2150 | Fset (XCAR (val), Qnil); | ||
| 2151 | return Qnil; | ||
| 2152 | } | ||
| 2153 | |||
| 2140 | /* Signal a change to the buffer immediately before it happens. | 2154 | /* Signal a change to the buffer immediately before it happens. |
| 2141 | START_INT and END_INT are the bounds of the text to be changed. | 2155 | START_INT and END_INT are the bounds of the text to be changed. |
| 2142 | 2156 | ||
| @@ -2152,6 +2166,7 @@ signal_before_change (start_int, end_int, preserve_ptr) | |||
| 2152 | Lisp_Object start_marker, end_marker; | 2166 | Lisp_Object start_marker, end_marker; |
| 2153 | Lisp_Object preserve_marker; | 2167 | Lisp_Object preserve_marker; |
| 2154 | struct gcpro gcpro1, gcpro2, gcpro3; | 2168 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 2169 | int count = SPECPDL_INDEX (); | ||
| 2155 | 2170 | ||
| 2156 | if (inhibit_modification_hooks) | 2171 | if (inhibit_modification_hooks) |
| 2157 | return; | 2172 | return; |
| @@ -2163,6 +2178,8 @@ signal_before_change (start_int, end_int, preserve_ptr) | |||
| 2163 | end_marker = Qnil; | 2178 | end_marker = Qnil; |
| 2164 | GCPRO3 (preserve_marker, start_marker, end_marker); | 2179 | GCPRO3 (preserve_marker, start_marker, end_marker); |
| 2165 | 2180 | ||
| 2181 | specbind (Qinhibit_modification_hooks, Qt); | ||
| 2182 | |||
| 2166 | /* If buffer is unmodified, run a special hook for that case. */ | 2183 | /* If buffer is unmodified, run a special hook for that case. */ |
| 2167 | if (SAVE_MODIFF >= MODIFF | 2184 | if (SAVE_MODIFF >= MODIFF |
| 2168 | && !NILP (Vfirst_change_hook) | 2185 | && !NILP (Vfirst_change_hook) |
| @@ -2177,46 +2194,22 @@ signal_before_change (start_int, end_int, preserve_ptr) | |||
| 2177 | if (!NILP (Vbefore_change_functions)) | 2194 | if (!NILP (Vbefore_change_functions)) |
| 2178 | { | 2195 | { |
| 2179 | Lisp_Object args[3]; | 2196 | Lisp_Object args[3]; |
| 2180 | Lisp_Object before_change_functions; | 2197 | Lisp_Object rvoe_arg = Fcons (Qbefore_change_functions, Qnil); |
| 2181 | Lisp_Object after_change_functions; | ||
| 2182 | struct gcpro gcpro1, gcpro2; | ||
| 2183 | struct buffer *old = current_buffer; | ||
| 2184 | struct buffer *new; | ||
| 2185 | 2198 | ||
| 2186 | PRESERVE_VALUE; | 2199 | PRESERVE_VALUE; |
| 2187 | PRESERVE_START_END; | 2200 | PRESERVE_START_END; |
| 2188 | 2201 | ||
| 2189 | /* "Bind" before-change-functions and after-change-functions | 2202 | /* Mark before-change-functions to be reset to nil in case of error. */ |
| 2190 | to nil--but in a way that errors don't know about. | 2203 | record_unwind_protect (reset_var_on_error, rvoe_arg); |
| 2191 | That way, if there's an error in them, they will stay nil. */ | ||
| 2192 | before_change_functions = Vbefore_change_functions; | ||
| 2193 | after_change_functions = Vafter_change_functions; | ||
| 2194 | Vbefore_change_functions = Qnil; | ||
| 2195 | Vafter_change_functions = Qnil; | ||
| 2196 | GCPRO2 (before_change_functions, after_change_functions); | ||
| 2197 | 2204 | ||
| 2198 | /* Actually run the hook functions. */ | 2205 | /* Actually run the hook functions. */ |
| 2199 | args[0] = Qbefore_change_functions; | 2206 | args[0] = Qbefore_change_functions; |
| 2200 | args[1] = FETCH_START; | 2207 | args[1] = FETCH_START; |
| 2201 | args[2] = FETCH_END; | 2208 | args[2] = FETCH_END; |
| 2202 | run_hook_list_with_args (before_change_functions, 3, args); | 2209 | Frun_hook_with_args (3, args); |
| 2203 | 2210 | ||
| 2204 | /* "Unbind" the variables we "bound" to nil. Beware a | 2211 | /* There was no error: unarm the reset_on_error. */ |
| 2205 | buffer-local hook which changes the buffer when run (e.g. W3). */ | 2212 | XSETCDR (rvoe_arg, Qt); |
| 2206 | if (old != current_buffer) | ||
| 2207 | { | ||
| 2208 | new = current_buffer; | ||
| 2209 | set_buffer_internal (old); | ||
| 2210 | Vbefore_change_functions = before_change_functions; | ||
| 2211 | Vafter_change_functions = after_change_functions; | ||
| 2212 | set_buffer_internal (new); | ||
| 2213 | } | ||
| 2214 | else | ||
| 2215 | { | ||
| 2216 | Vbefore_change_functions = before_change_functions; | ||
| 2217 | Vafter_change_functions = after_change_functions; | ||
| 2218 | } | ||
| 2219 | UNGCPRO; | ||
| 2220 | } | 2213 | } |
| 2221 | 2214 | ||
| 2222 | if (current_buffer->overlays_before || current_buffer->overlays_after) | 2215 | if (current_buffer->overlays_before || current_buffer->overlays_after) |
| @@ -2232,6 +2225,8 @@ signal_before_change (start_int, end_int, preserve_ptr) | |||
| 2232 | free_marker (end_marker); | 2225 | free_marker (end_marker); |
| 2233 | RESTORE_VALUE; | 2226 | RESTORE_VALUE; |
| 2234 | UNGCPRO; | 2227 | UNGCPRO; |
| 2228 | |||
| 2229 | unbind_to (count, Qnil); | ||
| 2235 | } | 2230 | } |
| 2236 | 2231 | ||
| 2237 | /* Signal a change immediately after it happens. | 2232 | /* Signal a change immediately after it happens. |
| @@ -2245,6 +2240,7 @@ void | |||
| 2245 | signal_after_change (charpos, lendel, lenins) | 2240 | signal_after_change (charpos, lendel, lenins) |
| 2246 | int charpos, lendel, lenins; | 2241 | int charpos, lendel, lenins; |
| 2247 | { | 2242 | { |
| 2243 | int count = SPECPDL_INDEX (); | ||
| 2248 | if (inhibit_modification_hooks) | 2244 | if (inhibit_modification_hooks) |
| 2249 | return; | 2245 | return; |
| 2250 | 2246 | ||
| @@ -2275,48 +2271,25 @@ signal_after_change (charpos, lendel, lenins) | |||
| 2275 | if (!NILP (combine_after_change_list)) | 2271 | if (!NILP (combine_after_change_list)) |
| 2276 | Fcombine_after_change_execute (); | 2272 | Fcombine_after_change_execute (); |
| 2277 | 2273 | ||
| 2274 | specbind (Qinhibit_modification_hooks, Qt); | ||
| 2275 | |||
| 2278 | if (!NILP (Vafter_change_functions)) | 2276 | if (!NILP (Vafter_change_functions)) |
| 2279 | { | 2277 | { |
| 2280 | Lisp_Object args[4]; | 2278 | Lisp_Object args[4]; |
| 2281 | Lisp_Object before_change_functions; | 2279 | Lisp_Object rvoe_arg = Fcons (Qafter_change_functions, Qnil); |
| 2282 | Lisp_Object after_change_functions; | 2280 | |
| 2283 | struct buffer *old = current_buffer; | 2281 | /* Mark after-change-functions to be reset to nil in case of error. */ |
| 2284 | struct buffer *new; | 2282 | record_unwind_protect (reset_var_on_error, rvoe_arg); |
| 2285 | struct gcpro gcpro1, gcpro2; | ||
| 2286 | |||
| 2287 | /* "Bind" before-change-functions and after-change-functions | ||
| 2288 | to nil--but in a way that errors don't know about. | ||
| 2289 | That way, if there's an error in them, they will stay nil. */ | ||
| 2290 | before_change_functions = Vbefore_change_functions; | ||
| 2291 | after_change_functions = Vafter_change_functions; | ||
| 2292 | Vbefore_change_functions = Qnil; | ||
| 2293 | Vafter_change_functions = Qnil; | ||
| 2294 | GCPRO2 (before_change_functions, after_change_functions); | ||
| 2295 | 2283 | ||
| 2296 | /* Actually run the hook functions. */ | 2284 | /* Actually run the hook functions. */ |
| 2297 | args[0] = Qafter_change_functions; | 2285 | args[0] = Qafter_change_functions; |
| 2298 | XSETFASTINT (args[1], charpos); | 2286 | XSETFASTINT (args[1], charpos); |
| 2299 | XSETFASTINT (args[2], charpos + lenins); | 2287 | XSETFASTINT (args[2], charpos + lenins); |
| 2300 | XSETFASTINT (args[3], lendel); | 2288 | XSETFASTINT (args[3], lendel); |
| 2301 | run_hook_list_with_args (after_change_functions, | 2289 | Frun_hook_with_args (4, args); |
| 2302 | 4, args); | ||
| 2303 | 2290 | ||
| 2304 | /* "Unbind" the variables we "bound" to nil. Beware a | 2291 | /* There was no error: unarm the reset_on_error. */ |
| 2305 | buffer-local hook which changes the buffer when run (e.g. W3). */ | 2292 | XSETCDR (rvoe_arg, Qt); |
| 2306 | if (old != current_buffer) | ||
| 2307 | { | ||
| 2308 | new = current_buffer; | ||
| 2309 | set_buffer_internal (old); | ||
| 2310 | Vbefore_change_functions = before_change_functions; | ||
| 2311 | Vafter_change_functions = after_change_functions; | ||
| 2312 | set_buffer_internal (new); | ||
| 2313 | } | ||
| 2314 | else | ||
| 2315 | { | ||
| 2316 | Vbefore_change_functions = before_change_functions; | ||
| 2317 | Vafter_change_functions = after_change_functions; | ||
| 2318 | } | ||
| 2319 | UNGCPRO; | ||
| 2320 | } | 2293 | } |
| 2321 | 2294 | ||
| 2322 | if (current_buffer->overlays_before || current_buffer->overlays_after) | 2295 | if (current_buffer->overlays_before || current_buffer->overlays_after) |
| @@ -2332,6 +2305,8 @@ signal_after_change (charpos, lendel, lenins) | |||
| 2332 | if (lendel == 0) | 2305 | if (lendel == 0) |
| 2333 | report_interval_modification (make_number (charpos), | 2306 | report_interval_modification (make_number (charpos), |
| 2334 | make_number (charpos + lenins)); | 2307 | make_number (charpos + lenins)); |
| 2308 | |||
| 2309 | unbind_to (count, Qnil); | ||
| 2335 | } | 2310 | } |
| 2336 | 2311 | ||
| 2337 | Lisp_Object | 2312 | Lisp_Object |
diff --git a/src/intervals.c b/src/intervals.c index 89f99a052b9..a695976b8b7 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -2200,7 +2200,7 @@ set_point_both (buffer, charpos, bytepos) | |||
| 2200 | 2200 | ||
| 2201 | temp_set_point_both (buffer, charpos, bytepos); | 2201 | temp_set_point_both (buffer, charpos, bytepos); |
| 2202 | 2202 | ||
| 2203 | /* We run point-left and point-entered hooks here, iff the | 2203 | /* We run point-left and point-entered hooks here, if the |
| 2204 | two intervals are not equivalent. These hooks take | 2204 | two intervals are not equivalent. These hooks take |
| 2205 | (old_point, new_point) as arguments. */ | 2205 | (old_point, new_point) as arguments. */ |
| 2206 | if (NILP (Vinhibit_point_motion_hooks) | 2206 | if (NILP (Vinhibit_point_motion_hooks) |
diff --git a/src/keyboard.c b/src/keyboard.c index 8999dd05759..626748b6c12 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -487,7 +487,7 @@ static struct input_event * volatile kbd_store_ptr; | |||
| 487 | /* The above pair of variables forms a "queue empty" flag. When we | 487 | /* The above pair of variables forms a "queue empty" flag. When we |
| 488 | enqueue a non-hook event, we increment kbd_store_ptr. When we | 488 | enqueue a non-hook event, we increment kbd_store_ptr. When we |
| 489 | dequeue a non-hook event, we increment kbd_fetch_ptr. We say that | 489 | dequeue a non-hook event, we increment kbd_fetch_ptr. We say that |
| 490 | there is input available iff the two pointers are not equal. | 490 | there is input available if the two pointers are not equal. |
| 491 | 491 | ||
| 492 | Why not just have a flag set and cleared by the enqueuing and | 492 | Why not just have a flag set and cleared by the enqueuing and |
| 493 | dequeuing functions? Such a flag could be screwed up by interrupts | 493 | dequeuing functions? Such a flag could be screwed up by interrupts |
| @@ -3703,7 +3703,7 @@ restore_getcjmp (temp) | |||
| 3703 | kbd_buffer_store_event places events in kbd_buffer, and | 3703 | kbd_buffer_store_event places events in kbd_buffer, and |
| 3704 | kbd_buffer_get_event retrieves them. */ | 3704 | kbd_buffer_get_event retrieves them. */ |
| 3705 | 3705 | ||
| 3706 | /* Return true iff there are any events in the queue that read-char | 3706 | /* Return true if there are any events in the queue that read-char |
| 3707 | would return. If this returns false, a read-char would block. */ | 3707 | would return. If this returns false, a read-char would block. */ |
| 3708 | static int | 3708 | static int |
| 3709 | readable_events (flags) | 3709 | readable_events (flags) |
diff --git a/src/keyboard.h b/src/keyboard.h index 869449f4000..a65bf8cfa02 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -248,7 +248,7 @@ extern Lisp_Object item_properties; | |||
| 248 | 248 | ||
| 249 | /* Macros for dealing with lispy events. */ | 249 | /* Macros for dealing with lispy events. */ |
| 250 | 250 | ||
| 251 | /* True iff EVENT has data fields describing it (i.e. a mouse click). */ | 251 | /* True if EVENT has data fields describing it (i.e. a mouse click). */ |
| 252 | #define EVENT_HAS_PARAMETERS(event) (CONSP (event)) | 252 | #define EVENT_HAS_PARAMETERS(event) (CONSP (event)) |
| 253 | 253 | ||
| 254 | /* Extract the head from an event. | 254 | /* Extract the head from an event. |
diff --git a/src/keymap.c b/src/keymap.c index b4f74885e91..181d43a4f48 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -4067,7 +4067,7 @@ don't alter it yourself. */); | |||
| 4067 | DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist, | 4067 | DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist, |
| 4068 | doc: /* Alist of keymaps to use for minor modes. | 4068 | doc: /* Alist of keymaps to use for minor modes. |
| 4069 | Each element looks like (VARIABLE . KEYMAP); KEYMAP is used to read | 4069 | Each element looks like (VARIABLE . KEYMAP); KEYMAP is used to read |
| 4070 | key sequences and look up bindings iff VARIABLE's value is non-nil. | 4070 | key sequences and look up bindings if VARIABLE's value is non-nil. |
| 4071 | If two active keymaps bind the same key, the keymap appearing earlier | 4071 | If two active keymaps bind the same key, the keymap appearing earlier |
| 4072 | in the list takes precedence. */); | 4072 | in the list takes precedence. */); |
| 4073 | Vminor_mode_map_alist = Qnil; | 4073 | Vminor_mode_map_alist = Qnil; |
diff --git a/src/lisp.h b/src/lisp.h index 6dee6e0a7d4..2273015d643 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1444,7 +1444,7 @@ typedef unsigned char UCHAR; | |||
| 1444 | #define GLYPH_CHAR(f, g) (FAST_GLYPH_CHAR (g)) | 1444 | #define GLYPH_CHAR(f, g) (FAST_GLYPH_CHAR (g)) |
| 1445 | #define GLYPH_FACE(f, g) (FAST_GLYPH_FACE (g)) | 1445 | #define GLYPH_FACE(f, g) (FAST_GLYPH_FACE (g)) |
| 1446 | 1446 | ||
| 1447 | /* Return 1 iff GLYPH contains valid character code. */ | 1447 | /* Return 1 if GLYPH contains valid character code. */ |
| 1448 | #define GLYPH_CHAR_VALID_P(glyph) CHAR_VALID_P (FAST_GLYPH_CHAR (glyph), 1) | 1448 | #define GLYPH_CHAR_VALID_P(glyph) CHAR_VALID_P (FAST_GLYPH_CHAR (glyph), 1) |
| 1449 | 1449 | ||
| 1450 | /* The ID of the mode line highlighting face. */ | 1450 | /* The ID of the mode line highlighting face. */ |
| @@ -1591,7 +1591,7 @@ typedef unsigned char UCHAR; | |||
| 1591 | "dead", which is what we want; this is an argument-checking macro, and | 1591 | "dead", which is what we want; this is an argument-checking macro, and |
| 1592 | the user should never get access to interior windows. | 1592 | the user should never get access to interior windows. |
| 1593 | 1593 | ||
| 1594 | A window of any sort, leaf or interior, is dead iff the buffer, | 1594 | A window of any sort, leaf or interior, is dead if the buffer, |
| 1595 | vchild, and hchild members are all nil. */ | 1595 | vchild, and hchild members are all nil. */ |
| 1596 | 1596 | ||
| 1597 | #define CHECK_LIVE_WINDOW(x) \ | 1597 | #define CHECK_LIVE_WINDOW(x) \ |
diff --git a/src/lread.c b/src/lread.c index 78e8b2730fe..bc667fc9270 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -95,7 +95,7 @@ Lisp_Object Qfile_truename, Qdo_after_load_evaluation; /* ACM 2006/5/16 */ | |||
| 95 | extern Lisp_Object Qevent_symbol_element_mask; | 95 | extern Lisp_Object Qevent_symbol_element_mask; |
| 96 | extern Lisp_Object Qfile_exists_p; | 96 | extern Lisp_Object Qfile_exists_p; |
| 97 | 97 | ||
| 98 | /* non-zero iff inside `load' */ | 98 | /* non-zero if inside `load' */ |
| 99 | int load_in_progress; | 99 | int load_in_progress; |
| 100 | 100 | ||
| 101 | /* Directory in which the sources were found. */ | 101 | /* Directory in which the sources were found. */ |
| @@ -1128,7 +1128,7 @@ in which case file-name-handlers are ignored. */) | |||
| 1128 | On success, returns a file descriptor. On failure, returns -1. | 1128 | On success, returns a file descriptor. On failure, returns -1. |
| 1129 | 1129 | ||
| 1130 | SUFFIXES is a list of strings containing possible suffixes. | 1130 | SUFFIXES is a list of strings containing possible suffixes. |
| 1131 | The empty suffix is automatically added iff the list is empty. | 1131 | The empty suffix is automatically added if the list is empty. |
| 1132 | 1132 | ||
| 1133 | PREDICATE non-nil means don't open the files, | 1133 | PREDICATE non-nil means don't open the files, |
| 1134 | just look for one that satisfies the predicate. In this case, | 1134 | just look for one that satisfies the predicate. In this case, |
| @@ -4079,7 +4079,7 @@ customize `jka-compr-load-suffixes' rather than the present variable. */); | |||
| 4079 | Vload_file_rep_suffixes = Fcons (empty_unibyte_string, Qnil); | 4079 | Vload_file_rep_suffixes = Fcons (empty_unibyte_string, Qnil); |
| 4080 | 4080 | ||
| 4081 | DEFVAR_BOOL ("load-in-progress", &load_in_progress, | 4081 | DEFVAR_BOOL ("load-in-progress", &load_in_progress, |
| 4082 | doc: /* Non-nil iff inside of `load'. */); | 4082 | doc: /* Non-nil if inside of `load'. */); |
| 4083 | 4083 | ||
| 4084 | DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, | 4084 | DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, |
| 4085 | doc: /* An alist of expressions to be evalled when particular files are loaded. | 4085 | doc: /* An alist of expressions to be evalled when particular files are loaded. |
diff --git a/src/m/7300.h b/src/m/7300.h index b590593abc8..6e439a829cc 100644 --- a/src/m/7300.h +++ b/src/m/7300.h | |||
| @@ -30,7 +30,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 30 | /* # define SHORTNAMES */ | 30 | /* # define SHORTNAMES */ |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #define WORDS_BIG_ENDIAN | 36 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/acorn.h b/src/m/acorn.h index 7fa5991e28b..148d46454ab 100644 --- a/src/m/acorn.h +++ b/src/m/acorn.h | |||
| @@ -21,7 +21,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 24 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 25 | is the most significant byte. */ | 25 | is the most significant byte. */ |
| 26 | 26 | ||
| 27 | #undef WORDS_BIG_ENDIAN | 27 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/alliant-2800.h b/src/m/alliant-2800.h index 3d65f9d1f12..405267afb2b 100644 --- a/src/m/alliant-2800.h +++ b/src/m/alliant-2800.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-3" */ | 25 | USUAL-OPSYS="bsd4-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #undef WORDS_BIG_ENDIAN | 30 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/alliant.h b/src/m/alliant.h index b871d4a2385..7cad4bfb0c1 100644 --- a/src/m/alliant.h +++ b/src/m/alliant.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | operating system this machine is likely to run. | 26 | operating system this machine is likely to run. |
| 27 | USUAL-OPSYS="bsd4-2" */ | 27 | USUAL-OPSYS="bsd4-2" */ |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | #define WORDS_BIG_ENDIAN | 32 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/alpha.h b/src/m/alpha.h index 84e74d581d1..5e46a05ab68 100644 --- a/src/m/alpha.h +++ b/src/m/alpha.h | |||
| @@ -35,7 +35,7 @@ NOTE-END | |||
| 35 | on OSF 4/5 -- fx. */ | 35 | on OSF 4/5 -- fx. */ |
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 38 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 39 | is the most significant byte. */ | 39 | is the most significant byte. */ |
| 40 | 40 | ||
| 41 | #undef WORDS_BIG_ENDIAN | 41 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/altos.h b/src/m/altos.h index 8a1cb138345..0f4bb9b810f 100644 --- a/src/m/altos.h +++ b/src/m/altos.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/amdahl.h b/src/m/amdahl.h index 3d9ee17e91f..486e2925a55 100644 --- a/src/m/amdahl.h +++ b/src/m/amdahl.h | |||
| @@ -31,7 +31,7 @@ This file works with the Amdahl uts native C compiler. The 5.2u370 | |||
| 31 | compiler is so brain damaged that it is not even worth trying to use it. | 31 | compiler is so brain damaged that it is not even worth trying to use it. |
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 34 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 35 | is the most significant byte. */ | 35 | is the most significant byte. */ |
| 36 | 36 | ||
| 37 | #define WORDS_BIG_ENDIAN | 37 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h index fbd53a955a2..681be8b0647 100644 --- a/src/m/amdx86-64.h +++ b/src/m/amdx86-64.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | #define BITS_PER_LONG 64 | 26 | #define BITS_PER_LONG 64 |
| 27 | #define BITS_PER_EMACS_INT 64 | 27 | #define BITS_PER_EMACS_INT 64 |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | #undef WORDS_BIG_ENDIAN | 32 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/apollo.h b/src/m/apollo.h index b769c24c294..2eac3098db9 100644 --- a/src/m/apollo.h +++ b/src/m/apollo.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-3" */ | 25 | USUAL-OPSYS="bsd4-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/arm.h b/src/m/arm.h index b1df83f9b70..697179723f7 100644 --- a/src/m/arm.h +++ b/src/m/arm.h | |||
| @@ -21,7 +21,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 24 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 25 | is the most significant byte. */ | 25 | is the most significant byte. */ |
| 26 | 26 | ||
| 27 | #undef WORDS_BIG_ENDIAN | 27 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/att3b.h b/src/m/att3b.h index 3344aabc2a9..8e9a589bcd2 100644 --- a/src/m/att3b.h +++ b/src/m/att3b.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | operating system this machine is likely to run. | 26 | operating system this machine is likely to run. |
| 27 | USUAL-OPSYS="usg5-2-2" */ | 27 | USUAL-OPSYS="usg5-2-2" */ |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | #define WORDS_BIG_ENDIAN | 32 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/aviion.h b/src/m/aviion.h index 7f3f7f253d5..832feb79a00 100644 --- a/src/m/aviion.h +++ b/src/m/aviion.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #define WORDS_BIG_ENDIAN | 26 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/celerity.h b/src/m/celerity.h index 76f1e1729b3..556c2765883 100644 --- a/src/m/celerity.h +++ b/src/m/celerity.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/clipper.h b/src/m/clipper.h index de99ba97eb5..c0006f48eab 100644 --- a/src/m/clipper.h +++ b/src/m/clipper.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #undef WORDS_BIG_ENDIAN | 26 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/cnvrgnt.h b/src/m/cnvrgnt.h index f64fc86b08b..22478a273b6 100644 --- a/src/m/cnvrgnt.h +++ b/src/m/cnvrgnt.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #define WORDS_BIG_ENDIAN | 26 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/convex.h b/src/m/convex.h index 7f90d22117c..c8f447cf2fa 100644 --- a/src/m/convex.h +++ b/src/m/convex.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-3" */ | 25 | USUAL-OPSYS="bsd4-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/cydra5.h b/src/m/cydra5.h index 2361fb4b589..4c95f226371 100644 --- a/src/m/cydra5.h +++ b/src/m/cydra5.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-3" */ | 25 | USUAL-OPSYS="usg5-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/delta88k.h b/src/m/delta88k.h index c767e1db1ca..b5d0c8f190b 100644 --- a/src/m/delta88k.h +++ b/src/m/delta88k.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-3" */ | 25 | USUAL-OPSYS="usg5-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/dpx2.h b/src/m/dpx2.h index 1c1d146a08a..b39ef93ee34 100644 --- a/src/m/dpx2.h +++ b/src/m/dpx2.h | |||
| @@ -32,7 +32,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 32 | /* #define ncl_el /* DPX/2 210,220 etc */ | 32 | /* #define ncl_el /* DPX/2 210,220 etc */ |
| 33 | /* #define ncl_mr 1 /* DPX/2 320,340 (and 360,380 ?) */ | 33 | /* #define ncl_mr 1 /* DPX/2 320,340 (and 360,380 ?) */ |
| 34 | 34 | ||
| 35 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 35 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 36 | is the most significant byte. */ | 36 | is the most significant byte. */ |
| 37 | 37 | ||
| 38 | #define WORDS_BIG_ENDIAN | 38 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/dual.h b/src/m/dual.h index 4fda7a8a96c..d287f9502d2 100644 --- a/src/m/dual.h +++ b/src/m/dual.h | |||
| @@ -35,7 +35,7 @@ Dual running Uniplus (-machine=dual -opsystem=unipl5-2) | |||
| 35 | NOTE-END */ | 35 | NOTE-END */ |
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 38 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 39 | is the most significant byte. */ | 39 | is the most significant byte. */ |
| 40 | 40 | ||
| 41 | #define WORDS_BIG_ENDIAN | 41 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/elxsi.h b/src/m/elxsi.h index 81689e66e52..07a00bbf714 100644 --- a/src/m/elxsi.h +++ b/src/m/elxsi.h | |||
| @@ -27,7 +27,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 27 | /* This file was modified by Matt Crawford <matt@tank.uchicago.edu> | 27 | /* This file was modified by Matt Crawford <matt@tank.uchicago.edu> |
| 28 | to work under Elxsi's 12.0 release of BSD unix. */ | 28 | to work under Elxsi's 12.0 release of BSD unix. */ |
| 29 | 29 | ||
| 30 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 30 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 31 | is the most significant byte. */ | 31 | is the most significant byte. */ |
| 32 | 32 | ||
| 33 | #undef WORDS_BIG_ENDIAN | 33 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/gould.h b/src/m/gould.h index c31f50249e7..cd16e09b785 100644 --- a/src/m/gould.h +++ b/src/m/gould.h | |||
| @@ -49,7 +49,7 @@ Gould Power Node (-machine=gould -opsystem=bsd4-2 or bsd4-3) | |||
| 49 | A site running a pre-release of 2.1 should #define RELEASE2_1 in config.h. | 49 | A site running a pre-release of 2.1 should #define RELEASE2_1 in config.h. |
| 50 | NOTE-END */ | 50 | NOTE-END */ |
| 51 | 51 | ||
| 52 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 52 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 53 | is the most significant byte. */ | 53 | is the most significant byte. */ |
| 54 | 54 | ||
| 55 | #define WORDS_BIG_ENDIAN | 55 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/hp800.h b/src/m/hp800.h index d54690104b5..83465052478 100644 --- a/src/m/hp800.h +++ b/src/m/hp800.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="hpux" */ | 25 | USUAL-OPSYS="hpux" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/hp9000s300.h b/src/m/hp9000s300.h index 3718bb3f3ae..9a27065f866 100644 --- a/src/m/hp9000s300.h +++ b/src/m/hp9000s300.h | |||
| @@ -59,7 +59,7 @@ NOTE-END */ | |||
| 59 | 59 | ||
| 60 | /* #define HPUX_5 */ | 60 | /* #define HPUX_5 */ |
| 61 | 61 | ||
| 62 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 62 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 63 | is the most significant byte. */ | 63 | is the most significant byte. */ |
| 64 | 64 | ||
| 65 | #define WORDS_BIG_ENDIAN | 65 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/i860.h b/src/m/i860.h index 1255f2f1576..6d79c5c8d38 100644 --- a/src/m/i860.h +++ b/src/m/i860.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #undef WORDS_BIG_ENDIAN | 30 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/ia64.h b/src/m/ia64.h index b6fea6b8fd7..8f7fed8d69e 100644 --- a/src/m/ia64.h +++ b/src/m/ia64.h | |||
| @@ -23,7 +23,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 23 | #define BITS_PER_LONG 64 | 23 | #define BITS_PER_LONG 64 |
| 24 | #define BITS_PER_EMACS_INT 64 | 24 | #define BITS_PER_EMACS_INT 64 |
| 25 | 25 | ||
| 26 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 26 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 27 | is the most significant byte. */ | 27 | is the most significant byte. */ |
| 28 | 28 | ||
| 29 | #undef WORDS_BIG_ENDIAN | 29 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/ibm370aix.h b/src/m/ibm370aix.h index f632a30780b..0195ec141ab 100644 --- a/src/m/ibm370aix.h +++ b/src/m/ibm370aix.h | |||
| @@ -30,7 +30,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 30 | #undef INTEL386 | 30 | #undef INTEL386 |
| 31 | #undef aix386 | 31 | #undef aix386 |
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #define WORDS_BIG_ENDIAN | 36 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ibmps2-aix.h b/src/m/ibmps2-aix.h index 8882052b006..8c975b81bb9 100644 --- a/src/m/ibmps2-aix.h +++ b/src/m/ibmps2-aix.h | |||
| @@ -30,7 +30,7 @@ NOTE-START | |||
| 30 | work with certain new X window managers, and may be suboptimal. | 30 | work with certain new X window managers, and may be suboptimal. |
| 31 | NOTE-END */ | 31 | NOTE-END */ |
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #undef WORDS_BIG_ENDIAN | 36 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h index 2a298e7f760..d542c07ad0a 100644 --- a/src/m/ibmrs6000.h +++ b/src/m/ibmrs6000.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="aix3-1" */ | 25 | USUAL-OPSYS="aix3-1" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #ifdef USG5_4 | 30 | #ifdef USG5_4 |
diff --git a/src/m/ibmrt-aix.h b/src/m/ibmrt-aix.h index d24e99fe6d6..57a9dbc4df1 100644 --- a/src/m/ibmrt-aix.h +++ b/src/m/ibmrt-aix.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2-2" */ | 25 | USUAL-OPSYS="usg5-2-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ibmrt.h b/src/m/ibmrt.h index 55cbfd88371..ca32db94518 100644 --- a/src/m/ibmrt.h +++ b/src/m/ibmrt.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ibms390.h b/src/m/ibms390.h index aece0f7599e..1c7165e04c0 100644 --- a/src/m/ibms390.h +++ b/src/m/ibms390.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h index fb1f210c634..64ede365d0c 100644 --- a/src/m/ibms390x.h +++ b/src/m/ibms390x.h | |||
| @@ -36,7 +36,7 @@ NOTE-END */ | |||
| 36 | #define BITS_PER_LONG 64 | 36 | #define BITS_PER_LONG 64 |
| 37 | #define BITS_PER_EMACS_INT 64 | 37 | #define BITS_PER_EMACS_INT 64 |
| 38 | 38 | ||
| 39 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 39 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 40 | is the most significant byte. */ | 40 | is the most significant byte. */ |
| 41 | 41 | ||
| 42 | #define WORDS_BIG_ENDIAN | 42 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/intel386.h b/src/m/intel386.h index 7c6c2106d17..22205ed762c 100644 --- a/src/m/intel386.h +++ b/src/m/intel386.h | |||
| @@ -50,7 +50,7 @@ Prime EXL (-machine=intel386 -opsystem=usg5-3) | |||
| 50 | Minor changes merged in 19.1. | 50 | Minor changes merged in 19.1. |
| 51 | NOTE-END */ | 51 | NOTE-END */ |
| 52 | 52 | ||
| 53 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 53 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 54 | is the most significant byte. */ | 54 | is the most significant byte. */ |
| 55 | 55 | ||
| 56 | #undef WORDS_BIG_ENDIAN | 56 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/iris4d.h b/src/m/iris4d.h index d918c25aede..4c15131e595 100644 --- a/src/m/iris4d.h +++ b/src/m/iris4d.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #define WORDS_BIG_ENDIAN | 26 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/irist.h b/src/m/irist.h index 0b33bd964aa..c0d55f96d0f 100644 --- a/src/m/irist.h +++ b/src/m/irist.h | |||
| @@ -58,7 +58,7 @@ NOTE-END */ | |||
| 58 | (copy-file), it would say that it is non-critical... | 58 | (copy-file), it would say that it is non-critical... |
| 59 | #endif /* 0 */ | 59 | #endif /* 0 */ |
| 60 | 60 | ||
| 61 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 61 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 62 | is the most significant byte. */ | 62 | is the most significant byte. */ |
| 63 | 63 | ||
| 64 | #define WORDS_BIG_ENDIAN | 64 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/isi-ov.h b/src/m/isi-ov.h index 7e25ed9d277..6706ee9981b 100644 --- a/src/m/isi-ov.h +++ b/src/m/isi-ov.h | |||
| @@ -30,7 +30,7 @@ NOTE-END */ | |||
| 30 | 30 | ||
| 31 | #define ISI68K | 31 | #define ISI68K |
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #define WORDS_BIG_ENDIAN | 36 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/m68k.h b/src/m/m68k.h index c771e863711..4c600a44d8c 100644 --- a/src/m/m68k.h +++ b/src/m/m68k.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | the size of various data types. */ | 24 | the size of various data types. */ |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/macppc.h b/src/m/macppc.h index cc4afe31519..d4561c0289f 100644 --- a/src/m/macppc.h +++ b/src/m/macppc.h | |||
| @@ -19,7 +19,7 @@ along with GNU Emacs; see the file COPYING. If not, write to | |||
| 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 22 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 23 | is the most significant byte. */ | 23 | is the most significant byte. */ |
| 24 | 24 | ||
| 25 | #define WORDS_BIG_ENDIAN | 25 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/masscomp.h b/src/m/masscomp.h index ac753de1537..4e95c268860 100644 --- a/src/m/masscomp.h +++ b/src/m/masscomp.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="rtu" */ | 25 | USUAL-OPSYS="rtu" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/mega68.h b/src/m/mega68.h index 6d991ba06a2..0d22b572fc5 100644 --- a/src/m/mega68.h +++ b/src/m/mega68.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/mg1.h b/src/m/mg1.h index 647544e21e4..515e9e23a96 100644 --- a/src/m/mg1.h +++ b/src/m/mg1.h | |||
| @@ -34,7 +34,7 @@ own configuration files, please let the Free Software Foundation in on | |||
| 34 | your work; we'd like to distribute this information. | 34 | your work; we'd like to distribute this information. |
| 35 | NOTE-END */ | 35 | NOTE-END */ |
| 36 | 36 | ||
| 37 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 37 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 38 | is the most significant byte. */ | 38 | is the most significant byte. */ |
| 39 | 39 | ||
| 40 | #undef WORDS_BIG_ENDIAN | 40 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/mips-siemens.h b/src/m/mips-siemens.h index d90a651d361..53366a1332e 100644 --- a/src/m/mips-siemens.h +++ b/src/m/mips-siemens.h | |||
| @@ -36,7 +36,7 @@ This is the m- file for SNI RM*00 machines. Use s- sinix5-4.h file! | |||
| 36 | With this the file mips-siemens.h is obsolete. | 36 | With this the file mips-siemens.h is obsolete. |
| 37 | NOTE-END */ | 37 | NOTE-END */ |
| 38 | 38 | ||
| 39 | /* Define BIG_ENDIAN iff lowest-numbered byte in a word | 39 | /* Define BIG_ENDIAN if lowest-numbered byte in a word |
| 40 | is the most significant byte. */ | 40 | is the most significant byte. */ |
| 41 | 41 | ||
| 42 | #define BIG_ENDIAN | 42 | #define BIG_ENDIAN |
diff --git a/src/m/mips.h b/src/m/mips.h index b18324fb8b7..6c039c5e14c 100644 --- a/src/m/mips.h +++ b/src/m/mips.h | |||
| @@ -29,7 +29,7 @@ Use mips4.h for RISCOS version 4; use s-bsd4-3.h with the BSD world. | |||
| 29 | Note that the proper m file for the Decstation is pmax.h. | 29 | Note that the proper m file for the Decstation is pmax.h. |
| 30 | NOTE-END */ | 30 | NOTE-END */ |
| 31 | 31 | ||
| 32 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 32 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 33 | is the most significant byte. */ | 33 | is the most significant byte. */ |
| 34 | 34 | ||
| 35 | #if ! (defined (__MIPSEL__) || defined (MIPSEL) || defined (_MIPSEL)) | 35 | #if ! (defined (__MIPSEL__) || defined (MIPSEL) || defined (_MIPSEL)) |
diff --git a/src/m/news.h b/src/m/news.h index 419015dd150..084c5abb92c 100644 --- a/src/m/news.h +++ b/src/m/news.h | |||
| @@ -34,7 +34,7 @@ NOTE-END */ | |||
| 34 | #define m68000 | 34 | #define m68000 |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 37 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 38 | is the most significant byte. */ | 38 | is the most significant byte. */ |
| 39 | 39 | ||
| 40 | #define WORDS_BIG_ENDIAN | 40 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/next.h b/src/m/next.h index ef92607d957..bca8ac39d47 100644 --- a/src/m/next.h +++ b/src/m/next.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | #define NeXT | 26 | #define NeXT |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | /* Let the compiler tell us. */ | 32 | /* Let the compiler tell us. */ |
diff --git a/src/m/ns16000.h b/src/m/ns16000.h index c64bfa32482..6feddd97610 100644 --- a/src/m/ns16000.h +++ b/src/m/ns16000.h | |||
| @@ -30,7 +30,7 @@ For a Tektronix 16000 box (a 6130, perhaps?), use `-opsystem=bsd4-2'. | |||
| 30 | Use `-machine=ns16000' for both. | 30 | Use `-machine=ns16000' for both. |
| 31 | NOTE-END */ | 31 | NOTE-END */ |
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #undef WORDS_BIG_ENDIAN | 36 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/ns32000.h b/src/m/ns32000.h index 0b776115ca8..b6484b4b219 100644 --- a/src/m/ns32000.h +++ b/src/m/ns32000.h | |||
| @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | operating system this machine is likely to run. | 25 | operating system this machine is likely to run. |
| 26 | USUAL-OPSYS="usg5-2" */ | 26 | USUAL-OPSYS="usg5-2" */ |
| 27 | 27 | ||
| 28 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 28 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 29 | is the most significant byte. */ | 29 | is the most significant byte. */ |
| 30 | 30 | ||
| 31 | #undef WORDS_BIG_ENDIAN | 31 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/nu.h b/src/m/nu.h index 347606a6c01..279d14ff915 100644 --- a/src/m/nu.h +++ b/src/m/nu.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/orion.h b/src/m/orion.h index 36a74b3cc3b..cc3a7e395fc 100644 --- a/src/m/orion.h +++ b/src/m/orion.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #undef WORDS_BIG_ENDIAN | 30 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/orion105.h b/src/m/orion105.h index 73408ed1b2f..fabcf67e2a9 100644 --- a/src/m/orion105.h +++ b/src/m/orion105.h | |||
| @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | operating system this machine is likely to run. | 25 | operating system this machine is likely to run. |
| 26 | USUAL-OPSYS="bsd4-2" */ | 26 | USUAL-OPSYS="bsd4-2" */ |
| 27 | 27 | ||
| 28 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 28 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 29 | is the most significant byte. */ | 29 | is the most significant byte. */ |
| 30 | 30 | ||
| 31 | #undef WORDS_BIG_ENDIAN | 31 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/pfa50.h b/src/m/pfa50.h index 8f1f146000e..5f98dc993c7 100644 --- a/src/m/pfa50.h +++ b/src/m/pfa50.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #define WORDS_BIG_ENDIAN | 26 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/plexus.h b/src/m/plexus.h index 4a4e6a32f7f..51961977904 100644 --- a/src/m/plexus.h +++ b/src/m/plexus.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/powermac.h b/src/m/powermac.h index 729bbb0358b..2dde47bd6cf 100644 --- a/src/m/powermac.h +++ b/src/m/powermac.h | |||
| @@ -23,7 +23,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 23 | operating system this machine is likely to run. | 23 | operating system this machine is likely to run. |
| 24 | USUAL-OPSYS="darwin" */ | 24 | USUAL-OPSYS="darwin" */ |
| 25 | 25 | ||
| 26 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 26 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 27 | is the most significant byte. */ | 27 | is the most significant byte. */ |
| 28 | 28 | ||
| 29 | #define WORDS_BIG_ENDIAN | 29 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/powerpcle.h b/src/m/powerpcle.h index 403d6986bf8..5be26e93b17 100644 --- a/src/m/powerpcle.h +++ b/src/m/powerpcle.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | USUAL-OPSYS="Solaris2.5.1 Windows/NT AIX 4.1.2" | 24 | USUAL-OPSYS="Solaris2.5.1 Windows/NT AIX 4.1.2" |
| 25 | */ | 25 | */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #undef WORDS_BIG_ENDIAN | 30 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/pyramid.h b/src/m/pyramid.h index 9ee3fefe387..1b834c60ba0 100644 --- a/src/m/pyramid.h +++ b/src/m/pyramid.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sequent.h b/src/m/sequent.h index be5d3f19bd1..3c06d854b41 100644 --- a/src/m/sequent.h +++ b/src/m/sequent.h | |||
| @@ -31,7 +31,7 @@ NOTE-END */ | |||
| 31 | /* NOTE: this file works for DYNIX release 2.0 | 31 | /* NOTE: this file works for DYNIX release 2.0 |
| 32 | (not tested on 1.3) on NS32000's */ | 32 | (not tested on 1.3) on NS32000's */ |
| 33 | 33 | ||
| 34 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 34 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 35 | is the most significant byte. */ | 35 | is the most significant byte. */ |
| 36 | 36 | ||
| 37 | #undef WORDS_BIG_ENDIAN | 37 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/sh3el.h b/src/m/sh3el.h index 5851ade1523..eefcccea6de 100644 --- a/src/m/sh3el.h +++ b/src/m/sh3el.h | |||
| @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 23 | operating system this machine is likely to run. | 23 | operating system this machine is likely to run. |
| 24 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 24 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 25 | 25 | ||
| 26 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 26 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 27 | is the most significant byte. */ | 27 | is the most significant byte. */ |
| 28 | 28 | ||
| 29 | #undef WORDS_BIG_ENDIAN | 29 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/sparc.h b/src/m/sparc.h index f59c2c2b969..8df81ee91aa 100644 --- a/src/m/sparc.h +++ b/src/m/sparc.h | |||
| @@ -28,7 +28,7 @@ Use -opsystem=sunos4 for operating system version 4, and | |||
| 28 | -opsystem=bsd4-2 for earlier versions. | 28 | -opsystem=bsd4-2 for earlier versions. |
| 29 | NOTE-END */ | 29 | NOTE-END */ |
| 30 | 30 | ||
| 31 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 31 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 32 | is the most significant byte. */ | 32 | is the most significant byte. */ |
| 33 | 33 | ||
| 34 | #define WORDS_BIG_ENDIAN | 34 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sps7.h b/src/m/sps7.h index 68acf2c6c52..67fc60c1b6a 100644 --- a/src/m/sps7.h +++ b/src/m/sps7.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sr2k.h b/src/m/sr2k.h index ba4a9a905ab..6c17795e058 100644 --- a/src/m/sr2k.h +++ b/src/m/sr2k.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="hpux" */ | 25 | USUAL-OPSYS="hpux" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/stride.h b/src/m/stride.h index cb0380024a1..d846a6c9843 100644 --- a/src/m/stride.h +++ b/src/m/stride.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sun1.h b/src/m/sun1.h index fda451a9310..03cb4e803ff 100644 --- a/src/m/sun1.h +++ b/src/m/sun1.h | |||
| @@ -40,7 +40,7 @@ Sun 1, 2 and 3 (-machine=sun1, -machine=sun2, -machine=sun3; | |||
| 40 | problems caused by bugs in the "export" version of SunOS 4. | 40 | problems caused by bugs in the "export" version of SunOS 4. |
| 41 | NOTE-END */ | 41 | NOTE-END */ |
| 42 | 42 | ||
| 43 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 43 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 44 | is the most significant byte. */ | 44 | is the most significant byte. */ |
| 45 | 45 | ||
| 46 | #define WORDS_BIG_ENDIAN | 46 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sun2.h b/src/m/sun2.h index 00b7ae97c4d..e764ded3ce7 100644 --- a/src/m/sun2.h +++ b/src/m/sun2.h | |||
| @@ -42,7 +42,7 @@ Sun 1, 2 and 3 (-machine=sun1, -machine=sun2, -machine=sun3; | |||
| 42 | problems caused by bugs in the "export" version of SunOS 4. | 42 | problems caused by bugs in the "export" version of SunOS 4. |
| 43 | NOTE-END */ | 43 | NOTE-END */ |
| 44 | 44 | ||
| 45 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 45 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 46 | is the most significant byte. */ | 46 | is the most significant byte. */ |
| 47 | 47 | ||
| 48 | #define WORDS_BIG_ENDIAN | 48 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tad68k.h b/src/m/tad68k.h index 5e982a314ab..c8be8763fb5 100644 --- a/src/m/tad68k.h +++ b/src/m/tad68k.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-3" */ | 25 | USUAL-OPSYS="usg5-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tahoe.h b/src/m/tahoe.h index 8fe41cd4109..9b9271577fc 100644 --- a/src/m/tahoe.h +++ b/src/m/tahoe.h | |||
| @@ -29,7 +29,7 @@ Use -opsystem=bsd4-2 or -opsystem=bsd4-3, depending on the version of | |||
| 29 | Berkeley you are running. | 29 | Berkeley you are running. |
| 30 | NOTE-END */ | 30 | NOTE-END */ |
| 31 | 31 | ||
| 32 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 32 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 33 | is the most significant byte. */ | 33 | is the most significant byte. */ |
| 34 | 34 | ||
| 35 | #define WORDS_BIG_ENDIAN | 35 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/targon31.h b/src/m/targon31.h index 0c657e0ea5d..39e995b076d 100644 --- a/src/m/targon31.h +++ b/src/m/targon31.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2-2" */ | 25 | USUAL-OPSYS="usg5-2-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tek4300.h b/src/m/tek4300.h index be43210212a..6498238461d 100644 --- a/src/m/tek4300.h +++ b/src/m/tek4300.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-3" */ | 25 | USUAL-OPSYS="bsd4-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tekxd88.h b/src/m/tekxd88.h index 1d46bb9bb55..f351229292f 100644 --- a/src/m/tekxd88.h +++ b/src/m/tekxd88.h | |||
| @@ -22,7 +22,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 22 | Boston, MA 02110-1301, USA. */ | 22 | Boston, MA 02110-1301, USA. */ |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 25 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 26 | is the most significant byte. */ | 26 | is the most significant byte. */ |
| 27 | 27 | ||
| 28 | #define WORDS_BIG_ENDIAN | 28 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/template.h b/src/m/template.h index fccc5b0901c..b893ba23df2 100644 --- a/src/m/template.h +++ b/src/m/template.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tower32.h b/src/m/tower32.h index 0ce623b7f37..01daada2423 100644 --- a/src/m/tower32.h +++ b/src/m/tower32.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2-2" */ | 25 | USUAL-OPSYS="usg5-2-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tower32v3.h b/src/m/tower32v3.h index 226c0e2640a..ff209edab41 100644 --- a/src/m/tower32v3.h +++ b/src/m/tower32v3.h | |||
| @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | operating system this machine is likely to run. | 25 | operating system this machine is likely to run. |
| 26 | USUAL-OPSYS="usg5-3" */ | 26 | USUAL-OPSYS="usg5-3" */ |
| 27 | 27 | ||
| 28 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 28 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 29 | is the most significant byte. */ | 29 | is the most significant byte. */ |
| 30 | 30 | ||
| 31 | #define WORDS_BIG_ENDIAN | 31 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ustation.h b/src/m/ustation.h index f88cdc5ee63..0ac833c28da 100644 --- a/src/m/ustation.h +++ b/src/m/ustation.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-3" */ | 25 | USUAL-OPSYS="usg5-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/vax.h b/src/m/vax.h index 80844ba3ba6..82695074424 100644 --- a/src/m/vax.h +++ b/src/m/vax.h | |||
| @@ -52,7 +52,7 @@ Vax running VMS (-opsystem=vms) | |||
| 52 | 52 | ||
| 53 | NOTE-END */ | 53 | NOTE-END */ |
| 54 | 54 | ||
| 55 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 55 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 56 | is the most significant byte. */ | 56 | is the most significant byte. */ |
| 57 | 57 | ||
| 58 | #undef WORDS_BIG_ENDIAN | 58 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/wicat.h b/src/m/wicat.h index 67409844666..3ac7b530739 100644 --- a/src/m/wicat.h +++ b/src/m/wicat.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/windowsnt.h b/src/m/windowsnt.h index f1efe64a4f5..ddad551c772 100644 --- a/src/m/windowsnt.h +++ b/src/m/windowsnt.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 26 | 26 | ||
| 27 | /* Define BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | /* #define BIG_ENDIAN */ | 30 | /* #define BIG_ENDIAN */ |
diff --git a/src/m/xps100.h b/src/m/xps100.h index 691f5fedbd6..3b378319ceb 100644 --- a/src/m/xps100.h +++ b/src/m/xps100.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | operating system this machine is likely to run. | 26 | operating system this machine is likely to run. |
| 27 | USUAL-OPSYS="usg5-2" */ | 27 | USUAL-OPSYS="usg5-2" */ |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | #define WORDS_BIG_ENDIAN | 32 | #define WORDS_BIG_ENDIAN |
| @@ -1127,18 +1127,15 @@ Lisp_Object | |||
| 1127 | cfdate_to_lisp (date) | 1127 | cfdate_to_lisp (date) |
| 1128 | CFDateRef date; | 1128 | CFDateRef date; |
| 1129 | { | 1129 | { |
| 1130 | static const CFGregorianDate epoch_gdate = {1970, 1, 1, 0, 0, 0.0}; | 1130 | CFTimeInterval sec; |
| 1131 | static CFAbsoluteTime epoch = 0.0, sec; | 1131 | int high, low, microsec; |
| 1132 | int high, low; | ||
| 1133 | 1132 | ||
| 1134 | if (epoch == 0.0) | 1133 | sec = CFDateGetAbsoluteTime (date) + kCFAbsoluteTimeIntervalSince1970; |
| 1135 | epoch = CFGregorianDateGetAbsoluteTime (epoch_gdate, NULL); | ||
| 1136 | |||
| 1137 | sec = CFDateGetAbsoluteTime (date) - epoch; | ||
| 1138 | high = sec / 65536.0; | 1134 | high = sec / 65536.0; |
| 1139 | low = sec - high * 65536.0; | 1135 | low = sec - high * 65536.0; |
| 1136 | microsec = (sec - floor (sec)) * 1000000.0; | ||
| 1140 | 1137 | ||
| 1141 | return list3 (make_number (high), make_number (low), make_number (0)); | 1138 | return list3 (make_number (high), make_number (low), make_number (microsec)); |
| 1142 | } | 1139 | } |
| 1143 | 1140 | ||
| 1144 | 1141 | ||
diff --git a/src/macmenu.c b/src/macmenu.c index 71b384c0762..8305c89ee68 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -2331,6 +2331,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2331 | ((value) + DIALOG_BUTTON_COMMAND_ID_OFFSET) | 2331 | ((value) + DIALOG_BUTTON_COMMAND_ID_OFFSET) |
| 2332 | 2332 | ||
| 2333 | extern EMACS_TIME timer_check P_ ((int)); | 2333 | extern EMACS_TIME timer_check P_ ((int)); |
| 2334 | static int quit_dialog_event_loop; | ||
| 2334 | 2335 | ||
| 2335 | static pascal OSStatus | 2336 | static pascal OSStatus |
| 2336 | mac_handle_dialog_event (next_handler, event, data) | 2337 | mac_handle_dialog_event (next_handler, event, data) |
| @@ -2340,7 +2341,6 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2340 | { | 2341 | { |
| 2341 | OSStatus err, result = eventNotHandledErr; | 2342 | OSStatus err, result = eventNotHandledErr; |
| 2342 | WindowRef window = (WindowRef) data; | 2343 | WindowRef window = (WindowRef) data; |
| 2343 | int quit_event_loop_p = 0; | ||
| 2344 | 2344 | ||
| 2345 | switch (GetEventClass (event)) | 2345 | switch (GetEventClass (event)) |
| 2346 | { | 2346 | { |
| @@ -2355,7 +2355,7 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2355 | if (DIALOG_BUTTON_COMMAND_ID_P (command.commandID)) | 2355 | if (DIALOG_BUTTON_COMMAND_ID_P (command.commandID)) |
| 2356 | { | 2356 | { |
| 2357 | SetWRefCon (window, command.commandID); | 2357 | SetWRefCon (window, command.commandID); |
| 2358 | quit_event_loop_p = 1; | 2358 | quit_dialog_event_loop = 1; |
| 2359 | break; | 2359 | break; |
| 2360 | } | 2360 | } |
| 2361 | 2361 | ||
| @@ -2379,7 +2379,7 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2379 | switch (char_code) | 2379 | switch (char_code) |
| 2380 | { | 2380 | { |
| 2381 | case kEscapeCharCode: | 2381 | case kEscapeCharCode: |
| 2382 | quit_event_loop_p = 1; | 2382 | quit_dialog_event_loop = 1; |
| 2383 | break; | 2383 | break; |
| 2384 | 2384 | ||
| 2385 | default: | 2385 | default: |
| @@ -2395,7 +2395,7 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2395 | NULL, &key_code); | 2395 | NULL, &key_code); |
| 2396 | if (err == noErr) | 2396 | if (err == noErr) |
| 2397 | if (mac_quit_char_key_p (modifiers, key_code)) | 2397 | if (mac_quit_char_key_p (modifiers, key_code)) |
| 2398 | quit_event_loop_p = 1; | 2398 | quit_dialog_event_loop = 1; |
| 2399 | } | 2399 | } |
| 2400 | break; | 2400 | break; |
| 2401 | } | 2401 | } |
| @@ -2406,7 +2406,7 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2406 | abort (); | 2406 | abort (); |
| 2407 | } | 2407 | } |
| 2408 | 2408 | ||
| 2409 | if (quit_event_loop_p) | 2409 | if (quit_dialog_event_loop) |
| 2410 | { | 2410 | { |
| 2411 | err = QuitEventLoop (GetCurrentEventLoop ()); | 2411 | err = QuitEventLoop (GetCurrentEventLoop ()); |
| 2412 | if (err == noErr) | 2412 | if (err == noErr) |
| @@ -2733,6 +2733,7 @@ create_and_show_dialog (f, first_wv) | |||
| 2733 | { | 2733 | { |
| 2734 | EventTargetRef toolbox_dispatcher = GetEventDispatcherTarget (); | 2734 | EventTargetRef toolbox_dispatcher = GetEventDispatcherTarget (); |
| 2735 | 2735 | ||
| 2736 | quit_dialog_event_loop = 0; | ||
| 2736 | while (1) | 2737 | while (1) |
| 2737 | { | 2738 | { |
| 2738 | EMACS_TIME next_time = timer_check (1); | 2739 | EMACS_TIME next_time = timer_check (1); |
| @@ -2758,12 +2759,22 @@ create_and_show_dialog (f, first_wv) | |||
| 2758 | SendEventToEventTarget (event, toolbox_dispatcher); | 2759 | SendEventToEventTarget (event, toolbox_dispatcher); |
| 2759 | ReleaseEvent (event); | 2760 | ReleaseEvent (event); |
| 2760 | } | 2761 | } |
| 2762 | #ifdef MAC_OSX | ||
| 2761 | else if (err != eventLoopTimedOutErr) | 2763 | else if (err != eventLoopTimedOutErr) |
| 2762 | { | 2764 | { |
| 2763 | if (err == eventLoopQuitErr) | 2765 | if (err == eventLoopQuitErr) |
| 2764 | err = noErr; | 2766 | err = noErr; |
| 2765 | break; | 2767 | break; |
| 2766 | } | 2768 | } |
| 2769 | #else | ||
| 2770 | /* The return value of ReceiveNextEvent seems to be | ||
| 2771 | unreliable. Use our own global variable instead. */ | ||
| 2772 | if (quit_dialog_event_loop) | ||
| 2773 | { | ||
| 2774 | err = noErr; | ||
| 2775 | break; | ||
| 2776 | } | ||
| 2777 | #endif | ||
| 2767 | } | 2778 | } |
| 2768 | } | 2779 | } |
| 2769 | if (err == noErr) | 2780 | if (err == noErr) |
diff --git a/src/macselect.c b/src/macselect.c index 04034c499b7..9515a5774ec 100644 --- a/src/macselect.c +++ b/src/macselect.c | |||
| @@ -25,22 +25,27 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | #include "blockinput.h" | 25 | #include "blockinput.h" |
| 26 | #include "keymap.h" | 26 | #include "keymap.h" |
| 27 | 27 | ||
| 28 | #if !TARGET_API_MAC_CARBON | 28 | #if TARGET_API_MAC_CARBON |
| 29 | typedef ScrapRef Selection; | ||
| 30 | #else /* !TARGET_API_MAC_CARBON */ | ||
| 31 | #include <Scrap.h> | ||
| 29 | #include <Endian.h> | 32 | #include <Endian.h> |
| 30 | typedef int ScrapRef; | 33 | typedef int Selection; |
| 31 | typedef ResType ScrapFlavorType; | ||
| 32 | #endif /* !TARGET_API_MAC_CARBON */ | 34 | #endif /* !TARGET_API_MAC_CARBON */ |
| 33 | 35 | ||
| 34 | static OSStatus get_scrap_from_symbol P_ ((Lisp_Object, int, ScrapRef *)); | 36 | static OSStatus mac_get_selection_from_symbol P_ ((Lisp_Object, int, |
| 35 | static ScrapFlavorType get_flavor_type_from_symbol P_ ((Lisp_Object)); | 37 | Selection *)); |
| 36 | static int valid_scrap_target_type_p P_ ((Lisp_Object)); | 38 | static ScrapFlavorType get_flavor_type_from_symbol P_ ((Lisp_Object, |
| 37 | static OSStatus clear_scrap P_ ((ScrapRef *)); | 39 | Selection)); |
| 38 | static OSStatus put_scrap_string P_ ((ScrapRef, Lisp_Object, Lisp_Object)); | 40 | static int mac_valid_selection_target_p P_ ((Lisp_Object)); |
| 39 | static OSStatus put_scrap_private_timestamp P_ ((ScrapRef, unsigned long)); | 41 | static OSStatus mac_clear_selection P_ ((Selection *)); |
| 40 | static ScrapFlavorType scrap_has_target_type P_ ((ScrapRef, Lisp_Object)); | 42 | static Lisp_Object mac_get_selection_ownership_info P_ ((Selection)); |
| 41 | static Lisp_Object get_scrap_string P_ ((ScrapRef, Lisp_Object)); | 43 | static int mac_valid_selection_value_p P_ ((Lisp_Object, Lisp_Object)); |
| 42 | static OSStatus get_scrap_private_timestamp P_ ((ScrapRef, unsigned long *)); | 44 | static OSStatus mac_put_selection_value P_ ((Selection, Lisp_Object, |
| 43 | static Lisp_Object get_scrap_target_type_list P_ ((ScrapRef)); | 45 | Lisp_Object)); |
| 46 | static int mac_selection_has_target_p P_ ((Selection, Lisp_Object)); | ||
| 47 | static Lisp_Object mac_get_selection_value P_ ((Selection, Lisp_Object)); | ||
| 48 | static Lisp_Object mac_get_selection_target_list P_ ((Selection)); | ||
| 44 | static void x_own_selection P_ ((Lisp_Object, Lisp_Object)); | 49 | static void x_own_selection P_ ((Lisp_Object, Lisp_Object)); |
| 45 | static Lisp_Object x_get_local_selection P_ ((Lisp_Object, Lisp_Object, int)); | 50 | static Lisp_Object x_get_local_selection P_ ((Lisp_Object, Lisp_Object, int)); |
| 46 | static Lisp_Object x_get_foreign_selection P_ ((Lisp_Object, | 51 | static Lisp_Object x_get_foreign_selection P_ ((Lisp_Object, |
| @@ -56,7 +61,7 @@ void init_service_handler P_ ((void)); | |||
| 56 | Lisp_Object QPRIMARY, QSECONDARY, QTIMESTAMP, QTARGETS; | 61 | Lisp_Object QPRIMARY, QSECONDARY, QTIMESTAMP, QTARGETS; |
| 57 | 62 | ||
| 58 | static Lisp_Object Vx_lost_selection_functions; | 63 | static Lisp_Object Vx_lost_selection_functions; |
| 59 | /* Coding system for communicating with other programs via scrap. */ | 64 | /* Coding system for communicating with other programs via selections. */ |
| 60 | static Lisp_Object Vselection_coding_system; | 65 | static Lisp_Object Vselection_coding_system; |
| 61 | 66 | ||
| 62 | /* Coding system for the next communicating with other programs. */ | 67 | /* Coding system for the next communicating with other programs. */ |
| @@ -70,23 +75,24 @@ static Lisp_Object Qforeign_selection; | |||
| 70 | extern unsigned long last_event_timestamp; | 75 | extern unsigned long last_event_timestamp; |
| 71 | 76 | ||
| 72 | /* This is an association list whose elements are of the form | 77 | /* This is an association list whose elements are of the form |
| 73 | ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME) | 78 | ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME OWNERSHIP-INFO) |
| 74 | SELECTION-NAME is a lisp symbol. | 79 | SELECTION-NAME is a lisp symbol. |
| 75 | SELECTION-VALUE is the value that emacs owns for that selection. | 80 | SELECTION-VALUE is the value that emacs owns for that selection. |
| 76 | It may be any kind of Lisp object. | 81 | It may be any kind of Lisp object. |
| 77 | SELECTION-TIMESTAMP is the time at which emacs began owning this selection, | 82 | SELECTION-TIMESTAMP is the time at which emacs began owning this selection, |
| 78 | as a cons of two 16-bit numbers (making a 32 bit time.) | 83 | as a cons of two 16-bit numbers (making a 32 bit time.) |
| 79 | FRAME is the frame for which we made the selection. | 84 | FRAME is the frame for which we made the selection. |
| 80 | If there is an entry in this alist, and the data for the flavor | 85 | OWNERSHIP-INFO is a value saved when emacs owns for that selection. |
| 81 | type SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP in the corresponding scrap | 86 | If another application takes the ownership of that selection |
| 82 | (if exists) coincides with SELECTION-TIMESTAMP, then it can be | 87 | later, then newly examined ownership info value should be |
| 83 | assumed that Emacs owns that selection. | 88 | different from the saved one. |
| 89 | If there is an entry in this alist, the current ownership info for | ||
| 90 | the selection coincides with OWNERSHIP-INFO, then it can be | ||
| 91 | assumed that Emacs owns that selection. | ||
| 84 | The only (eq) parts of this list that are visible from Lisp are the | 92 | The only (eq) parts of this list that are visible from Lisp are the |
| 85 | selection-values. */ | 93 | selection-values. */ |
| 86 | static Lisp_Object Vselection_alist; | 94 | static Lisp_Object Vselection_alist; |
| 87 | 95 | ||
| 88 | #define SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP 'Etsp' | ||
| 89 | |||
| 90 | /* This is an alist whose CARs are selection-types and whose CDRs are | 96 | /* This is an alist whose CARs are selection-types and whose CDRs are |
| 91 | the names of Lisp functions to call to convert the given Emacs | 97 | the names of Lisp functions to call to convert the given Emacs |
| 92 | selection value to a string representing the given selection type. | 98 | selection value to a string representing the given selection type. |
| @@ -104,21 +110,22 @@ static Lisp_Object Qmac_scrap_name, Qmac_ostype; | |||
| 104 | static Lisp_Object Vmac_service_selection; | 110 | static Lisp_Object Vmac_service_selection; |
| 105 | #endif | 111 | #endif |
| 106 | 112 | ||
| 107 | /* Get a reference to the scrap corresponding to the symbol SYM. The | 113 | /* Get a reference to the selection corresponding to the symbol SYM. |
| 108 | reference is set to *SCRAP, and it becomes NULL if there's no | 114 | The reference is set to *SEL, and it becomes NULL if there's no |
| 109 | corresponding scrap. Clear the scrap if CLEAR_P is non-zero. */ | 115 | corresponding selection. Clear the selection if CLEAR_P is |
| 116 | non-zero. */ | ||
| 110 | 117 | ||
| 111 | static OSStatus | 118 | static OSStatus |
| 112 | get_scrap_from_symbol (sym, clear_p, scrap) | 119 | mac_get_selection_from_symbol (sym, clear_p, sel) |
| 113 | Lisp_Object sym; | 120 | Lisp_Object sym; |
| 114 | int clear_p; | 121 | int clear_p; |
| 115 | ScrapRef *scrap; | 122 | Selection *sel; |
| 116 | { | 123 | { |
| 117 | OSStatus err = noErr; | 124 | OSStatus err = noErr; |
| 118 | Lisp_Object str = Fget (sym, Qmac_scrap_name); | 125 | Lisp_Object str = Fget (sym, Qmac_scrap_name); |
| 119 | 126 | ||
| 120 | if (!STRINGP (str)) | 127 | if (!STRINGP (str)) |
| 121 | *scrap = NULL; | 128 | *sel = NULL; |
| 122 | else | 129 | else |
| 123 | { | 130 | { |
| 124 | #if TARGET_API_MAC_CARBON | 131 | #if TARGET_API_MAC_CARBON |
| @@ -127,19 +134,19 @@ get_scrap_from_symbol (sym, clear_p, scrap) | |||
| 127 | OptionBits options = (clear_p ? kScrapClearNamedScrap | 134 | OptionBits options = (clear_p ? kScrapClearNamedScrap |
| 128 | : kScrapGetNamedScrap); | 135 | : kScrapGetNamedScrap); |
| 129 | 136 | ||
| 130 | err = GetScrapByName (scrap_name, options, scrap); | 137 | err = GetScrapByName (scrap_name, options, sel); |
| 131 | CFRelease (scrap_name); | 138 | CFRelease (scrap_name); |
| 132 | #else /* !MAC_OSX */ | 139 | #else /* !MAC_OSX */ |
| 133 | if (clear_p) | 140 | if (clear_p) |
| 134 | err = ClearCurrentScrap (); | 141 | err = ClearCurrentScrap (); |
| 135 | if (err == noErr) | 142 | if (err == noErr) |
| 136 | err = GetCurrentScrap (scrap); | 143 | err = GetCurrentScrap (sel); |
| 137 | #endif /* !MAC_OSX */ | 144 | #endif /* !MAC_OSX */ |
| 138 | #else /* !TARGET_API_MAC_CARBON */ | 145 | #else /* !TARGET_API_MAC_CARBON */ |
| 139 | if (clear_p) | 146 | if (clear_p) |
| 140 | err = ZeroScrap (); | 147 | err = ZeroScrap (); |
| 141 | if (err == noErr) | 148 | if (err == noErr) |
| 142 | *scrap = 1; | 149 | *sel = 1; |
| 143 | #endif /* !TARGET_API_MAC_CARBON */ | 150 | #endif /* !TARGET_API_MAC_CARBON */ |
| 144 | } | 151 | } |
| 145 | 152 | ||
| @@ -147,138 +154,154 @@ get_scrap_from_symbol (sym, clear_p, scrap) | |||
| 147 | } | 154 | } |
| 148 | 155 | ||
| 149 | /* Get a scrap flavor type from the symbol SYM. Return 0 if no | 156 | /* Get a scrap flavor type from the symbol SYM. Return 0 if no |
| 150 | corresponding flavor type. */ | 157 | corresponding flavor type. If SEL is non-zero, the return value is |
| 158 | non-zero only when the SEL has the flavor type. */ | ||
| 151 | 159 | ||
| 152 | static ScrapFlavorType | 160 | static ScrapFlavorType |
| 153 | get_flavor_type_from_symbol (sym) | 161 | get_flavor_type_from_symbol (sym, sel) |
| 154 | Lisp_Object sym; | 162 | Lisp_Object sym; |
| 163 | Selection sel; | ||
| 155 | { | 164 | { |
| 156 | Lisp_Object str = Fget (sym, Qmac_ostype); | 165 | Lisp_Object str = Fget (sym, Qmac_ostype); |
| 166 | ScrapFlavorType flavor_type; | ||
| 157 | 167 | ||
| 158 | if (STRINGP (str) && SBYTES (str) == 4) | 168 | if (STRINGP (str) && SBYTES (str) == 4) |
| 159 | return EndianU32_BtoN (*((UInt32 *) SDATA (str))); | 169 | flavor_type = EndianU32_BtoN (*((UInt32 *) SDATA (str))); |
| 170 | else | ||
| 171 | flavor_type = 0; | ||
| 172 | |||
| 173 | if (flavor_type && sel) | ||
| 174 | { | ||
| 175 | #if TARGET_API_MAC_CARBON | ||
| 176 | OSStatus err; | ||
| 177 | ScrapFlavorFlags flags; | ||
| 160 | 178 | ||
| 161 | return 0; | 179 | err = GetScrapFlavorFlags (sel, flavor_type, &flags); |
| 180 | if (err != noErr) | ||
| 181 | flavor_type = 0; | ||
| 182 | #else /* !TARGET_API_MAC_CARBON */ | ||
| 183 | SInt32 size, offset; | ||
| 184 | |||
| 185 | size = GetScrap (NULL, flavor_type, &offset); | ||
| 186 | if (size < 0) | ||
| 187 | flavor_type = 0; | ||
| 188 | #endif /* !TARGET_API_MAC_CARBON */ | ||
| 189 | } | ||
| 190 | |||
| 191 | return flavor_type; | ||
| 162 | } | 192 | } |
| 163 | 193 | ||
| 164 | /* Check if the symbol SYM has a corresponding scrap flavor type. */ | 194 | /* Check if the symbol SYM has a corresponding selection target type. */ |
| 165 | 195 | ||
| 166 | static int | 196 | static int |
| 167 | valid_scrap_target_type_p (sym) | 197 | mac_valid_selection_target_p (sym) |
| 168 | Lisp_Object sym; | 198 | Lisp_Object sym; |
| 169 | { | 199 | { |
| 170 | return get_flavor_type_from_symbol (sym) != 0; | 200 | return get_flavor_type_from_symbol (sym, 0) != 0; |
| 171 | } | 201 | } |
| 172 | 202 | ||
| 173 | /* Clear the scrap whose reference is *SCRAP. */ | 203 | /* Clear the selection whose reference is *SEL. */ |
| 174 | 204 | ||
| 175 | static INLINE OSStatus | 205 | static OSStatus |
| 176 | clear_scrap (scrap) | 206 | mac_clear_selection (sel) |
| 177 | ScrapRef *scrap; | 207 | Selection *sel; |
| 178 | { | 208 | { |
| 179 | #if TARGET_API_MAC_CARBON | 209 | #if TARGET_API_MAC_CARBON |
| 180 | #ifdef MAC_OSX | 210 | #ifdef MAC_OSX |
| 181 | return ClearScrap (scrap); | 211 | return ClearScrap (sel); |
| 182 | #else | 212 | #else |
| 183 | return ClearCurrentScrap (); | 213 | OSStatus err; |
| 214 | |||
| 215 | err = ClearCurrentScrap (); | ||
| 216 | if (err == noErr) | ||
| 217 | err = GetCurrentScrap (sel); | ||
| 218 | return err; | ||
| 184 | #endif | 219 | #endif |
| 185 | #else /* !TARGET_API_MAC_CARBON */ | 220 | #else /* !TARGET_API_MAC_CARBON */ |
| 186 | return ZeroScrap (); | 221 | return ZeroScrap (); |
| 187 | #endif /* !TARGET_API_MAC_CARBON */ | 222 | #endif /* !TARGET_API_MAC_CARBON */ |
| 188 | } | 223 | } |
| 189 | 224 | ||
| 190 | /* Put Lisp String STR to the scrap SCRAP. The target type is | 225 | /* Get ownership information for SEL. Emacs can detect a change of |
| 191 | specified by TYPE. */ | 226 | the ownership by comparing saved and current values of the |
| 227 | ownership information. */ | ||
| 192 | 228 | ||
| 193 | static OSStatus | 229 | static Lisp_Object |
| 194 | put_scrap_string (scrap, type, str) | 230 | mac_get_selection_ownership_info (sel) |
| 195 | ScrapRef scrap; | 231 | Selection sel; |
| 196 | Lisp_Object type, str; | ||
| 197 | { | 232 | { |
| 198 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type); | ||
| 199 | |||
| 200 | if (flavor_type == 0) | ||
| 201 | return noTypeErr; | ||
| 202 | |||
| 203 | #if TARGET_API_MAC_CARBON | 233 | #if TARGET_API_MAC_CARBON |
| 204 | return PutScrapFlavor (scrap, flavor_type, kScrapFlavorMaskNone, | 234 | return long_to_cons ((unsigned long) sel); |
| 205 | SBYTES (str), SDATA (str)); | ||
| 206 | #else /* !TARGET_API_MAC_CARBON */ | 235 | #else /* !TARGET_API_MAC_CARBON */ |
| 207 | return PutScrap (SBYTES (str), flavor_type, SDATA (str)); | 236 | ScrapStuffPtr scrap_info = InfoScrap (); |
| 237 | |||
| 238 | return make_number (scrap_info->scrapCount); | ||
| 208 | #endif /* !TARGET_API_MAC_CARBON */ | 239 | #endif /* !TARGET_API_MAC_CARBON */ |
| 209 | } | 240 | } |
| 210 | 241 | ||
| 211 | /* Put TIMESTAMP to the scrap SCRAP. The timestamp is used for | 242 | /* Return non-zero if VALUE is a valid selection value for TARGET. */ |
| 212 | checking if the scrap is owned by the process. */ | ||
| 213 | 243 | ||
| 214 | static INLINE OSStatus | 244 | static int |
| 215 | put_scrap_private_timestamp (scrap, timestamp) | 245 | mac_valid_selection_value_p (value, target) |
| 216 | ScrapRef scrap; | 246 | Lisp_Object value, target; |
| 217 | unsigned long timestamp; | ||
| 218 | { | 247 | { |
| 219 | #if TARGET_API_MAC_CARBON | 248 | return STRINGP (value); |
| 220 | return PutScrapFlavor (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, | ||
| 221 | kScrapFlavorMaskSenderOnly, | ||
| 222 | sizeof (timestamp), ×tamp); | ||
| 223 | #else /* !TARGET_API_MAC_CARBON */ | ||
| 224 | return PutScrap (sizeof (timestamp), SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, | ||
| 225 | ×tamp); | ||
| 226 | #endif /* !TARGET_API_MAC_CARBON */ | ||
| 227 | } | 249 | } |
| 228 | 250 | ||
| 229 | /* Check if data for the target type TYPE is available in SCRAP. */ | 251 | /* Put Lisp Object VALUE to the selection SEL. The target type is |
| 252 | specified by TARGET. */ | ||
| 230 | 253 | ||
| 231 | static ScrapFlavorType | 254 | static OSStatus |
| 232 | scrap_has_target_type (scrap, type) | 255 | mac_put_selection_value (sel, target, value) |
| 233 | ScrapRef scrap; | 256 | Selection sel; |
| 234 | Lisp_Object type; | 257 | Lisp_Object target, value; |
| 235 | { | 258 | { |
| 236 | OSStatus err; | 259 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (target, 0); |
| 237 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type); | ||
| 238 | 260 | ||
| 239 | if (flavor_type) | 261 | if (flavor_type == 0 || !STRINGP (value)) |
| 240 | { | 262 | return noTypeErr; |
| 241 | #if TARGET_API_MAC_CARBON | ||
| 242 | ScrapFlavorFlags flags; | ||
| 243 | 263 | ||
| 244 | err = GetScrapFlavorFlags (scrap, flavor_type, &flags); | 264 | #if TARGET_API_MAC_CARBON |
| 245 | if (err != noErr) | 265 | return PutScrapFlavor (sel, flavor_type, kScrapFlavorMaskNone, |
| 246 | flavor_type = 0; | 266 | SBYTES (value), SDATA (value)); |
| 247 | #else /* !TARGET_API_MAC_CARBON */ | 267 | #else /* !TARGET_API_MAC_CARBON */ |
| 248 | SInt32 size, offset; | 268 | return PutScrap (SBYTES (value), flavor_type, SDATA (value)); |
| 249 | |||
| 250 | size = GetScrap (NULL, flavor_type, &offset); | ||
| 251 | if (size < 0) | ||
| 252 | flavor_type = 0; | ||
| 253 | #endif /* !TARGET_API_MAC_CARBON */ | 269 | #endif /* !TARGET_API_MAC_CARBON */ |
| 254 | } | 270 | } |
| 255 | 271 | ||
| 256 | return flavor_type; | 272 | /* Check if data for the target type TARGET is available in SEL. */ |
| 273 | |||
| 274 | static int | ||
| 275 | mac_selection_has_target_p (sel, target) | ||
| 276 | Selection sel; | ||
| 277 | Lisp_Object target; | ||
| 278 | { | ||
| 279 | return get_flavor_type_from_symbol (target, sel) != 0; | ||
| 257 | } | 280 | } |
| 258 | 281 | ||
| 259 | /* Get data for the target type TYPE from SCRAP and create a Lisp | 282 | /* Get data for the target type TARGET from SEL and create a Lisp |
| 260 | string. Return nil if failed to get data. */ | 283 | string. Return nil if failed to get data. */ |
| 261 | 284 | ||
| 262 | static Lisp_Object | 285 | static Lisp_Object |
| 263 | get_scrap_string (scrap, type) | 286 | mac_get_selection_value (sel, target) |
| 264 | ScrapRef scrap; | 287 | Selection sel; |
| 265 | Lisp_Object type; | 288 | Lisp_Object target; |
| 266 | { | 289 | { |
| 267 | OSStatus err; | 290 | OSStatus err; |
| 268 | Lisp_Object result = Qnil; | 291 | Lisp_Object result = Qnil; |
| 269 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type); | 292 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (target, sel); |
| 270 | #if TARGET_API_MAC_CARBON | 293 | #if TARGET_API_MAC_CARBON |
| 271 | Size size; | 294 | Size size; |
| 272 | 295 | ||
| 273 | if (flavor_type) | 296 | if (flavor_type) |
| 274 | { | 297 | { |
| 275 | err = GetScrapFlavorSize (scrap, flavor_type, &size); | 298 | err = GetScrapFlavorSize (sel, flavor_type, &size); |
| 276 | if (err == noErr) | 299 | if (err == noErr) |
| 277 | { | 300 | { |
| 278 | do | 301 | do |
| 279 | { | 302 | { |
| 280 | result = make_uninit_string (size); | 303 | result = make_uninit_string (size); |
| 281 | err = GetScrapFlavorData (scrap, flavor_type, | 304 | err = GetScrapFlavorData (sel, flavor_type, |
| 282 | &size, SDATA (result)); | 305 | &size, SDATA (result)); |
| 283 | if (err != noErr) | 306 | if (err != noErr) |
| 284 | result = Qnil; | 307 | result = Qnil; |
| @@ -308,72 +331,25 @@ get_scrap_string (scrap, type) | |||
| 308 | return result; | 331 | return result; |
| 309 | } | 332 | } |
| 310 | 333 | ||
| 311 | /* Get timestamp from the scrap SCRAP and set to *TIMPSTAMP. */ | 334 | /* Get the list of target types in SEL. The return value is a list of |
| 312 | 335 | target type symbols possibly followed by scrap flavor type | |
| 313 | static OSStatus | ||
| 314 | get_scrap_private_timestamp (scrap, timestamp) | ||
| 315 | ScrapRef scrap; | ||
| 316 | unsigned long *timestamp; | ||
| 317 | { | ||
| 318 | OSStatus err = noErr; | ||
| 319 | #if TARGET_API_MAC_CARBON | ||
| 320 | ScrapFlavorFlags flags; | ||
| 321 | |||
| 322 | err = GetScrapFlavorFlags (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &flags); | ||
| 323 | if (err == noErr) | ||
| 324 | { | ||
| 325 | if (!(flags & kScrapFlavorMaskSenderOnly)) | ||
| 326 | err = noTypeErr; | ||
| 327 | else | ||
| 328 | { | ||
| 329 | Size size = sizeof (*timestamp); | ||
| 330 | |||
| 331 | err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, | ||
| 332 | &size, timestamp); | ||
| 333 | if (err == noErr && size != sizeof (*timestamp)) | ||
| 334 | err = noTypeErr; | ||
| 335 | } | ||
| 336 | } | ||
| 337 | #else /* !TARGET_API_MAC_CARBON */ | ||
| 338 | Handle handle; | ||
| 339 | SInt32 size, offset; | ||
| 340 | |||
| 341 | size = GetScrap (NULL, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &offset); | ||
| 342 | if (size == sizeof (*timestamp)) | ||
| 343 | { | ||
| 344 | handle = NewHandle (size); | ||
| 345 | HLock (handle); | ||
| 346 | size = GetScrap (handle, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &offset); | ||
| 347 | if (size == sizeof (*timestamp)) | ||
| 348 | *timestamp = *((unsigned long *) *handle); | ||
| 349 | DisposeHandle (handle); | ||
| 350 | } | ||
| 351 | if (size != sizeof (*timestamp)) | ||
| 352 | err = noTypeErr; | ||
| 353 | #endif /* !TARGET_API_MAC_CARBON */ | ||
| 354 | |||
| 355 | return err; | ||
| 356 | } | ||
| 357 | |||
| 358 | /* Get the list of target types in SCRAP. The return value is a list | ||
| 359 | of target type symbols possibly followed by scrap flavor type | ||
| 360 | strings. */ | 336 | strings. */ |
| 361 | 337 | ||
| 362 | static Lisp_Object | 338 | static Lisp_Object |
| 363 | get_scrap_target_type_list (scrap) | 339 | mac_get_selection_target_list (sel) |
| 364 | ScrapRef scrap; | 340 | Selection sel; |
| 365 | { | 341 | { |
| 366 | Lisp_Object result = Qnil, rest, target_type; | 342 | Lisp_Object result = Qnil, rest, target; |
| 367 | #if TARGET_API_MAC_CARBON | 343 | #if TARGET_API_MAC_CARBON |
| 368 | OSStatus err; | 344 | OSStatus err; |
| 369 | UInt32 count, i, type; | 345 | UInt32 count, i, type; |
| 370 | ScrapFlavorInfo *flavor_info = NULL; | 346 | ScrapFlavorInfo *flavor_info = NULL; |
| 371 | Lisp_Object strings = Qnil; | 347 | Lisp_Object strings = Qnil; |
| 372 | 348 | ||
| 373 | err = GetScrapFlavorCount (scrap, &count); | 349 | err = GetScrapFlavorCount (sel, &count); |
| 374 | if (err == noErr) | 350 | if (err == noErr) |
| 375 | flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); | 351 | flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); |
| 376 | err = GetScrapFlavorInfoList (scrap, &count, flavor_info); | 352 | err = GetScrapFlavorInfoList (sel, &count, flavor_info); |
| 377 | if (err != noErr) | 353 | if (err != noErr) |
| 378 | { | 354 | { |
| 379 | xfree (flavor_info); | 355 | xfree (flavor_info); |
| @@ -387,11 +363,11 @@ get_scrap_target_type_list (scrap) | |||
| 387 | ScrapFlavorType flavor_type = 0; | 363 | ScrapFlavorType flavor_type = 0; |
| 388 | 364 | ||
| 389 | if (CONSP (XCAR (rest)) | 365 | if (CONSP (XCAR (rest)) |
| 390 | && (target_type = XCAR (XCAR (rest)), | 366 | && (target = XCAR (XCAR (rest)), |
| 391 | SYMBOLP (target_type)) | 367 | SYMBOLP (target)) |
| 392 | && (flavor_type = scrap_has_target_type (scrap, target_type))) | 368 | && (flavor_type = get_flavor_type_from_symbol (target, sel))) |
| 393 | { | 369 | { |
| 394 | result = Fcons (target_type, result); | 370 | result = Fcons (target, result); |
| 395 | #if TARGET_API_MAC_CARBON | 371 | #if TARGET_API_MAC_CARBON |
| 396 | for (i = 0; i < count; i++) | 372 | for (i = 0; i < count; i++) |
| 397 | if (flavor_info[i].flavorType == flavor_type) | 373 | if (flavor_info[i].flavorType == flavor_type) |
| @@ -428,9 +404,9 @@ x_own_selection (selection_name, selection_value) | |||
| 428 | Lisp_Object selection_name, selection_value; | 404 | Lisp_Object selection_name, selection_value; |
| 429 | { | 405 | { |
| 430 | OSStatus err; | 406 | OSStatus err; |
| 431 | ScrapRef scrap; | 407 | Selection sel; |
| 432 | struct gcpro gcpro1, gcpro2; | 408 | struct gcpro gcpro1, gcpro2; |
| 433 | Lisp_Object rest, handler_fn, value, type; | 409 | Lisp_Object rest, handler_fn, value, target_type; |
| 434 | int count; | 410 | int count; |
| 435 | 411 | ||
| 436 | CHECK_SYMBOL (selection_name); | 412 | CHECK_SYMBOL (selection_name); |
| @@ -439,8 +415,8 @@ x_own_selection (selection_name, selection_value) | |||
| 439 | 415 | ||
| 440 | BLOCK_INPUT; | 416 | BLOCK_INPUT; |
| 441 | 417 | ||
| 442 | err = get_scrap_from_symbol (selection_name, 1, &scrap); | 418 | err = mac_get_selection_from_symbol (selection_name, 1, &sel); |
| 443 | if (err == noErr && scrap) | 419 | if (err == noErr && sel) |
| 444 | { | 420 | { |
| 445 | /* Don't allow a quit within the converter. | 421 | /* Don't allow a quit within the converter. |
| 446 | When the user types C-g, he would be surprised | 422 | When the user types C-g, he would be surprised |
| @@ -451,49 +427,56 @@ x_own_selection (selection_name, selection_value) | |||
| 451 | for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) | 427 | for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) |
| 452 | { | 428 | { |
| 453 | if (!(CONSP (XCAR (rest)) | 429 | if (!(CONSP (XCAR (rest)) |
| 454 | && (type = XCAR (XCAR (rest)), | 430 | && (target_type = XCAR (XCAR (rest)), |
| 455 | SYMBOLP (type)) | 431 | SYMBOLP (target_type)) |
| 456 | && valid_scrap_target_type_p (type) | 432 | && mac_valid_selection_target_p (target_type) |
| 457 | && (handler_fn = XCDR (XCAR (rest)), | 433 | && (handler_fn = XCDR (XCAR (rest)), |
| 458 | SYMBOLP (handler_fn)))) | 434 | SYMBOLP (handler_fn)))) |
| 459 | continue; | 435 | continue; |
| 460 | 436 | ||
| 461 | if (!NILP (handler_fn)) | 437 | if (!NILP (handler_fn)) |
| 462 | value = call3 (handler_fn, selection_name, | 438 | value = call3 (handler_fn, selection_name, |
| 463 | type, selection_value); | 439 | target_type, selection_value); |
| 440 | |||
| 441 | if (NILP (value)) | ||
| 442 | continue; | ||
| 464 | 443 | ||
| 465 | if (STRINGP (value)) | 444 | if (mac_valid_selection_value_p (value, target_type)) |
| 466 | err = put_scrap_string (scrap, type, value); | 445 | err = mac_put_selection_value (sel, target_type, value); |
| 467 | else if (CONSP (value) | 446 | else if (CONSP (value) |
| 468 | && EQ (XCAR (value), type) | 447 | && EQ (XCAR (value), target_type) |
| 469 | && STRINGP (XCDR (value))) | 448 | && mac_valid_selection_value_p (XCDR (value), target_type)) |
| 470 | err = put_scrap_string (scrap, type, XCDR (value)); | 449 | err = mac_put_selection_value (sel, target_type, XCDR (value)); |
| 471 | } | 450 | } |
| 472 | 451 | ||
| 473 | unbind_to (count, Qnil); | 452 | unbind_to (count, Qnil); |
| 474 | |||
| 475 | if (err == noErr) | ||
| 476 | err = put_scrap_private_timestamp (scrap, last_event_timestamp); | ||
| 477 | } | 453 | } |
| 478 | 454 | ||
| 479 | UNBLOCK_INPUT; | 455 | UNBLOCK_INPUT; |
| 480 | 456 | ||
| 481 | UNGCPRO; | 457 | UNGCPRO; |
| 482 | 458 | ||
| 483 | if (scrap && err != noErr) | 459 | if (sel && err != noErr) |
| 484 | error ("Can't set selection"); | 460 | error ("Can't set selection"); |
| 485 | 461 | ||
| 486 | /* Now update the local cache */ | 462 | /* Now update the local cache */ |
| 487 | { | 463 | { |
| 488 | Lisp_Object selection_time; | 464 | Lisp_Object selection_time; |
| 489 | Lisp_Object selection_data; | 465 | Lisp_Object selection_data; |
| 466 | Lisp_Object ownership_info; | ||
| 490 | Lisp_Object prev_value; | 467 | Lisp_Object prev_value; |
| 491 | 468 | ||
| 492 | selection_time = long_to_cons (last_event_timestamp); | 469 | selection_time = long_to_cons (last_event_timestamp); |
| 470 | if (sel) | ||
| 471 | ownership_info = mac_get_selection_ownership_info (sel); | ||
| 472 | else | ||
| 473 | ownership_info = Qnil; /* dummy value for local-only selection */ | ||
| 493 | selection_data = Fcons (selection_name, | 474 | selection_data = Fcons (selection_name, |
| 494 | Fcons (selection_value, | 475 | Fcons (selection_value, |
| 495 | Fcons (selection_time, | 476 | Fcons (selection_time, |
| 496 | Fcons (selected_frame, Qnil)))); | 477 | Fcons (selected_frame, |
| 478 | Fcons (ownership_info, | ||
| 479 | Qnil))))); | ||
| 497 | prev_value = assq_no_quit (selection_name, Vselection_alist); | 480 | prev_value = assq_no_quit (selection_name, Vselection_alist); |
| 498 | 481 | ||
| 499 | Vselection_alist = Fcons (selection_data, Vselection_alist); | 482 | Vselection_alist = Fcons (selection_data, Vselection_alist); |
| @@ -574,29 +557,20 @@ x_get_local_selection (selection_symbol, target_type, local_request) | |||
| 574 | unbind_to (count, Qnil); | 557 | unbind_to (count, Qnil); |
| 575 | } | 558 | } |
| 576 | 559 | ||
| 560 | if (local_request) | ||
| 561 | return value; | ||
| 562 | |||
| 577 | /* Make sure this value is of a type that we could transmit | 563 | /* Make sure this value is of a type that we could transmit |
| 578 | to another X client. */ | 564 | to another application. */ |
| 579 | 565 | ||
| 566 | type = target_type; | ||
| 580 | check = value; | 567 | check = value; |
| 581 | if (CONSP (value) | 568 | if (CONSP (value) |
| 582 | && SYMBOLP (XCAR (value))) | 569 | && SYMBOLP (XCAR (value))) |
| 583 | type = XCAR (value), | 570 | type = XCAR (value), |
| 584 | check = XCDR (value); | 571 | check = XCDR (value); |
| 585 | 572 | ||
| 586 | if (STRINGP (check) | 573 | if (NILP (value) || mac_valid_selection_value_p (check, type)) |
| 587 | || VECTORP (check) | ||
| 588 | || SYMBOLP (check) | ||
| 589 | || INTEGERP (check) | ||
| 590 | || NILP (value)) | ||
| 591 | return value; | ||
| 592 | /* Check for a value that cons_to_long could handle. */ | ||
| 593 | else if (CONSP (check) | ||
| 594 | && INTEGERP (XCAR (check)) | ||
| 595 | && (INTEGERP (XCDR (check)) | ||
| 596 | || | ||
| 597 | (CONSP (XCDR (check)) | ||
| 598 | && INTEGERP (XCAR (XCDR (check))) | ||
| 599 | && NILP (XCDR (XCDR (check)))))) | ||
| 600 | return value; | 574 | return value; |
| 601 | 575 | ||
| 602 | signal_error ("Invalid data returned by selection-conversion function", | 576 | signal_error ("Invalid data returned by selection-conversion function", |
| @@ -676,22 +650,22 @@ x_get_foreign_selection (selection_symbol, target_type, time_stamp) | |||
| 676 | Lisp_Object selection_symbol, target_type, time_stamp; | 650 | Lisp_Object selection_symbol, target_type, time_stamp; |
| 677 | { | 651 | { |
| 678 | OSStatus err; | 652 | OSStatus err; |
| 679 | ScrapRef scrap; | 653 | Selection sel; |
| 680 | Lisp_Object result = Qnil; | 654 | Lisp_Object result = Qnil; |
| 681 | 655 | ||
| 682 | BLOCK_INPUT; | 656 | BLOCK_INPUT; |
| 683 | 657 | ||
| 684 | err = get_scrap_from_symbol (selection_symbol, 0, &scrap); | 658 | err = mac_get_selection_from_symbol (selection_symbol, 0, &sel); |
| 685 | if (err == noErr && scrap) | 659 | if (err == noErr && sel) |
| 686 | { | 660 | { |
| 687 | if (EQ (target_type, QTARGETS)) | 661 | if (EQ (target_type, QTARGETS)) |
| 688 | { | 662 | { |
| 689 | result = get_scrap_target_type_list (scrap); | 663 | result = mac_get_selection_target_list (sel); |
| 690 | result = Fvconcat (1, &result); | 664 | result = Fvconcat (1, &result); |
| 691 | } | 665 | } |
| 692 | else | 666 | else |
| 693 | { | 667 | { |
| 694 | result = get_scrap_string (scrap, target_type); | 668 | result = mac_get_selection_value (sel, target_type); |
| 695 | if (STRINGP (result)) | 669 | if (STRINGP (result)) |
| 696 | Fput_text_property (make_number (0), make_number (SBYTES (result)), | 670 | Fput_text_property (make_number (0), make_number (SBYTES (result)), |
| 697 | Qforeign_selection, target_type, result); | 671 | Qforeign_selection, target_type, result); |
| @@ -770,7 +744,7 @@ Disowning it means there is no such selection. */) | |||
| 770 | Lisp_Object time; | 744 | Lisp_Object time; |
| 771 | { | 745 | { |
| 772 | OSStatus err; | 746 | OSStatus err; |
| 773 | ScrapRef scrap; | 747 | Selection sel; |
| 774 | Lisp_Object local_selection_data; | 748 | Lisp_Object local_selection_data; |
| 775 | 749 | ||
| 776 | check_mac (); | 750 | check_mac (); |
| @@ -812,9 +786,9 @@ Disowning it means there is no such selection. */) | |||
| 812 | 786 | ||
| 813 | BLOCK_INPUT; | 787 | BLOCK_INPUT; |
| 814 | 788 | ||
| 815 | err = get_scrap_from_symbol (selection, 0, &scrap); | 789 | err = mac_get_selection_from_symbol (selection, 0, &sel); |
| 816 | if (err == noErr && scrap) | 790 | if (err == noErr && sel) |
| 817 | clear_scrap (&scrap); | 791 | mac_clear_selection (&sel); |
| 818 | 792 | ||
| 819 | UNBLOCK_INPUT; | 793 | UNBLOCK_INPUT; |
| 820 | 794 | ||
| @@ -833,7 +807,7 @@ and t is the same as `SECONDARY'. */) | |||
| 833 | Lisp_Object selection; | 807 | Lisp_Object selection; |
| 834 | { | 808 | { |
| 835 | OSStatus err; | 809 | OSStatus err; |
| 836 | ScrapRef scrap; | 810 | Selection sel; |
| 837 | Lisp_Object result = Qnil, local_selection_data; | 811 | Lisp_Object result = Qnil, local_selection_data; |
| 838 | 812 | ||
| 839 | check_mac (); | 813 | check_mac (); |
| @@ -848,15 +822,14 @@ and t is the same as `SECONDARY'. */) | |||
| 848 | 822 | ||
| 849 | BLOCK_INPUT; | 823 | BLOCK_INPUT; |
| 850 | 824 | ||
| 851 | err = get_scrap_from_symbol (selection, 0, &scrap); | 825 | err = mac_get_selection_from_symbol (selection, 0, &sel); |
| 852 | if (err == noErr && scrap) | 826 | if (err == noErr && sel) |
| 853 | { | 827 | { |
| 854 | unsigned long timestamp; | 828 | Lisp_Object ownership_info; |
| 855 | 829 | ||
| 856 | err = get_scrap_private_timestamp (scrap, ×tamp); | 830 | ownership_info = XCAR (XCDR (XCDR (XCDR (XCDR (local_selection_data))))); |
| 857 | if (err == noErr | 831 | if (!NILP (Fequal (ownership_info, |
| 858 | && (timestamp | 832 | mac_get_selection_ownership_info (sel)))) |
| 859 | == cons_to_long (XCAR (XCDR (XCDR (local_selection_data)))))) | ||
| 860 | result = Qt; | 833 | result = Qt; |
| 861 | } | 834 | } |
| 862 | else | 835 | else |
| @@ -878,7 +851,7 @@ and t is the same as `SECONDARY'. */) | |||
| 878 | Lisp_Object selection; | 851 | Lisp_Object selection; |
| 879 | { | 852 | { |
| 880 | OSStatus err; | 853 | OSStatus err; |
| 881 | ScrapRef scrap; | 854 | Selection sel; |
| 882 | Lisp_Object result = Qnil, rest; | 855 | Lisp_Object result = Qnil, rest; |
| 883 | 856 | ||
| 884 | /* It should be safe to call this before we have an Mac frame. */ | 857 | /* It should be safe to call this before we have an Mac frame. */ |
| @@ -893,12 +866,12 @@ and t is the same as `SECONDARY'. */) | |||
| 893 | 866 | ||
| 894 | BLOCK_INPUT; | 867 | BLOCK_INPUT; |
| 895 | 868 | ||
| 896 | err = get_scrap_from_symbol (selection, 0, &scrap); | 869 | err = mac_get_selection_from_symbol (selection, 0, &sel); |
| 897 | if (err == noErr && scrap) | 870 | if (err == noErr && sel) |
| 898 | for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) | 871 | for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) |
| 899 | { | 872 | { |
| 900 | if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) | 873 | if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) |
| 901 | && scrap_has_target_type (scrap, XCAR (XCAR (rest)))) | 874 | && mac_selection_has_target_p (sel, XCAR (XCAR (rest)))) |
| 902 | { | 875 | { |
| 903 | result = Qt; | 876 | result = Qt; |
| 904 | break; | 877 | break; |
| @@ -1700,7 +1673,7 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1700 | if (!SYMBOLP (Vmac_service_selection)) | 1673 | if (!SYMBOLP (Vmac_service_selection)) |
| 1701 | err = eventNotHandledErr; | 1674 | err = eventNotHandledErr; |
| 1702 | else | 1675 | else |
| 1703 | err = get_scrap_from_symbol (Vmac_service_selection, 0, &cur_scrap); | 1676 | err = mac_get_selection_from_symbol (Vmac_service_selection, 0, &cur_scrap); |
| 1704 | if (!(err == noErr && cur_scrap)) | 1677 | if (!(err == noErr && cur_scrap)) |
| 1705 | return eventNotHandledErr; | 1678 | return eventNotHandledErr; |
| 1706 | 1679 | ||
| @@ -1719,7 +1692,7 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1719 | rest = XCDR (rest)) | 1692 | rest = XCDR (rest)) |
| 1720 | if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) | 1693 | if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) |
| 1721 | && (flavor_type = | 1694 | && (flavor_type = |
| 1722 | get_flavor_type_from_symbol (XCAR (XCAR (rest))))) | 1695 | get_flavor_type_from_symbol (XCAR (XCAR (rest)), 0))) |
| 1723 | { | 1696 | { |
| 1724 | type = CreateTypeStringWithOSType (flavor_type); | 1697 | type = CreateTypeStringWithOSType (flavor_type); |
| 1725 | if (type) | 1698 | if (type) |
| @@ -1804,14 +1777,15 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1804 | NULL, sizeof (ScrapRef), NULL, | 1777 | NULL, sizeof (ScrapRef), NULL, |
| 1805 | &specific_scrap); | 1778 | &specific_scrap); |
| 1806 | if (err == noErr) | 1779 | if (err == noErr) |
| 1807 | err = clear_scrap (&cur_scrap); | 1780 | err = mac_clear_selection (&cur_scrap); |
| 1808 | if (err == noErr) | 1781 | if (err == noErr) |
| 1809 | for (rest = Vselection_converter_alist; CONSP (rest); | 1782 | for (rest = Vselection_converter_alist; CONSP (rest); |
| 1810 | rest = XCDR (rest)) | 1783 | rest = XCDR (rest)) |
| 1811 | { | 1784 | { |
| 1812 | if (! (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))))) | 1785 | if (! (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))))) |
| 1813 | continue; | 1786 | continue; |
| 1814 | flavor_type = get_flavor_type_from_symbol (XCAR (XCAR (rest))); | 1787 | flavor_type = get_flavor_type_from_symbol (XCAR (XCAR (rest)), |
| 1788 | specific_scrap); | ||
| 1815 | if (flavor_type == 0) | 1789 | if (flavor_type == 0) |
| 1816 | continue; | 1790 | continue; |
| 1817 | err = copy_scrap_flavor_data (specific_scrap, cur_scrap, | 1791 | err = copy_scrap_flavor_data (specific_scrap, cur_scrap, |
diff --git a/src/macterm.c b/src/macterm.c index 5643372845b..31f3cfbdcd7 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -4329,14 +4329,6 @@ static void | |||
| 4329 | frame_highlight (f) | 4329 | frame_highlight (f) |
| 4330 | struct frame *f; | 4330 | struct frame *f; |
| 4331 | { | 4331 | { |
| 4332 | OSErr err; | ||
| 4333 | ControlRef root_control; | ||
| 4334 | |||
| 4335 | BLOCK_INPUT; | ||
| 4336 | err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control); | ||
| 4337 | if (err == noErr) | ||
| 4338 | ActivateControl (root_control); | ||
| 4339 | UNBLOCK_INPUT; | ||
| 4340 | x_update_cursor (f, 1); | 4332 | x_update_cursor (f, 1); |
| 4341 | } | 4333 | } |
| 4342 | 4334 | ||
| @@ -4344,14 +4336,6 @@ static void | |||
| 4344 | frame_unhighlight (f) | 4336 | frame_unhighlight (f) |
| 4345 | struct frame *f; | 4337 | struct frame *f; |
| 4346 | { | 4338 | { |
| 4347 | OSErr err; | ||
| 4348 | ControlRef root_control; | ||
| 4349 | |||
| 4350 | BLOCK_INPUT; | ||
| 4351 | err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control); | ||
| 4352 | if (err == noErr) | ||
| 4353 | DeactivateControl (root_control); | ||
| 4354 | UNBLOCK_INPUT; | ||
| 4355 | x_update_cursor (f, 1); | 4339 | x_update_cursor (f, 1); |
| 4356 | } | 4340 | } |
| 4357 | 4341 | ||
| @@ -6109,7 +6093,9 @@ free_frame_tool_bar (f) | |||
| 6109 | 6093 | ||
| 6110 | BLOCK_INPUT; | 6094 | BLOCK_INPUT; |
| 6111 | ShowHideWindowToolbar (FRAME_MAC_WINDOW (f), false, | 6095 | ShowHideWindowToolbar (FRAME_MAC_WINDOW (f), false, |
| 6112 | f == mac_focus_frame (dpyinfo)); | 6096 | (NILP (Fsymbol_value |
| 6097 | (intern ("frame-notice-user-settings"))) | ||
| 6098 | && f == mac_focus_frame (dpyinfo))); | ||
| 6113 | /* Mac OS X 10.3 does not issue kEventWindowBoundsChanged events | 6099 | /* Mac OS X 10.3 does not issue kEventWindowBoundsChanged events |
| 6114 | on toolbar visibility change. */ | 6100 | on toolbar visibility change. */ |
| 6115 | mac_handle_origin_change (f); | 6101 | mac_handle_origin_change (f); |
| @@ -9386,11 +9372,13 @@ mac_handle_font_event (next_handler, event, data) | |||
| 9386 | static const EventParamName names_sel[] = {kEventParamATSUFontID, | 9372 | static const EventParamName names_sel[] = {kEventParamATSUFontID, |
| 9387 | kEventParamATSUFontSize, | 9373 | kEventParamATSUFontSize, |
| 9388 | kEventParamFMFontFamily, | 9374 | kEventParamFMFontFamily, |
| 9375 | kEventParamFMFontStyle, | ||
| 9389 | kEventParamFMFontSize, | 9376 | kEventParamFMFontSize, |
| 9390 | kEventParamFontColor}; | 9377 | kEventParamFontColor}; |
| 9391 | static const EventParamType types_sel[] = {typeATSUFontID, | 9378 | static const EventParamType types_sel[] = {typeATSUFontID, |
| 9392 | typeATSUSize, | 9379 | typeATSUSize, |
| 9393 | typeFMFontFamily, | 9380 | typeFMFontFamily, |
| 9381 | typeFMFontStyle, | ||
| 9394 | typeFMFontSize, | 9382 | typeFMFontSize, |
| 9395 | typeFontColor}; | 9383 | typeFontColor}; |
| 9396 | 9384 | ||
| @@ -10711,7 +10699,7 @@ mac_handle_window_event (next_handler, event, data) | |||
| 10711 | { | 10699 | { |
| 10712 | struct frame *sf = SELECTED_FRAME (); | 10700 | struct frame *sf = SELECTED_FRAME (); |
| 10713 | 10701 | ||
| 10714 | if (!(FRAME_MAC_P (sf))) | 10702 | if (!(FRAME_MAC_P (sf) && sf->async_visible)) |
| 10715 | RepositionWindow (wp, NULL, kWindowCenterOnMainScreen); | 10703 | RepositionWindow (wp, NULL, kWindowCenterOnMainScreen); |
| 10716 | else | 10704 | else |
| 10717 | { | 10705 | { |
| @@ -10726,8 +10714,11 @@ mac_handle_window_event (next_handler, event, data) | |||
| 10726 | /* This is a workaround. RepositionWindow fails to put | 10714 | /* This is a workaround. RepositionWindow fails to put |
| 10727 | a window at the cascading position when its parent | 10715 | a window at the cascading position when its parent |
| 10728 | window has a Carbon HIToolbar. */ | 10716 | window has a Carbon HIToolbar. */ |
| 10729 | if (f->top_pos == sf->top_pos && f->left_pos == sf->left_pos) | 10717 | if ((f->left_pos == sf->left_pos |
| 10730 | MoveWindowStructure (wp, f->left_pos + 10, f->top_pos + 32); | 10718 | && f->top_pos == sf->top_pos) |
| 10719 | || (f->left_pos == sf->left_pos + 10 * 2 | ||
| 10720 | && f->top_pos == sf->top_pos + 32 * 2)) | ||
| 10721 | MoveWindowStructure (wp, sf->left_pos + 10, sf->top_pos + 32); | ||
| 10731 | #endif | 10722 | #endif |
| 10732 | } | 10723 | } |
| 10733 | result = noErr; | 10724 | result = noErr; |
| @@ -10952,7 +10943,7 @@ mac_handle_keyboard_event (next_handler, event, data) | |||
| 10952 | void *data; | 10943 | void *data; |
| 10953 | { | 10944 | { |
| 10954 | OSStatus err, result = eventNotHandledErr; | 10945 | OSStatus err, result = eventNotHandledErr; |
| 10955 | UInt32 event_kind, key_code, modifiers, mapped_modifiers; | 10946 | UInt32 event_kind, key_code, modifiers; |
| 10956 | unsigned char char_code; | 10947 | unsigned char char_code; |
| 10957 | 10948 | ||
| 10958 | event_kind = GetEventKind (event); | 10949 | event_kind = GetEventKind (event); |
| @@ -10961,32 +10952,16 @@ mac_handle_keyboard_event (next_handler, event, data) | |||
| 10961 | case kEventRawKeyDown: | 10952 | case kEventRawKeyDown: |
| 10962 | case kEventRawKeyRepeat: | 10953 | case kEventRawKeyRepeat: |
| 10963 | case kEventRawKeyUp: | 10954 | case kEventRawKeyUp: |
| 10964 | if (read_socket_inev == NULL) | ||
| 10965 | { | ||
| 10966 | result = CallNextEventHandler (next_handler, event); | ||
| 10967 | break; | ||
| 10968 | } | ||
| 10969 | |||
| 10970 | err = GetEventParameter (event, kEventParamKeyModifiers, | ||
| 10971 | typeUInt32, NULL, | ||
| 10972 | sizeof (UInt32), NULL, &modifiers); | ||
| 10973 | if (err != noErr) | ||
| 10974 | break; | ||
| 10975 | |||
| 10976 | mapped_modifiers = mac_mapped_modifiers (modifiers); | ||
| 10977 | |||
| 10978 | /* When using Carbon Events, we need to pass raw keyboard events | 10955 | /* When using Carbon Events, we need to pass raw keyboard events |
| 10979 | to the TSM ourselves. If TSM handles it, it will pass back | 10956 | to the TSM ourselves. If TSM handles it, it will pass back |
| 10980 | noErr, otherwise it will pass back "eventNotHandledErr" and | 10957 | noErr, otherwise it will pass back "eventNotHandledErr" and |
| 10981 | we can process it normally. */ | 10958 | we can process it normally. */ |
| 10982 | if (!(mapped_modifiers | 10959 | result = CallNextEventHandler (next_handler, event); |
| 10983 | & ~(mac_pass_command_to_system ? cmdKey : 0) | 10960 | if (result != eventNotHandledErr) |
| 10984 | & ~(mac_pass_control_to_system ? controlKey : 0))) | 10961 | break; |
| 10985 | { | 10962 | |
| 10986 | result = CallNextEventHandler (next_handler, event); | 10963 | if (read_socket_inev == NULL) |
| 10987 | if (result != eventNotHandledErr) | 10964 | break; |
| 10988 | break; | ||
| 10989 | } | ||
| 10990 | 10965 | ||
| 10991 | #if USE_MAC_TSM | 10966 | #if USE_MAC_TSM |
| 10992 | if (read_socket_inev->kind != NO_EVENT) | 10967 | if (read_socket_inev->kind != NO_EVENT) |
| @@ -11011,6 +10986,12 @@ mac_handle_keyboard_event (next_handler, event, data) | |||
| 11011 | if (err != noErr) | 10986 | if (err != noErr) |
| 11012 | break; | 10987 | break; |
| 11013 | 10988 | ||
| 10989 | err = GetEventParameter (event, kEventParamKeyModifiers, | ||
| 10990 | typeUInt32, NULL, | ||
| 10991 | sizeof (UInt32), NULL, &modifiers); | ||
| 10992 | if (err != noErr) | ||
| 10993 | break; | ||
| 10994 | |||
| 11014 | do_keystroke ((event_kind == kEventRawKeyDown ? keyDown : autoKey), | 10995 | do_keystroke ((event_kind == kEventRawKeyDown ? keyDown : autoKey), |
| 11015 | char_code, key_code, modifiers, | 10996 | char_code, key_code, modifiers, |
| 11016 | ((unsigned long) | 10997 | ((unsigned long) |
| @@ -12157,7 +12138,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12157 | /* Window will be selected only when it is | 12138 | /* Window will be selected only when it is |
| 12158 | not selected now and last mouse movement | 12139 | not selected now and last mouse movement |
| 12159 | event was not in it. Minibuffer window | 12140 | event was not in it. Minibuffer window |
| 12160 | will be selected iff it is active. */ | 12141 | will be selected only when it is active. */ |
| 12161 | if (WINDOWP (window) | 12142 | if (WINDOWP (window) |
| 12162 | && !EQ (window, last_window) | 12143 | && !EQ (window, last_window) |
| 12163 | && !EQ (window, selected_window)) | 12144 | && !EQ (window, selected_window)) |
| @@ -12192,6 +12173,8 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12192 | case activateEvt: | 12173 | case activateEvt: |
| 12193 | { | 12174 | { |
| 12194 | WindowRef window_ptr = (WindowRef) er.message; | 12175 | WindowRef window_ptr = (WindowRef) er.message; |
| 12176 | OSErr err; | ||
| 12177 | ControlRef root_control; | ||
| 12195 | 12178 | ||
| 12196 | if (window_ptr == tip_window) | 12179 | if (window_ptr == tip_window) |
| 12197 | { | 12180 | { |
| @@ -12209,6 +12192,10 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12209 | /* A window has been activated */ | 12192 | /* A window has been activated */ |
| 12210 | Point mouse_loc; | 12193 | Point mouse_loc; |
| 12211 | 12194 | ||
| 12195 | err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control); | ||
| 12196 | if (err == noErr) | ||
| 12197 | ActivateControl (root_control); | ||
| 12198 | |||
| 12212 | x_detect_focus_change (dpyinfo, &er, &inev); | 12199 | x_detect_focus_change (dpyinfo, &er, &inev); |
| 12213 | 12200 | ||
| 12214 | mouse_loc.h = (er.where.h | 12201 | mouse_loc.h = (er.where.h |
| @@ -12224,6 +12211,10 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12224 | else | 12211 | else |
| 12225 | { | 12212 | { |
| 12226 | /* A window has been deactivated */ | 12213 | /* A window has been deactivated */ |
| 12214 | err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control); | ||
| 12215 | if (err == noErr) | ||
| 12216 | DeactivateControl (root_control); | ||
| 12217 | |||
| 12227 | #ifdef USE_TOOLKIT_SCROLL_BARS | 12218 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 12228 | if (dpyinfo->grabbed && tracked_scroll_bar) | 12219 | if (dpyinfo->grabbed && tracked_scroll_bar) |
| 12229 | { | 12220 | { |
| @@ -12279,13 +12270,29 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12279 | clear_mouse_face (dpyinfo); | 12270 | clear_mouse_face (dpyinfo); |
| 12280 | dpyinfo->mouse_face_hidden = 1; | 12271 | dpyinfo->mouse_face_hidden = 1; |
| 12281 | } | 12272 | } |
| 12273 | |||
| 12274 | { | ||
| 12275 | UInt32 modifiers = er.modifiers, mapped_modifiers; | ||
| 12276 | |||
| 12277 | #ifdef MAC_OSX | ||
| 12278 | GetEventParameter (eventRef, kEventParamKeyModifiers, | ||
| 12279 | typeUInt32, NULL, | ||
| 12280 | sizeof (UInt32), NULL, &modifiers); | ||
| 12281 | #endif | ||
| 12282 | mapped_modifiers = mac_mapped_modifiers (modifiers); | ||
| 12283 | |||
| 12282 | #if TARGET_API_MAC_CARBON | 12284 | #if TARGET_API_MAC_CARBON |
| 12283 | goto OTHER; | 12285 | if (!(mapped_modifiers |
| 12284 | #else | 12286 | & ~(mac_pass_command_to_system ? cmdKey : 0) |
| 12285 | do_keystroke (er.what, er.message & charCodeMask, | 12287 | & ~(mac_pass_control_to_system ? controlKey : 0))) |
| 12286 | (er.message & keyCodeMask) >> 8, | 12288 | goto OTHER; |
| 12287 | er.modifiers, timestamp, &inev); | 12289 | else |
| 12288 | #endif | 12290 | #endif |
| 12291 | if (er.what != keyUp) | ||
| 12292 | do_keystroke (er.what, er.message & charCodeMask, | ||
| 12293 | (er.message & keyCodeMask) >> 8, | ||
| 12294 | modifiers, timestamp, &inev); | ||
| 12295 | } | ||
| 12289 | break; | 12296 | break; |
| 12290 | 12297 | ||
| 12291 | case kHighLevelEvent: | 12298 | case kHighLevelEvent: |
| @@ -12339,7 +12346,6 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12339 | } | 12346 | } |
| 12340 | count++; | 12347 | count++; |
| 12341 | } | 12348 | } |
| 12342 | |||
| 12343 | } | 12349 | } |
| 12344 | 12350 | ||
| 12345 | /* If the focus was just given to an autoraising frame, | 12351 | /* If the focus was just given to an autoraising frame, |
diff --git a/src/macterm.h b/src/macterm.h index d0d5d58e65e..9df9b1abcdb 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -153,7 +153,7 @@ struct mac_display_info | |||
| 153 | char *mac_id_name; | 153 | char *mac_id_name; |
| 154 | 154 | ||
| 155 | /* The number of fonts actually stored in the font table. | 155 | /* The number of fonts actually stored in the font table. |
| 156 | font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <= | 156 | font_table[n] is used and valid if 0 <= n < n_fonts. 0 <= |
| 157 | n_fonts <= font_table_size and font_table[i].name != 0. */ | 157 | n_fonts <= font_table_size and font_table[i].name != 0. */ |
| 158 | int n_fonts; | 158 | int n_fonts; |
| 159 | 159 | ||
diff --git a/src/msdos.c b/src/msdos.c index fd4f211b2f6..fc14be2705c 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -3231,7 +3231,7 @@ dos_rawgetc () | |||
| 3231 | `dos_get_modifiers', they might have already released the | 3231 | `dos_get_modifiers', they might have already released the |
| 3232 | Alt key, and Emacs gets just `x', which is BAD. | 3232 | Alt key, and Emacs gets just `x', which is BAD. |
| 3233 | However, for keys with the `Map' property set, the ASCII | 3233 | However, for keys with the `Map' property set, the ASCII |
| 3234 | code returns zero iff Alt is pressed. So, when we DON'T | 3234 | code returns zero only if Alt is pressed. So, when we DON'T |
| 3235 | have to support international_keyboard, we don't have to | 3235 | have to support international_keyboard, we don't have to |
| 3236 | distinguish between the left and right Alt keys, and we | 3236 | distinguish between the left and right Alt keys, and we |
| 3237 | can set the META modifier for any keys with the `Map' | 3237 | can set the META modifier for any keys with the `Map' |
diff --git a/src/print.c b/src/print.c index 8b3aaaa1ee9..cd3d6438bff 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -93,8 +93,8 @@ Lisp_Object Vfloat_output_format, Qfloat_output_format; | |||
| 93 | /* Avoid actual stack overflow in print. */ | 93 | /* Avoid actual stack overflow in print. */ |
| 94 | int print_depth; | 94 | int print_depth; |
| 95 | 95 | ||
| 96 | /* Nonzero if inside outputting backquote in old style. */ | 96 | /* Level of nesting inside outputting backquote in new style. */ |
| 97 | int old_backquote_output; | 97 | int new_backquote_output; |
| 98 | 98 | ||
| 99 | /* Detect most circularities to print finite output. */ | 99 | /* Detect most circularities to print finite output. */ |
| 100 | #define PRINT_CIRCLE 200 | 100 | #define PRINT_CIRCLE 200 |
| @@ -1291,7 +1291,7 @@ print (obj, printcharfun, escapeflag) | |||
| 1291 | register Lisp_Object printcharfun; | 1291 | register Lisp_Object printcharfun; |
| 1292 | int escapeflag; | 1292 | int escapeflag; |
| 1293 | { | 1293 | { |
| 1294 | old_backquote_output = 0; | 1294 | new_backquote_output = 0; |
| 1295 | 1295 | ||
| 1296 | /* Reset print_number_index and Vprint_number_table only when | 1296 | /* Reset print_number_index and Vprint_number_table only when |
| 1297 | the variable Vprint_continuous_numbering is nil. Otherwise, | 1297 | the variable Vprint_continuous_numbering is nil. Otherwise, |
| @@ -1756,14 +1756,24 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1756 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); | 1756 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); |
| 1757 | } | 1757 | } |
| 1758 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) | 1758 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) |
| 1759 | && ! old_backquote_output | 1759 | && ((EQ (XCAR (obj), Qbackquote)))) |
| 1760 | { | ||
| 1761 | print_object (XCAR (obj), printcharfun, 0); | ||
| 1762 | new_backquote_output++; | ||
| 1763 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); | ||
| 1764 | new_backquote_output--; | ||
| 1765 | } | ||
| 1766 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) | ||
| 1767 | && new_backquote_output | ||
| 1760 | && ((EQ (XCAR (obj), Qbackquote) | 1768 | && ((EQ (XCAR (obj), Qbackquote) |
| 1761 | || EQ (XCAR (obj), Qcomma) | 1769 | || EQ (XCAR (obj), Qcomma) |
| 1762 | || EQ (XCAR (obj), Qcomma_at) | 1770 | || EQ (XCAR (obj), Qcomma_at) |
| 1763 | || EQ (XCAR (obj), Qcomma_dot)))) | 1771 | || EQ (XCAR (obj), Qcomma_dot)))) |
| 1764 | { | 1772 | { |
| 1765 | print_object (XCAR (obj), printcharfun, 0); | 1773 | print_object (XCAR (obj), printcharfun, 0); |
| 1774 | new_backquote_output--; | ||
| 1766 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); | 1775 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); |
| 1776 | new_backquote_output++; | ||
| 1767 | } | 1777 | } |
| 1768 | else | 1778 | else |
| 1769 | { | 1779 | { |
| @@ -1783,9 +1793,7 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1783 | print_object (Qbackquote, printcharfun, 0); | 1793 | print_object (Qbackquote, printcharfun, 0); |
| 1784 | PRINTCHAR (' '); | 1794 | PRINTCHAR (' '); |
| 1785 | 1795 | ||
| 1786 | ++old_backquote_output; | ||
| 1787 | print_object (XCAR (XCDR (tem)), printcharfun, 0); | 1796 | print_object (XCAR (XCDR (tem)), printcharfun, 0); |
| 1788 | --old_backquote_output; | ||
| 1789 | PRINTCHAR (')'); | 1797 | PRINTCHAR (')'); |
| 1790 | 1798 | ||
| 1791 | obj = XCDR (obj); | 1799 | obj = XCDR (obj); |
diff --git a/src/process.c b/src/process.c index 43609266112..dfb97b8d615 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2780,7 +2780,7 @@ The stopped state is cleared by `continue-process' and set by | |||
| 2780 | 2780 | ||
| 2781 | :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the | 2781 | :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the |
| 2782 | process filter are multibyte, otherwise they are unibyte. | 2782 | process filter are multibyte, otherwise they are unibyte. |
| 2783 | If this keyword is not specified, the strings are multibyte iff | 2783 | If this keyword is not specified, the strings are multibyte if |
| 2784 | `default-enable-multibyte-characters' is non-nil. | 2784 | `default-enable-multibyte-characters' is non-nil. |
| 2785 | 2785 | ||
| 2786 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. | 2786 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. |
| @@ -3922,7 +3922,7 @@ it specifies a fractional number of seconds to wait. | |||
| 3922 | If optional fourth arg JUST-THIS-ONE is non-nil, only accept output | 3922 | If optional fourth arg JUST-THIS-ONE is non-nil, only accept output |
| 3923 | from PROCESS, suspending reading output from other processes. | 3923 | from PROCESS, suspending reading output from other processes. |
| 3924 | If JUST-THIS-ONE is an integer, don't run any timers either. | 3924 | If JUST-THIS-ONE is an integer, don't run any timers either. |
| 3925 | Return non-nil iff we received any output before the timeout expired. */) | 3925 | Return non-nil if we received any output before the timeout expired. */) |
| 3926 | (process, seconds, millisec, just_this_one) | 3926 | (process, seconds, millisec, just_this_one) |
| 3927 | register Lisp_Object process, seconds, millisec, just_this_one; | 3927 | register Lisp_Object process, seconds, millisec, just_this_one; |
| 3928 | { | 3928 | { |
| @@ -4254,16 +4254,16 @@ select_wrapper (n, rfd, wfd, xfd, tmo) | |||
| 4254 | (and gobble terminal input into the buffer if any arrives). | 4254 | (and gobble terminal input into the buffer if any arrives). |
| 4255 | 4255 | ||
| 4256 | If WAIT_PROC is specified, wait until something arrives from that | 4256 | If WAIT_PROC is specified, wait until something arrives from that |
| 4257 | process. The return value is true iff we read some input from | 4257 | process. The return value is true if we read some input from |
| 4258 | that process. | 4258 | that process. |
| 4259 | 4259 | ||
| 4260 | If JUST_WAIT_PROC is non-nil, handle only output from WAIT_PROC | 4260 | If JUST_WAIT_PROC is non-nil, handle only output from WAIT_PROC |
| 4261 | (suspending output from other processes). A negative value | 4261 | (suspending output from other processes). A negative value |
| 4262 | means don't run any timers either. | 4262 | means don't run any timers either. |
| 4263 | 4263 | ||
| 4264 | If WAIT_PROC is specified, then the function returns true iff we | 4264 | If WAIT_PROC is specified, then the function returns true if we |
| 4265 | received input from that process before the timeout elapsed. | 4265 | received input from that process before the timeout elapsed. |
| 4266 | Otherwise, return true iff we received input from any process. */ | 4266 | Otherwise, return true if we received input from any process. */ |
| 4267 | 4267 | ||
| 4268 | int | 4268 | int |
| 4269 | wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, | 4269 | wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, |
| @@ -7358,7 +7358,7 @@ Lisp_Object QCtype; | |||
| 7358 | do_display != 0 means redisplay should be done to show subprocess | 7358 | do_display != 0 means redisplay should be done to show subprocess |
| 7359 | output that arrives. | 7359 | output that arrives. |
| 7360 | 7360 | ||
| 7361 | Return true iff we received input from any process. */ | 7361 | Return true if we received input from any process. */ |
| 7362 | 7362 | ||
| 7363 | int | 7363 | int |
| 7364 | wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, | 7364 | wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, |
diff --git a/src/process.h b/src/process.h index 79875564766..eaed95fe4b7 100644 --- a/src/process.h +++ b/src/process.h | |||
| @@ -138,7 +138,7 @@ extern Lisp_Object chan_process[]; | |||
| 138 | /* Alist of elements (NAME . PROCESS). */ | 138 | /* Alist of elements (NAME . PROCESS). */ |
| 139 | extern Lisp_Object Vprocess_alist; | 139 | extern Lisp_Object Vprocess_alist; |
| 140 | 140 | ||
| 141 | /* True iff we are about to fork off a synchronous process or if we | 141 | /* True if we are about to fork off a synchronous process or if we |
| 142 | are waiting for it. */ | 142 | are waiting for it. */ |
| 143 | extern int synch_process_alive; | 143 | extern int synch_process_alive; |
| 144 | 144 | ||
diff --git a/src/regex.c b/src/regex.c index 64bfef15c4e..66b84c9dfc2 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -2048,7 +2048,7 @@ re_wctype (str) | |||
| 2048 | else return 0; | 2048 | else return 0; |
| 2049 | } | 2049 | } |
| 2050 | 2050 | ||
| 2051 | /* True iff CH is in the char class CC. */ | 2051 | /* True if CH is in the char class CC. */ |
| 2052 | boolean | 2052 | boolean |
| 2053 | re_iswctype (ch, cc) | 2053 | re_iswctype (ch, cc) |
| 2054 | int ch; | 2054 | int ch; |
diff --git a/src/search.c b/src/search.c index 4ae3a68b304..d91110f4b0e 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1662,7 +1662,7 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte) | |||
| 1662 | have nontrivial translation are the same aside from the last byte. | 1662 | have nontrivial translation are the same aside from the last byte. |
| 1663 | This makes it possible to translate just the last byte of a | 1663 | This makes it possible to translate just the last byte of a |
| 1664 | character, and do so after just a simple test of the context. | 1664 | character, and do so after just a simple test of the context. |
| 1665 | CHARSET_BASE is nonzero iff there is such a non-ASCII character. | 1665 | CHARSET_BASE is nonzero if there is such a non-ASCII character. |
| 1666 | 1666 | ||
| 1667 | If that criterion is not satisfied, do not call this function. */ | 1667 | If that criterion is not satisfied, do not call this function. */ |
| 1668 | 1668 | ||
diff --git a/src/systime.h b/src/systime.h index 85c2799f083..8b1b7f56ad6 100644 --- a/src/systime.h +++ b/src/systime.h | |||
| @@ -67,7 +67,7 @@ extern time_t timezone; | |||
| 67 | EMACS_SECS (TIME) is an rvalue for the seconds component of TIME. | 67 | EMACS_SECS (TIME) is an rvalue for the seconds component of TIME. |
| 68 | EMACS_SET_SECS (TIME, SECONDS) sets that to SECONDS. | 68 | EMACS_SET_SECS (TIME, SECONDS) sets that to SECONDS. |
| 69 | 69 | ||
| 70 | EMACS_HAS_USECS is defined iff EMACS_TIME has a usecs component. | 70 | EMACS_HAS_USECS is defined if EMACS_TIME has a usecs component. |
| 71 | EMACS_USECS (TIME) is an rvalue for the microseconds component of TIME. | 71 | EMACS_USECS (TIME) is an rvalue for the microseconds component of TIME. |
| 72 | This returns zero if EMACS_TIME doesn't have a microseconds component. | 72 | This returns zero if EMACS_TIME doesn't have a microseconds component. |
| 73 | EMACS_SET_USECS (TIME, MICROSECONDS) sets that to MICROSECONDS. | 73 | EMACS_SET_USECS (TIME, MICROSECONDS) sets that to MICROSECONDS. |
| @@ -83,7 +83,7 @@ extern time_t timezone; | |||
| 83 | 83 | ||
| 84 | EMACS_SUB_TIME (DEST, SRC1, SRC2) subtracts SRC2 from SRC1 and | 84 | EMACS_SUB_TIME (DEST, SRC1, SRC2) subtracts SRC2 from SRC1 and |
| 85 | stores the result in DEST. SRC should not be negative. | 85 | stores the result in DEST. SRC should not be negative. |
| 86 | EMACS_TIME_NEG_P (TIME) is true iff TIME is negative. | 86 | EMACS_TIME_NEG_P (TIME) is true if TIME is negative. |
| 87 | 87 | ||
| 88 | */ | 88 | */ |
| 89 | 89 | ||
diff --git a/src/systty.h b/src/systty.h index 15dd7a4e26c..c89edfc8d93 100644 --- a/src/systty.h +++ b/src/systty.h | |||
| @@ -297,7 +297,7 @@ static struct sensemode { | |||
| 297 | written before making the change. | 297 | written before making the change. |
| 298 | Return 0 if all went well, and -1 if anything failed. | 298 | Return 0 if all went well, and -1 if anything failed. |
| 299 | 299 | ||
| 300 | EMACS_TTY_TABS_OK (struct emacs_tty *P) is false iff the kernel | 300 | EMACS_TTY_TABS_OK (struct emacs_tty *P) is false if the kernel |
| 301 | expands tabs to spaces upon output; in that case, there is no | 301 | expands tabs to spaces upon output; in that case, there is no |
| 302 | advantage to using tabs over spaces. */ | 302 | advantage to using tabs over spaces. */ |
| 303 | 303 | ||
diff --git a/src/termhooks.h b/src/termhooks.h index 740c9135866..4124e37586b 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -52,7 +52,7 @@ extern void (*fullscreen_hook) P_ ((struct frame *f)); | |||
| 52 | /* Input queue declarations and hooks. */ | 52 | /* Input queue declarations and hooks. */ |
| 53 | 53 | ||
| 54 | /* Expedient hack: only provide the below definitions to files that | 54 | /* Expedient hack: only provide the below definitions to files that |
| 55 | are prepared to handle lispy things. CONSP is defined iff lisp.h | 55 | are prepared to handle lispy things. CONSP is defined if lisp.h |
| 56 | has been included before this file. */ | 56 | has been included before this file. */ |
| 57 | #ifdef CONSP | 57 | #ifdef CONSP |
| 58 | 58 | ||
diff --git a/src/textprop.c b/src/textprop.c index 711ee571af6..8ce5656e5a2 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -1633,8 +1633,8 @@ Return t if any property was actually removed, nil otherwise. */) | |||
| 1633 | The flag `modified' records if changes have been made. | 1633 | The flag `modified' records if changes have been made. |
| 1634 | When object is a buffer, we must call modify_region before changes are | 1634 | When object is a buffer, we must call modify_region before changes are |
| 1635 | made and signal_after_change when we are done. | 1635 | made and signal_after_change when we are done. |
| 1636 | We call modify_region before calling remove_properties iff modified == 0, | 1636 | We call modify_region before calling remove_properties if modified == 0, |
| 1637 | and we call signal_after_change before returning iff modified != 0. */ | 1637 | and we call signal_after_change before returning if modified != 0. */ |
| 1638 | for (;;) | 1638 | for (;;) |
| 1639 | { | 1639 | { |
| 1640 | if (i == 0) | 1640 | if (i == 0) |
diff --git a/src/w32term.c b/src/w32term.c index fb312010728..100af4ebc21 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -4378,7 +4378,7 @@ w32_read_socket (sd, expected, hold_quit) | |||
| 4378 | /* Window will be selected only when it is not | 4378 | /* Window will be selected only when it is not |
| 4379 | selected now and last mouse movement event was | 4379 | selected now and last mouse movement event was |
| 4380 | not in it. Minibuffer window will be selected | 4380 | not in it. Minibuffer window will be selected |
| 4381 | iff it is active. */ | 4381 | only when it is active. */ |
| 4382 | if (WINDOWP(window) | 4382 | if (WINDOWP(window) |
| 4383 | && !EQ (window, last_window) | 4383 | && !EQ (window, last_window) |
| 4384 | && !EQ (window, selected_window)) | 4384 | && !EQ (window, selected_window)) |
diff --git a/src/w32term.h b/src/w32term.h index bd1a5ab2aad..3e7f3a3a6a9 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -201,7 +201,7 @@ struct w32_display_info | |||
| 201 | char *w32_id_name; | 201 | char *w32_id_name; |
| 202 | 202 | ||
| 203 | /* The number of fonts actually stored in w32_font_table. | 203 | /* The number of fonts actually stored in w32_font_table. |
| 204 | font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <= | 204 | font_table[n] is used and valid if 0 <= n < n_fonts. 0 <= |
| 205 | n_fonts <= font_table_size. and font_table[i].name != 0. */ | 205 | n_fonts <= font_table_size. and font_table[i].name != 0. */ |
| 206 | int n_fonts; | 206 | int n_fonts; |
| 207 | 207 | ||
diff --git a/src/window.c b/src/window.c index cda5eccf082..3db1802a861 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -559,6 +559,15 @@ use (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))). */) | |||
| 559 | return make_number (window_box_text_cols (decode_any_window (window))); | 559 | return make_number (window_box_text_cols (decode_any_window (window))); |
| 560 | } | 560 | } |
| 561 | 561 | ||
| 562 | DEFUN ("window-full-width-p", Fwindow_full_width_p, Swindow_full_width_p, 0, 1, 0, | ||
| 563 | doc: /* Return t if WINDOW is as wide as its frame. | ||
| 564 | WINDOW defaults to the selected window. */) | ||
| 565 | (window) | ||
| 566 | Lisp_Object window; | ||
| 567 | { | ||
| 568 | return WINDOW_FULL_WIDTH_P (decode_any_window (window)) ? Qt : Qnil; | ||
| 569 | } | ||
| 570 | |||
| 562 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | 571 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, |
| 563 | doc: /* Return the number of columns by which WINDOW is scrolled from left margin. | 572 | doc: /* Return the number of columns by which WINDOW is scrolled from left margin. |
| 564 | WINDOW defaults to the selected window. */) | 573 | WINDOW defaults to the selected window. */) |
| @@ -7517,6 +7526,7 @@ The selected frame is the one whose configuration has changed. */); | |||
| 7517 | defsubr (&Swindow_buffer); | 7526 | defsubr (&Swindow_buffer); |
| 7518 | defsubr (&Swindow_height); | 7527 | defsubr (&Swindow_height); |
| 7519 | defsubr (&Swindow_width); | 7528 | defsubr (&Swindow_width); |
| 7529 | defsubr (&Swindow_full_width_p); | ||
| 7520 | defsubr (&Swindow_hscroll); | 7530 | defsubr (&Swindow_hscroll); |
| 7521 | defsubr (&Sset_window_hscroll); | 7531 | defsubr (&Sset_window_hscroll); |
| 7522 | defsubr (&Swindow_redisplay_end_trigger); | 7532 | defsubr (&Swindow_redisplay_end_trigger); |
diff --git a/src/window.h b/src/window.h index d459d9e305d..c9ef865c4f0 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -777,6 +777,7 @@ extern Lisp_Object window_from_coordinates P_ ((struct frame *, int, int, | |||
| 777 | EXFUN (Fwindow_dedicated_p, 1); | 777 | EXFUN (Fwindow_dedicated_p, 1); |
| 778 | extern int window_height P_ ((Lisp_Object)); | 778 | extern int window_height P_ ((Lisp_Object)); |
| 779 | extern int window_width P_ ((Lisp_Object)); | 779 | extern int window_width P_ ((Lisp_Object)); |
| 780 | EXFUN (Fwindow_full_width_p, 1); | ||
| 780 | extern void set_window_height P_ ((Lisp_Object, int, int)); | 781 | extern void set_window_height P_ ((Lisp_Object, int, int)); |
| 781 | extern void set_window_width P_ ((Lisp_Object, int, int)); | 782 | extern void set_window_width P_ ((Lisp_Object, int, int)); |
| 782 | extern void change_window_heights P_ ((Lisp_Object, int)); | 783 | extern void change_window_heights P_ ((Lisp_Object, int)); |
| @@ -818,7 +819,7 @@ extern int command_loop_level; | |||
| 818 | 819 | ||
| 819 | extern int minibuf_level; | 820 | extern int minibuf_level; |
| 820 | 821 | ||
| 821 | /* true iff we should redraw the mode lines on the next redisplay. */ | 822 | /* true if we should redraw the mode lines on the next redisplay. */ |
| 822 | 823 | ||
| 823 | extern int update_mode_lines; | 824 | extern int update_mode_lines; |
| 824 | 825 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 674e07a2ed7..9d786f286cb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7074,18 +7074,22 @@ move_it_by_lines (it, dvpos, need_y_p) | |||
| 7074 | { | 7074 | { |
| 7075 | struct position pos; | 7075 | struct position pos; |
| 7076 | 7076 | ||
| 7077 | if (!FRAME_WINDOW_P (it->f)) | 7077 | /* The commented-out optimization uses vmotion on terminals. This |
| 7078 | gives bad results, because elements like it->what, on which | ||
| 7079 | callers such as pos_visible_p rely, aren't updated. */ | ||
| 7080 | /* if (!FRAME_WINDOW_P (it->f)) | ||
| 7078 | { | 7081 | { |
| 7079 | struct text_pos textpos; | 7082 | struct text_pos textpos; |
| 7080 | 7083 | ||
| 7081 | /* We can use vmotion on frames without proportional fonts. */ | ||
| 7082 | pos = *vmotion (IT_CHARPOS (*it), dvpos, it->w); | 7084 | pos = *vmotion (IT_CHARPOS (*it), dvpos, it->w); |
| 7083 | SET_TEXT_POS (textpos, pos.bufpos, pos.bytepos); | 7085 | SET_TEXT_POS (textpos, pos.bufpos, pos.bytepos); |
| 7084 | reseat (it, textpos, 1); | 7086 | reseat (it, textpos, 1); |
| 7085 | it->vpos += pos.vpos; | 7087 | it->vpos += pos.vpos; |
| 7086 | it->current_y += pos.vpos; | 7088 | it->current_y += pos.vpos; |
| 7087 | } | 7089 | } |
| 7088 | else if (dvpos == 0) | 7090 | else */ |
| 7091 | |||
| 7092 | if (dvpos == 0) | ||
| 7089 | { | 7093 | { |
| 7090 | /* DVPOS == 0 means move to the start of the screen line. */ | 7094 | /* DVPOS == 0 means move to the start of the screen line. */ |
| 7091 | move_it_vertically_backward (it, 0); | 7095 | move_it_vertically_backward (it, 0); |
| @@ -13532,7 +13536,10 @@ redisplay_window (window, just_this_one_p) | |||
| 13532 | /* Restore current_buffer and value of point in it. */ | 13536 | /* Restore current_buffer and value of point in it. */ |
| 13533 | TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); | 13537 | TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); |
| 13534 | set_buffer_internal_1 (old); | 13538 | set_buffer_internal_1 (old); |
| 13535 | TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); | 13539 | /* Avoid an abort in TEMP_SET_PT_BOTH if the buffer has become |
| 13540 | shorter. This can be caused by log truncation in *Messages*. */ | ||
| 13541 | if (CHARPOS (lpoint) <= ZV) | ||
| 13542 | TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); | ||
| 13536 | 13543 | ||
| 13537 | unbind_to (count, Qnil); | 13544 | unbind_to (count, Qnil); |
| 13538 | } | 13545 | } |
diff --git a/src/xterm.c b/src/xterm.c index 6183ffade0d..1ced63932e5 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2537,9 +2537,11 @@ x_draw_image_glyph_string (s) | |||
| 2537 | { | 2537 | { |
| 2538 | /* Fill background with a stipple pattern. */ | 2538 | /* Fill background with a stipple pattern. */ |
| 2539 | XSetFillStyle (s->display, s->gc, FillOpaqueStippled); | 2539 | XSetFillStyle (s->display, s->gc, FillOpaqueStippled); |
| 2540 | XSetTSOrigin (s->display, s->gc, - s->x, - s->y); | ||
| 2540 | XFillRectangle (s->display, pixmap, s->gc, | 2541 | XFillRectangle (s->display, pixmap, s->gc, |
| 2541 | 0, 0, s->background_width, s->height); | 2542 | 0, 0, s->background_width, s->height); |
| 2542 | XSetFillStyle (s->display, s->gc, FillSolid); | 2543 | XSetFillStyle (s->display, s->gc, FillSolid); |
| 2544 | XSetTSOrigin (s->display, s->gc, 0, 0); | ||
| 2543 | } | 2545 | } |
| 2544 | else | 2546 | else |
| 2545 | { | 2547 | { |
| @@ -6711,7 +6713,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6711 | 6713 | ||
| 6712 | /* Window will be selected only when it is not selected now and | 6714 | /* Window will be selected only when it is not selected now and |
| 6713 | last mouse movement event was not in it. Minibuffer window | 6715 | last mouse movement event was not in it. Minibuffer window |
| 6714 | will be selected iff it is active. */ | 6716 | will be selected only when it is active. */ |
| 6715 | if (WINDOWP (window) | 6717 | if (WINDOWP (window) |
| 6716 | && !EQ (window, last_window) | 6718 | && !EQ (window, last_window) |
| 6717 | && !EQ (window, selected_window)) | 6719 | && !EQ (window, selected_window)) |
diff --git a/src/xterm.h b/src/xterm.h index c5a266c45fb..c8b768f6187 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -256,7 +256,7 @@ struct x_display_info | |||
| 256 | char *x_id_name; | 256 | char *x_id_name; |
| 257 | 257 | ||
| 258 | /* The number of fonts actually stored in x_font_table. | 258 | /* The number of fonts actually stored in x_font_table. |
| 259 | font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <= | 259 | font_table[n] is used and valid if 0 <= n < n_fonts. 0 <= |
| 260 | n_fonts <= font_table_size and font_table[i].name != 0. */ | 260 | n_fonts <= font_table_size and font_table[i].name != 0. */ |
| 261 | int n_fonts; | 261 | int n_fonts; |
| 262 | 262 | ||