diff options
| author | Chong Yidong | 2012-09-21 11:03:48 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-09-21 11:03:48 +0800 |
| commit | acfa068f4a1a4652b784af1d7aaac92929399249 (patch) | |
| tree | 4d5aef916164ae9862e4c94f50a5e53bbe274e53 /src | |
| parent | eb2deaffd17e760b3ec945c58d43080e8a44767a (diff) | |
| parent | d3fa327c47570a1767324d23d710504e90b083f9 (diff) | |
| download | emacs-acfa068f4a1a4652b784af1d7aaac92929399249.tar.gz emacs-acfa068f4a1a4652b784af1d7aaac92929399249.zip | |
Merge from emacs-24; up to 2012-05-07T14:57:18Z!michael.albinus@gmx.de
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 27 | ||||
| -rw-r--r-- | src/eval.c | 7 | ||||
| -rw-r--r-- | src/fileio.c | 7 | ||||
| -rw-r--r-- | src/unexmacosx.c | 21 | ||||
| -rw-r--r-- | src/xdisp.c | 43 |
5 files changed, 76 insertions, 29 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c3ce1ee1b0b..f3b8b2108e1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,30 @@ | |||
| 1 | 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * unexmacosx.c: Define LC_DATA_IN_CODE if not defined. | ||
| 4 | (print_load_command_name): Add case LC_DATA_IN_CODE. | ||
| 5 | (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data. | ||
| 6 | |||
| 7 | 2012-09-21 Glenn Morris <rgm@gnu.org> | ||
| 8 | |||
| 9 | * eval.c (Frun_hook_with_args_until_success) | ||
| 10 | (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393) | ||
| 11 | |||
| 12 | 2012-09-21 Andreas Schwab <schwab@linux-m68k.org> | ||
| 13 | |||
| 14 | * fileio.c (Ffile_selinux_context): Only call freecon when | ||
| 15 | lgetfilecon succeeded. | ||
| 16 | (Fset_file_selinux_context): Likewise. (Bug#12444) | ||
| 17 | |||
| 18 | 2012-09-21 Eli Zaretskii <eliz@gnu.org> | ||
| 19 | |||
| 20 | * xdisp.c (try_window_reusing_current_matrix): Under bidi | ||
| 21 | reordering, locate the cursor by calling set_cursor_from_row; if | ||
| 22 | that fails, clear the desired glyph matrix before returning a | ||
| 23 | failure indication to the caller. Fixes leaving garbled display | ||
| 24 | when fast scrolling with a down-key. (Bug#12403) | ||
| 25 | (compute_stop_pos_backwards): Fix a typo that caused crashes while | ||
| 26 | scrolling through multibyte text. | ||
| 27 | |||
| 1 | 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca> | 28 | 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 29 | ||
| 3 | * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after* | 30 | * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after* |
diff --git a/src/eval.c b/src/eval.c index 1c565e233c6..e47478bb1f1 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2399,6 +2399,7 @@ If it is a list of functions, those functions are called, in order, | |||
| 2399 | with the given arguments ARGS, until one of them | 2399 | with the given arguments ARGS, until one of them |
| 2400 | returns a non-nil value. Then we return that value. | 2400 | returns a non-nil value. Then we return that value. |
| 2401 | However, if they all return nil, we return nil. | 2401 | However, if they all return nil, we return nil. |
| 2402 | If the value of HOOK is nil, this function returns nil. | ||
| 2402 | 2403 | ||
| 2403 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2404 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2404 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2405 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| @@ -2420,10 +2421,12 @@ DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, | |||
| 2420 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil | 2421 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil |
| 2421 | value, that value may be a function or a list of functions to be | 2422 | value, that value may be a function or a list of functions to be |
| 2422 | called to run the hook. If the value is a function, it is called with | 2423 | called to run the hook. If the value is a function, it is called with |
| 2423 | the given arguments and its return value is returned. | 2424 | the given arguments. Then we return nil if the function returns nil, |
| 2425 | and t if it returns non-nil. | ||
| 2424 | If it is a list of functions, those functions are called, in order, | 2426 | If it is a list of functions, those functions are called, in order, |
| 2425 | with the given arguments ARGS, until one of them returns nil. | 2427 | with the given arguments ARGS, until one of them returns nil. |
| 2426 | Then we return nil. However, if they all return non-nil, we return non-nil. | 2428 | Then we return nil. However, if they all return non-nil, we return t. |
| 2429 | If the value of HOOK is nil, this function returns t. | ||
| 2427 | 2430 | ||
| 2428 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2431 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2429 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2432 | Instead, use `add-hook' and specify t for the LOCAL argument. |
diff --git a/src/fileio.c b/src/fileio.c index ca71af7ed95..6c4e34d7312 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2833,9 +2833,8 @@ or if SELinux is disabled, or if Emacs lacks SELinux support. */) | |||
| 2833 | if (context_range_get (context)) | 2833 | if (context_range_get (context)) |
| 2834 | values[3] = build_string (context_range_get (context)); | 2834 | values[3] = build_string (context_range_get (context)); |
| 2835 | context_free (context); | 2835 | context_free (context); |
| 2836 | freecon (con); | ||
| 2836 | } | 2837 | } |
| 2837 | if (con) | ||
| 2838 | freecon (con); | ||
| 2839 | } | 2838 | } |
| 2840 | #endif | 2839 | #endif |
| 2841 | 2840 | ||
| @@ -2914,12 +2913,10 @@ compiled with SELinux support. */) | |||
| 2914 | report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); | 2913 | report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); |
| 2915 | 2914 | ||
| 2916 | context_free (parsed_con); | 2915 | context_free (parsed_con); |
| 2916 | freecon (con); | ||
| 2917 | } | 2917 | } |
| 2918 | else | 2918 | else |
| 2919 | report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil)); | 2919 | report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil)); |
| 2920 | |||
| 2921 | if (con) | ||
| 2922 | freecon (con); | ||
| 2923 | } | 2920 | } |
| 2924 | #endif | 2921 | #endif |
| 2925 | 2922 | ||
diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 05a16466dfb..d38b91e955a 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c | |||
| @@ -117,6 +117,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 117 | 117 | ||
| 118 | #include <assert.h> | 118 | #include <assert.h> |
| 119 | 119 | ||
| 120 | /* LC_DATA_IN_CODE is not defined in mach-o/loader.h on OS X 10.7. | ||
| 121 | But it is used if we build with "Command Line Tools for Xcode 4.5 | ||
| 122 | (OS X Lion) - Septemper 2012". */ | ||
| 123 | #ifndef LC_DATA_IN_CODE | ||
| 124 | #define LC_DATA_IN_CODE 0x29 /* table of non-instructions in __text */ | ||
| 125 | #endif | ||
| 126 | |||
| 120 | #ifdef _LP64 | 127 | #ifdef _LP64 |
| 121 | #define mach_header mach_header_64 | 128 | #define mach_header mach_header_64 |
| 122 | #define segment_command segment_command_64 | 129 | #define segment_command segment_command_64 |
| @@ -612,6 +619,11 @@ print_load_command_name (int lc) | |||
| 612 | printf ("LC_MAIN "); | 619 | printf ("LC_MAIN "); |
| 613 | break; | 620 | break; |
| 614 | #endif | 621 | #endif |
| 622 | #ifdef LC_DATA_IN_CODE | ||
| 623 | case LC_DATA_IN_CODE: | ||
| 624 | printf ("LC_DATA_IN_CODE "); | ||
| 625 | break; | ||
| 626 | #endif | ||
| 615 | #ifdef LC_SOURCE_VERSION | 627 | #ifdef LC_SOURCE_VERSION |
| 616 | case LC_SOURCE_VERSION: | 628 | case LC_SOURCE_VERSION: |
| 617 | printf ("LC_SOURCE_VERSION"); | 629 | printf ("LC_SOURCE_VERSION"); |
| @@ -1178,9 +1190,9 @@ copy_dyld_info (struct load_command *lc, long delta) | |||
| 1178 | #endif | 1190 | #endif |
| 1179 | 1191 | ||
| 1180 | #ifdef LC_FUNCTION_STARTS | 1192 | #ifdef LC_FUNCTION_STARTS |
| 1181 | /* Copy a LC_FUNCTION_STARTS/LC_DYLIB_CODE_SIGN_DRS load command from | 1193 | /* Copy a LC_FUNCTION_STARTS/LC_DATA_IN_CODE/LC_DYLIB_CODE_SIGN_DRS |
| 1182 | the input file to the output file, adjusting the data offset | 1194 | load command from the input file to the output file, adjusting the |
| 1183 | field. */ | 1195 | data offset field. */ |
| 1184 | static void | 1196 | static void |
| 1185 | copy_linkedit_data (struct load_command *lc, long delta) | 1197 | copy_linkedit_data (struct load_command *lc, long delta) |
| 1186 | { | 1198 | { |
| @@ -1274,6 +1286,9 @@ dump_it (void) | |||
| 1274 | #endif | 1286 | #endif |
| 1275 | #ifdef LC_FUNCTION_STARTS | 1287 | #ifdef LC_FUNCTION_STARTS |
| 1276 | case LC_FUNCTION_STARTS: | 1288 | case LC_FUNCTION_STARTS: |
| 1289 | #ifdef LC_DATA_IN_CODE | ||
| 1290 | case LC_DATA_IN_CODE: | ||
| 1291 | #endif | ||
| 1277 | #ifdef LC_DYLIB_CODE_SIGN_DRS | 1292 | #ifdef LC_DYLIB_CODE_SIGN_DRS |
| 1278 | case LC_DYLIB_CODE_SIGN_DRS: | 1293 | case LC_DYLIB_CODE_SIGN_DRS: |
| 1279 | #endif | 1294 | #endif |
diff --git a/src/xdisp.c b/src/xdisp.c index 5ee5a46601c..f00719be37a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7755,7 +7755,7 @@ compute_stop_pos_backwards (struct it *it) | |||
| 7755 | { | 7755 | { |
| 7756 | it->end_charpos = min (charpos + 1, ZV); | 7756 | it->end_charpos = min (charpos + 1, ZV); |
| 7757 | charpos = max (charpos - SCAN_BACK_LIMIT, BEGV); | 7757 | charpos = max (charpos - SCAN_BACK_LIMIT, BEGV); |
| 7758 | SET_TEXT_POS (pos, charpos, BYTE_TO_CHAR (charpos)); | 7758 | SET_TEXT_POS (pos, charpos, CHAR_TO_BYTE (charpos)); |
| 7759 | reseat_1 (it, pos, 0); | 7759 | reseat_1 (it, pos, 0); |
| 7760 | compute_stop_pos (it); | 7760 | compute_stop_pos (it); |
| 7761 | /* We must advance forward, right? */ | 7761 | /* We must advance forward, right? */ |
| @@ -16744,28 +16744,33 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16744 | } | 16744 | } |
| 16745 | if (row < bottom_row) | 16745 | if (row < bottom_row) |
| 16746 | { | 16746 | { |
| 16747 | struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos; | 16747 | /* Can't simply scan the row for point with |
| 16748 | struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA]; | 16748 | bidi-reordered glyph rows. Let set_cursor_from_row |
| 16749 | 16749 | figure out where to put the cursor, and if it fails, | |
| 16750 | /* Can't use this optimization with bidi-reordered glyph | 16750 | give up. */ |
| 16751 | rows, unless cursor is already at point. */ | ||
| 16752 | if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) | 16751 | if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) |
| 16753 | { | 16752 | { |
| 16754 | if (!(w->cursor.hpos >= 0 | 16753 | if (!set_cursor_from_row (w, row, w->current_matrix, |
| 16755 | && w->cursor.hpos < row->used[TEXT_AREA] | 16754 | 0, 0, 0, 0)) |
| 16756 | && BUFFERP (glyph->object) | 16755 | { |
| 16757 | && glyph->charpos == PT)) | 16756 | clear_glyph_matrix (w->desired_matrix); |
| 16758 | return 0; | 16757 | return 0; |
| 16758 | } | ||
| 16759 | } | 16759 | } |
| 16760 | else | 16760 | else |
| 16761 | for (; glyph < end | 16761 | { |
| 16762 | && (!BUFFERP (glyph->object) | 16762 | struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos; |
| 16763 | || glyph->charpos < PT); | 16763 | struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA]; |
| 16764 | glyph++) | 16764 | |
| 16765 | { | 16765 | for (; glyph < end |
| 16766 | w->cursor.hpos++; | 16766 | && (!BUFFERP (glyph->object) |
| 16767 | w->cursor.x += glyph->pixel_width; | 16767 | || glyph->charpos < PT); |
| 16768 | } | 16768 | glyph++) |
| 16769 | { | ||
| 16770 | w->cursor.hpos++; | ||
| 16771 | w->cursor.x += glyph->pixel_width; | ||
| 16772 | } | ||
| 16773 | } | ||
| 16769 | } | 16774 | } |
| 16770 | } | 16775 | } |
| 16771 | 16776 | ||