diff options
| author | Glenn Morris | 2012-11-03 12:14:22 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-11-03 12:14:22 -0700 |
| commit | f58542e1510319921d1745e0ad647ed42b1157f2 (patch) | |
| tree | 7dce084101c1b16c1249eda33e03cbea15d08abc /src | |
| parent | 7ccfb720b477df05042729e0e300bae5922f5120 (diff) | |
| parent | 92246540b0616afd90600aabbac964f5a0b544ca (diff) | |
| download | emacs-f58542e1510319921d1745e0ad647ed42b1157f2.tar.gz emacs-f58542e1510319921d1745e0ad647ed42b1157f2.zip | |
Merge from emacs-24; up to 2012-11-03T05:11:34Z!dmantipov@yandex.ru
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 18 | ||||
| -rw-r--r-- | src/conf_post.h | 9 | ||||
| -rw-r--r-- | src/lisp.mk | 6 | ||||
| -rw-r--r-- | src/msdos.c | 15 | ||||
| -rw-r--r-- | src/xdisp.c | 38 |
5 files changed, 80 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index be10016fc33..16b694e6e24 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2012-11-03 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * lisp.mk: Adjust comments to the fact that term/internal is now | ||
| 4 | loaded from loadup.el. | ||
| 5 | |||
| 6 | * msdos.c (msdos_abort): Rename from emacs_abort, and make static. | ||
| 7 | (msdos_fatal_signal): New function. | ||
| 8 | (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to | ||
| 9 | its argument list. | ||
| 10 | |||
| 11 | * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline" | ||
| 12 | for GCC versions before 4. | ||
| 13 | (emacs_raise): Define to call msdos_fatal_signal. | ||
| 14 | |||
| 15 | * xdisp.c (init_from_display_pos): Fix initialization of the bidi | ||
| 16 | iterator when starting in the middle of a display or overlay | ||
| 17 | string. (Bug#12745) | ||
| 18 | |||
| 1 | 2012-11-03 Paul Eggert <eggert@cs.ucla.edu> | 19 | 2012-11-03 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 20 | ||
| 3 | Fix data-loss with --batch (Bug#9574). | 21 | Fix data-loss with --batch (Bug#9574). |
diff --git a/src/conf_post.h b/src/conf_post.h index 6056821d4a7..da3c3bd58b0 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -110,8 +110,17 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 110 | #else | 110 | #else |
| 111 | # define lstat stat | 111 | # define lstat stat |
| 112 | #endif | 112 | #endif |
| 113 | /* The "portable" definition of _GL_INLINE on config.h does not work | ||
| 114 | with DJGPP GCC 3.4.4: it causes unresolved externals in sysdep.c, | ||
| 115 | although lib/execinfo.h is included and the inline functions there | ||
| 116 | are visible. */ | ||
| 117 | #if __GNUC__ < 4 | ||
| 118 | # define _GL_EXECINFO_INLINE inline | ||
| 119 | #endif | ||
| 113 | /* End of gnulib-related stuff. */ | 120 | /* End of gnulib-related stuff. */ |
| 114 | 121 | ||
| 122 | #define emacs_raise(sig) msdos_fatal_signal (sig) | ||
| 123 | |||
| 115 | #ifndef HAVE_SETPGID | 124 | #ifndef HAVE_SETPGID |
| 116 | # ifdef USG | 125 | # ifdef USG |
| 117 | # define setpgid(pid, pgid) setpgrp () | 126 | # define setpgid(pid, pgid) setpgrp () |
diff --git a/src/lisp.mk b/src/lisp.mk index 1f459d4d5f1..8c2710110e3 100644 --- a/src/lisp.mk +++ b/src/lisp.mk | |||
| @@ -34,9 +34,9 @@ | |||
| 34 | ## that does not have an explicit .el extension, but beware of any | 34 | ## that does not have an explicit .el extension, but beware of any |
| 35 | ## no-byte-compile ones. | 35 | ## no-byte-compile ones. |
| 36 | 36 | ||
| 37 | ## Confusingly, term/internal is not in loadup, but is unconditionally | 37 | ## Confusingly, international/cp51932 and international/eucjp-ms are |
| 38 | ## loaded by pc-win, which is. Ditto for international/cp51932 and | 38 | ## unconditionally loaded from language/japanese, instead of being |
| 39 | ## international/eucjp-ms, loaded from language/japanese. | 39 | ## loaded directly from loadup.el; FIXME. |
| 40 | 40 | ||
| 41 | ## Note that this list should not include lisp files which might not | 41 | ## Note that this list should not include lisp files which might not |
| 42 | ## be present, like site-load.el and site-init.el; this makefile | 42 | ## be present, like site-load.el and site-init.el; this makefile |
diff --git a/src/msdos.c b/src/msdos.c index bac6b977fdf..79f0be48892 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -3305,7 +3305,7 @@ XMenuActivate (Display *foo, XMenu *menu, int *pane, int *selidx, | |||
| 3305 | Emacs will process them after we return and surprise the user. */ | 3305 | Emacs will process them after we return and surprise the user. */ |
| 3306 | discard_mouse_events (); | 3306 | discard_mouse_events (); |
| 3307 | mouse_clear_clicks (); | 3307 | mouse_clear_clicks (); |
| 3308 | if (!kbd_buffer_events_waiting (1)) | 3308 | if (!kbd_buffer_events_waiting ()) |
| 3309 | clear_input_pending (); | 3309 | clear_input_pending (); |
| 3310 | /* Allow mouse events generation by dos_rawgetc. */ | 3310 | /* Allow mouse events generation by dos_rawgetc. */ |
| 3311 | mouse_preempted--; | 3311 | mouse_preempted--; |
| @@ -4214,8 +4214,8 @@ init_gettimeofday (void) | |||
| 4214 | } | 4214 | } |
| 4215 | #endif | 4215 | #endif |
| 4216 | 4216 | ||
| 4217 | void | 4217 | static void |
| 4218 | emacs_abort (void) | 4218 | msdos_abort (void) |
| 4219 | { | 4219 | { |
| 4220 | dos_ttcooked (); | 4220 | dos_ttcooked (); |
| 4221 | ScreenSetCursor (10, 0); | 4221 | ScreenSetCursor (10, 0); |
| @@ -4233,6 +4233,15 @@ emacs_abort (void) | |||
| 4233 | } | 4233 | } |
| 4234 | 4234 | ||
| 4235 | void | 4235 | void |
| 4236 | msdos_fatal_signal (int sig) | ||
| 4237 | { | ||
| 4238 | if (sig == SIGABRT) | ||
| 4239 | msdos_abort (); | ||
| 4240 | else | ||
| 4241 | raise (sig); | ||
| 4242 | } | ||
| 4243 | |||
| 4244 | void | ||
| 4236 | syms_of_msdos (void) | 4245 | syms_of_msdos (void) |
| 4237 | { | 4246 | { |
| 4238 | recent_doskeys = Fmake_vector (make_number (NUM_RECENT_DOSKEYS), Qnil); | 4247 | recent_doskeys = Fmake_vector (make_number (NUM_RECENT_DOSKEYS), Qnil); |
diff --git a/src/xdisp.c b/src/xdisp.c index b235f92edfe..1ff7819f34d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -928,6 +928,7 @@ static enum move_it_result | |||
| 928 | move_it_in_display_line_to (struct it *, ptrdiff_t, int, | 928 | move_it_in_display_line_to (struct it *, ptrdiff_t, int, |
| 929 | enum move_operation_enum); | 929 | enum move_operation_enum); |
| 930 | void move_it_vertically_backward (struct it *, int); | 930 | void move_it_vertically_backward (struct it *, int); |
| 931 | static void get_visually_first_element (struct it *); | ||
| 931 | static void init_to_row_start (struct it *, struct window *, | 932 | static void init_to_row_start (struct it *, struct window *, |
| 932 | struct glyph_row *); | 933 | struct glyph_row *); |
| 933 | static int init_to_row_end (struct it *, struct window *, | 934 | static int init_to_row_end (struct it *, struct window *, |
| @@ -3113,6 +3114,40 @@ init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos) | |||
| 3113 | eassert (STRINGP (it->string)); | 3114 | eassert (STRINGP (it->string)); |
| 3114 | it->current.string_pos = pos->string_pos; | 3115 | it->current.string_pos = pos->string_pos; |
| 3115 | it->method = GET_FROM_STRING; | 3116 | it->method = GET_FROM_STRING; |
| 3117 | it->end_charpos = SCHARS (it->string); | ||
| 3118 | /* Set up the bidi iterator for this overlay string. */ | ||
| 3119 | if (it->bidi_p) | ||
| 3120 | { | ||
| 3121 | it->bidi_it.string.lstring = it->string; | ||
| 3122 | it->bidi_it.string.s = NULL; | ||
| 3123 | it->bidi_it.string.schars = SCHARS (it->string); | ||
| 3124 | it->bidi_it.string.bufpos = it->overlay_strings_charpos; | ||
| 3125 | it->bidi_it.string.from_disp_str = it->string_from_display_prop_p; | ||
| 3126 | it->bidi_it.string.unibyte = !it->multibyte_p; | ||
| 3127 | bidi_init_it (IT_STRING_CHARPOS (*it), IT_STRING_BYTEPOS (*it), | ||
| 3128 | FRAME_WINDOW_P (it->f), &it->bidi_it); | ||
| 3129 | |||
| 3130 | /* Synchronize the state of the bidi iterator with | ||
| 3131 | pos->string_pos. For any string position other than | ||
| 3132 | zero, this will be done automagically when we resume | ||
| 3133 | iteration over the string and get_visually_first_element | ||
| 3134 | is called. But if string_pos is zero, and the string is | ||
| 3135 | to be reordered for display, we need to resync manually, | ||
| 3136 | since it could be that the iteration state recorded in | ||
| 3137 | pos ended at string_pos of 0 moving backwards in string. */ | ||
| 3138 | if (CHARPOS (pos->string_pos) == 0) | ||
| 3139 | { | ||
| 3140 | get_visually_first_element (it); | ||
| 3141 | if (IT_STRING_CHARPOS (*it) != 0) | ||
| 3142 | do { | ||
| 3143 | /* Paranoia. */ | ||
| 3144 | eassert (it->bidi_it.charpos < it->bidi_it.string.schars); | ||
| 3145 | bidi_move_to_visually_next (&it->bidi_it); | ||
| 3146 | } while (it->bidi_it.charpos != 0); | ||
| 3147 | } | ||
| 3148 | eassert (IT_STRING_CHARPOS (*it) == it->bidi_it.charpos | ||
| 3149 | && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos); | ||
| 3150 | } | ||
| 3116 | } | 3151 | } |
| 3117 | 3152 | ||
| 3118 | if (CHARPOS (pos->string_pos) >= 0) | 3153 | if (CHARPOS (pos->string_pos) >= 0) |
| @@ -3122,6 +3157,9 @@ init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos) | |||
| 3122 | IT should already be filled with that string. */ | 3157 | IT should already be filled with that string. */ |
| 3123 | it->current.string_pos = pos->string_pos; | 3158 | it->current.string_pos = pos->string_pos; |
| 3124 | eassert (STRINGP (it->string)); | 3159 | eassert (STRINGP (it->string)); |
| 3160 | if (it->bidi_p) | ||
| 3161 | bidi_init_it (IT_STRING_CHARPOS (*it), IT_STRING_BYTEPOS (*it), | ||
| 3162 | FRAME_WINDOW_P (it->f), &it->bidi_it); | ||
| 3125 | } | 3163 | } |
| 3126 | 3164 | ||
| 3127 | /* Restore position in display vector translations, control | 3165 | /* Restore position in display vector translations, control |