diff options
| author | Chong Yidong | 2012-04-20 16:48:50 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-20 16:48:50 +0800 |
| commit | c07a4c0b599e0debfb10acdf02ac6559b998a88a (patch) | |
| tree | f87bca47c21f04b43cca2347a21ed89c57b67958 /src | |
| parent | 6cf2a23e297b8a57a70c2a1dab5aa28b73461b0b (diff) | |
| parent | 50e5ebca7edcf5299b89ff74499991de01e22046 (diff) | |
| download | emacs-c07a4c0b599e0debfb10acdf02ac6559b998a88a.tar.gz emacs-c07a4c0b599e0debfb10acdf02ac6559b998a88a.zip | |
Merge from emacs-24 branch
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 27 | ||||
| -rw-r--r-- | src/process.c | 43 | ||||
| -rw-r--r-- | src/xdisp.c | 21 |
3 files changed, 70 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ae91f04635b..fa6c47bf955 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,30 @@ | |||
| 1 | 2012-04-20 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * process.c (wait_reading_process_output): If EIO occurs on a pty, | ||
| 4 | set the status to "failed" and ensure that sentinel is run. | ||
| 5 | |||
| 6 | 2012-04-20 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * process.c (Fset_process_inherit_coding_system_flag) | ||
| 9 | (Fset_process_query_on_exit_flag): Doc fix (mention return value). | ||
| 10 | (Fmake_network_process, Fmake_serial_process): Doc fix. | ||
| 11 | |||
| 12 | 2012-04-20 Eli Zaretskii <eliz@gnu.org> | ||
| 13 | |||
| 14 | * xdisp.c (string_buffer_position_lim): Limit starting position to | ||
| 15 | BEGV. | ||
| 16 | (set_cursor_from_row): If called for a mode-line or header-line | ||
| 17 | row, return zero immediately. | ||
| 18 | (try_cursor_movement): If inside continuation line, don't back up | ||
| 19 | farther than the first row after the header line, if any. Don't | ||
| 20 | consider the header-line row as "partially visible", even if | ||
| 21 | MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261) | ||
| 22 | |||
| 23 | 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change) | ||
| 24 | |||
| 25 | * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n" (bug#11238). | ||
| 26 | |||
| 27 | 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 1 | 2012-04-18 Paul Eggert <eggert@cs.ucla.edu> | 28 | 2012-04-18 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 29 | ||
| 3 | configure: new option --enable-gcc-warnings (Bug#11207) | 30 | configure: new option --enable-gcc-warnings (Bug#11207) |
diff --git a/src/process.c b/src/process.c index 2609a9cc250..cf6d40052a7 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1077,7 +1077,9 @@ is more appropriate for saving the process buffer. | |||
| 1077 | 1077 | ||
| 1078 | Binding the variable `inherit-process-coding-system' to non-nil before | 1078 | Binding the variable `inherit-process-coding-system' to non-nil before |
| 1079 | starting the process is an alternative way of setting the inherit flag | 1079 | starting the process is an alternative way of setting the inherit flag |
| 1080 | for the process which will run. */) | 1080 | for the process which will run. |
| 1081 | |||
| 1082 | This function returns FLAG. */) | ||
| 1081 | (register Lisp_Object process, Lisp_Object flag) | 1083 | (register Lisp_Object process, Lisp_Object flag) |
| 1082 | { | 1084 | { |
| 1083 | CHECK_PROCESS (process); | 1085 | CHECK_PROCESS (process); |
| @@ -1090,7 +1092,8 @@ DEFUN ("set-process-query-on-exit-flag", | |||
| 1090 | 2, 2, 0, | 1092 | 2, 2, 0, |
| 1091 | doc: /* Specify if query is needed for PROCESS when Emacs is exited. | 1093 | doc: /* Specify if query is needed for PROCESS when Emacs is exited. |
| 1092 | If the second argument FLAG is non-nil, Emacs will query the user before | 1094 | If the second argument FLAG is non-nil, Emacs will query the user before |
| 1093 | exiting or killing a buffer if PROCESS is running. */) | 1095 | exiting or killing a buffer if PROCESS is running. This function |
| 1096 | returns FLAG. */) | ||
| 1094 | (register Lisp_Object process, Lisp_Object flag) | 1097 | (register Lisp_Object process, Lisp_Object flag) |
| 1095 | { | 1098 | { |
| 1096 | CHECK_PROCESS (process); | 1099 | CHECK_PROCESS (process); |
| @@ -2532,7 +2535,7 @@ could be "COM1", or "\\\\.\\COM10" for ports higher than COM9 (double | |||
| 2532 | the backslashes in strings). | 2535 | the backslashes in strings). |
| 2533 | 2536 | ||
| 2534 | :speed SPEED -- (mandatory) is handled by `serial-process-configure', | 2537 | :speed SPEED -- (mandatory) is handled by `serial-process-configure', |
| 2535 | which is called by `make-serial-process'. | 2538 | which this function calls. |
| 2536 | 2539 | ||
| 2537 | :name NAME -- NAME is the name of the process. If NAME is not given, | 2540 | :name NAME -- NAME is the name of the process. If NAME is not given, |
| 2538 | the value of PORT is used. | 2541 | the value of PORT is used. |
| @@ -2561,13 +2564,12 @@ but you can send outgoing data. The stopped state is cleared by | |||
| 2561 | 2564 | ||
| 2562 | :plist PLIST -- Install PLIST as the initial plist of the process. | 2565 | :plist PLIST -- Install PLIST as the initial plist of the process. |
| 2563 | 2566 | ||
| 2564 | :speed | ||
| 2565 | :bytesize | 2567 | :bytesize |
| 2566 | :parity | 2568 | :parity |
| 2567 | :stopbits | 2569 | :stopbits |
| 2568 | :flowcontrol | 2570 | :flowcontrol |
| 2569 | -- These arguments are handled by `serial-process-configure', which is | 2571 | -- This function calls `serial-process-configure' to handle these |
| 2570 | called by `make-serial-process'. | 2572 | arguments. |
| 2571 | 2573 | ||
| 2572 | The original argument list, possibly modified by later configuration, | 2574 | The original argument list, possibly modified by later configuration, |
| 2573 | is available via the function `process-contact'. | 2575 | is available via the function `process-contact'. |
| @@ -2801,7 +2803,7 @@ The stopped state is cleared by `continue-process' and set by | |||
| 2801 | :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the | 2803 | :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the |
| 2802 | process filter are multibyte, otherwise they are unibyte. | 2804 | process filter are multibyte, otherwise they are unibyte. |
| 2803 | If this keyword is not specified, the strings are multibyte if | 2805 | If this keyword is not specified, the strings are multibyte if |
| 2804 | `default-enable-multibyte-characters' is non-nil. | 2806 | the default value of `enable-multibyte-characters' is non-nil. |
| 2805 | 2807 | ||
| 2806 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. | 2808 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. |
| 2807 | 2809 | ||
| @@ -4898,16 +4900,23 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4898 | It can't hurt. */ | 4900 | It can't hurt. */ |
| 4899 | else if (nread == -1 && errno == EIO) | 4901 | else if (nread == -1 && errno == EIO) |
| 4900 | { | 4902 | { |
| 4901 | /* Don't do anything if only a pty, with no associated | 4903 | struct Lisp_Process *p = XPROCESS (proc); |
| 4902 | process (bug#10933). */ | 4904 | |
| 4903 | if (XPROCESS (proc)->pid != -2) { | 4905 | /* Clear the descriptor now, so we only raise the |
| 4904 | /* Clear the descriptor now, so we only raise the signal | 4906 | signal once. */ |
| 4905 | once. */ | 4907 | FD_CLR (channel, &input_wait_mask); |
| 4906 | FD_CLR (channel, &input_wait_mask); | 4908 | FD_CLR (channel, &non_keyboard_wait_mask); |
| 4907 | FD_CLR (channel, &non_keyboard_wait_mask); | 4909 | |
| 4908 | 4910 | if (p->pid == -2) | |
| 4909 | kill (getpid (), SIGCHLD); | 4911 | { |
| 4910 | } | 4912 | /* If the EIO occurs on a pty, sigchld_handler's |
| 4913 | wait3() will not find the process object to | ||
| 4914 | delete. Do it here. */ | ||
| 4915 | p->tick = ++process_tick; | ||
| 4916 | p->status = Qfailed; | ||
| 4917 | } | ||
| 4918 | else | ||
| 4919 | kill (getpid (), SIGCHLD); | ||
| 4911 | } | 4920 | } |
| 4912 | #endif /* HAVE_PTYS */ | 4921 | #endif /* HAVE_PTYS */ |
| 4913 | /* If we can detect process termination, don't consider the | 4922 | /* If we can detect process termination, don't consider the |
diff --git a/src/xdisp.c b/src/xdisp.c index ea964f4dadc..3cbd4b172f4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4979,7 +4979,7 @@ string_buffer_position_lim (Lisp_Object string, | |||
| 4979 | Lisp_Object limit, prop, pos; | 4979 | Lisp_Object limit, prop, pos; |
| 4980 | int found = 0; | 4980 | int found = 0; |
| 4981 | 4981 | ||
| 4982 | pos = make_number (from); | 4982 | pos = make_number (max (from, BEGV)); |
| 4983 | 4983 | ||
| 4984 | if (!back_p) /* looking forward */ | 4984 | if (!back_p) /* looking forward */ |
| 4985 | { | 4985 | { |
| @@ -13690,6 +13690,13 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 13690 | comes from a text property, not from an overlay. */ | 13690 | comes from a text property, not from an overlay. */ |
| 13691 | int string_from_text_prop = 0; | 13691 | int string_from_text_prop = 0; |
| 13692 | 13692 | ||
| 13693 | /* Don't even try doing anything if called for a mode-line or | ||
| 13694 | header-line row, since the rest of the code isn't prepared to | ||
| 13695 | deal with such calamities. */ | ||
| 13696 | xassert (!row->mode_line_p); | ||
| 13697 | if (row->mode_line_p) | ||
| 13698 | return 0; | ||
| 13699 | |||
| 13693 | /* Skip over glyphs not having an object at the start and the end of | 13700 | /* Skip over glyphs not having an object at the start and the end of |
| 13694 | the row. These are special glyphs like truncation marks on | 13701 | the row. These are special glyphs like truncation marks on |
| 13695 | terminal frames. */ | 13702 | terminal frames. */ |
| @@ -14910,6 +14917,8 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 14910 | else if (rc != CURSOR_MOVEMENT_SUCCESS | 14917 | else if (rc != CURSOR_MOVEMENT_SUCCESS |
| 14911 | && !NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) | 14918 | && !NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) |
| 14912 | { | 14919 | { |
| 14920 | struct glyph_row *row1; | ||
| 14921 | |||
| 14913 | /* If rows are bidi-reordered and point moved, back up | 14922 | /* If rows are bidi-reordered and point moved, back up |
| 14914 | until we find a row that does not belong to a | 14923 | until we find a row that does not belong to a |
| 14915 | continuation line. This is because we must consider | 14924 | continuation line. This is because we must consider |
| @@ -14920,24 +14929,28 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 14920 | /* FIXME: Revisit this when glyph ``spilling'' in | 14929 | /* FIXME: Revisit this when glyph ``spilling'' in |
| 14921 | continuation lines' rows is implemented for | 14930 | continuation lines' rows is implemented for |
| 14922 | bidi-reordered rows. */ | 14931 | bidi-reordered rows. */ |
| 14923 | while (MATRIX_ROW_CONTINUATION_LINE_P (row)) | 14932 | for (row1 = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 14933 | MATRIX_ROW_CONTINUATION_LINE_P (row); | ||
| 14934 | --row) | ||
| 14924 | { | 14935 | { |
| 14925 | /* If we hit the beginning of the displayed portion | 14936 | /* If we hit the beginning of the displayed portion |
| 14926 | without finding the first row of a continued | 14937 | without finding the first row of a continued |
| 14927 | line, give up. */ | 14938 | line, give up. */ |
| 14928 | if (row <= w->current_matrix->rows) | 14939 | if (row <= row1) |
| 14929 | { | 14940 | { |
| 14930 | rc = CURSOR_MOVEMENT_MUST_SCROLL; | 14941 | rc = CURSOR_MOVEMENT_MUST_SCROLL; |
| 14931 | break; | 14942 | break; |
| 14932 | } | 14943 | } |
| 14933 | xassert (row->enabled_p); | 14944 | xassert (row->enabled_p); |
| 14934 | --row; | ||
| 14935 | } | 14945 | } |
| 14936 | } | 14946 | } |
| 14937 | if (must_scroll) | 14947 | if (must_scroll) |
| 14938 | ; | 14948 | ; |
| 14939 | else if (rc != CURSOR_MOVEMENT_SUCCESS | 14949 | else if (rc != CURSOR_MOVEMENT_SUCCESS |
| 14940 | && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) | 14950 | && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) |
| 14951 | /* Make sure this isn't a header line by any chance, since | ||
| 14952 | then MATRIX_ROW_PARTIALLY_VISIBLE_P might yield non-zero. */ | ||
| 14953 | && !row->mode_line_p | ||
| 14941 | && make_cursor_line_fully_visible_p) | 14954 | && make_cursor_line_fully_visible_p) |
| 14942 | { | 14955 | { |
| 14943 | if (PT == MATRIX_ROW_END_CHARPOS (row) | 14956 | if (PT == MATRIX_ROW_END_CHARPOS (row) |