Now on revision 110811. ------------------------------------------------------------ revno: 110811 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-11-06 11:37:06 +0400 message: * emacs-lisp/byte-opt.el (toplevel): Add compare-window-configurations, frame-first-window, frame-root-window, frame-selected-window, minibuffer-selected-window, minibuffer-window, window-absolute-pixel-edges, window-at, window-body-height, window-body-width, window-display-table, window-combination-limit, window-frame, window-fringes, window-inside-absolute-pixel-edges, window-inside-edges, window-inside-pixel-edges, window-left-child, window-left-column, window-margins, window-next-buffers, window-next-sibling, window-new-normal, window-new-total, window-normal-size, window-parameter, window-parameters, window-parent, window-pixel-edges, window-point, window-prev-buffers, window-prev-sibling, window-redisplay-end-trigger, window-scroll-bars, window-start, window-text-height, window-top-child, window-top-line, window-total-height, window-total-width and window-use-time to the list of functions without side-effects. (toplevel): Add window-valid-p to the list of error-free functions without side-effects. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-05 16:32:35 +0000 +++ lisp/ChangeLog 2012-11-06 07:37:06 +0000 @@ -1,3 +1,23 @@ +2012-11-06 Dmitry Antipov + + * emacs-lisp/byte-opt.el (toplevel): Add compare-window-configurations, + frame-first-window, frame-root-window, frame-selected-window, + minibuffer-selected-window, minibuffer-window, + window-absolute-pixel-edges, window-at, window-body-height, + window-body-width, window-display-table, window-combination-limit, + window-frame, window-fringes, window-inside-absolute-pixel-edges, + window-inside-edges, window-inside-pixel-edges, window-left-child, + window-left-column, window-margins, window-next-buffers, + window-next-sibling, window-new-normal, window-new-total, + window-normal-size, window-parameter, window-parameters, window-parent, + window-pixel-edges, window-point, window-prev-buffers, + window-prev-sibling, window-redisplay-end-trigger, window-scroll-bars, + window-start, window-text-height, window-top-child, window-top-line, + window-total-height, window-total-width and window-use-time to the list + of functions without side-effects. + (toplevel): Add window-valid-p to the list of error-free functions + without side-effects. + 2012-11-05 Agustín Martín Domingo * textmodes/ispell.el (ispell-program-name): Update === modified file 'lisp/emacs-lisp/byte-opt.el' --- lisp/emacs-lisp/byte-opt.el 2012-07-26 01:27:33 +0000 +++ lisp/emacs-lisp/byte-opt.el 2012-11-06 07:37:06 +0000 @@ -1187,8 +1187,8 @@ boundp buffer-file-name buffer-local-variables buffer-modified-p buffer-substring byte-code-function-p capitalize car-less-than-car car cdr ceiling char-after char-before - char-equal char-to-string char-width - compare-strings concat coordinates-in-window-p + char-equal char-to-string char-width compare-strings + compare-window-configurations concat coordinates-in-window-p copy-alist copy-sequence copy-marker cos count-lines decode-char decode-time default-boundp default-value documentation downcase @@ -1196,17 +1196,18 @@ fboundp fceiling featurep ffloor file-directory-p file-exists-p file-locked-p file-name-absolute-p file-newer-than-file-p file-readable-p file-symlink-p file-writable-p - float float-time floor format format-time-string frame-visible-p - fround ftruncate + float float-time floor format format-time-string frame-first-window + frame-root-window frame-selected-window + frame-visible-p fround ftruncate get gethash get-buffer get-buffer-window getenv get-file-buffer hash-table-count int-to-string intern-soft keymap-parent length local-variable-if-set-p local-variable-p log log10 logand logb logior lognot logxor lsh langinfo - make-list make-string make-symbol - marker-buffer max member memq min mod multibyte-char-to-unibyte - next-window nth nthcdr number-to-string + make-list make-string make-symbol marker-buffer max member memq min + minibuffer-selected-window minibuffer-window + mod multibyte-char-to-unibyte next-window nth nthcdr number-to-string parse-colon-path plist-get plist-member prefix-numeric-value previous-window prin1-to-string propertize degrees-to-radians @@ -1221,9 +1222,19 @@ unibyte-char-to-multibyte upcase user-full-name user-login-name user-original-login-name custom-variable-p vconcat - window-buffer window-dedicated-p window-edges window-height - window-hscroll window-minibuffer-p window-width - zerop)) + window-absolute-pixel-edges window-at window-body-height + window-body-width window-buffer window-dedicated-p window-display-table + window-combination-limit window-edges window-frame window-fringes + window-height window-hscroll window-inside-edges + window-inside-absolute-pixel-edges window-inside-pixel-edges + window-left-child window-left-column window-margins window-minibuffer-p + window-next-buffers window-next-sibling window-new-normal + window-new-total window-normal-size window-parameter window-parameters + window-parent window-pixel-edges window-point window-prev-buffers + window-prev-sibling window-redisplay-end-trigger window-scroll-bars + window-start window-text-height window-top-child window-top-line + window-total-height window-total-width window-use-time window-vscroll + window-width zerop)) (side-effect-and-error-free-fns '(arrayp atom bobp bolp bool-vector-p @@ -1256,7 +1267,8 @@ this-single-command-raw-keys user-real-login-name user-real-uid user-uid vector vectorp visible-frame-list - wholenump window-configuration-p window-live-p windowp))) + wholenump window-configuration-p window-live-p + window-valid-p windowp))) (while side-effect-free-fns (put (car side-effect-free-fns) 'side-effect-free t) (setq side-effect-free-fns (cdr side-effect-free-fns))) ------------------------------------------------------------ revno: 110810 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-11-06 10:27:20 +0400 message: * window.c (quad): New function. (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges) (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges) (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p) (Fwindow_line_height): Use it. (Fwindow_fringes): Use list3. (Fwindow_scroll_bars): Use list4. (Fwindow_frame, Fwindow_top_child, Fwindow_left_child) (Fwindow_combination_limit): Allow zero number of arguments. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-05 17:29:30 +0000 +++ src/ChangeLog 2012-11-06 06:27:20 +0000 @@ -1,3 +1,15 @@ +2012-11-06 Dmitry Antipov + + * window.c (quad): New function. + (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges) + (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges) + (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p) + (Fwindow_line_height): Use it. + (Fwindow_fringes): Use list3. + (Fwindow_scroll_bars): Use list4. + (Fwindow_frame, Fwindow_top_child, Fwindow_left_child) + (Fwindow_combination_limit): Allow zero number of arguments. + 2012-11-05 Eli Zaretskii * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h. === modified file 'src/window.c' --- src/window.c 2012-11-03 05:11:34 +0000 +++ src/window.c 2012-11-06 06:27:20 +0000 @@ -270,6 +270,15 @@ return w; } +/* Build a frequently used 4-integer (X Y W H) list. */ + +static Lisp_Object +quad (ptrdiff_t x, ptrdiff_t y, ptrdiff_t w, ptrdiff_t h) +{ + return list4 (make_number (x), make_number (y), + make_number (w), make_number (h)); +} + DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, doc: /* Return t if OBJECT is a window and nil otherwise. */) (Lisp_Object object) @@ -296,7 +305,7 @@ } /* Frames and windows. */ -DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, +DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 0, 1, 0, doc: /* Return the frame that window WINDOW is on. WINDOW must be a valid window and defaults to the selected one. */) (Lisp_Object window) @@ -556,7 +565,7 @@ return decode_valid_window (window)->parent; } -DEFUN ("window-top-child", Fwindow_top_child, Swindow_top_child, 1, 1, 0, +DEFUN ("window-top-child", Fwindow_top_child, Swindow_top_child, 0, 1, 0, doc: /* Return the topmost child window of window WINDOW. WINDOW must be a valid window and defaults to the selected one. Return nil if WINDOW is a live window (live windows have no children). @@ -564,11 +573,10 @@ horizontal combination. */) (Lisp_Object window) { - CHECK_WINDOW (window); return decode_valid_window (window)->vchild; } -DEFUN ("window-left-child", Fwindow_left_child, Swindow_left_child, 1, 1, 0, +DEFUN ("window-left-child", Fwindow_left_child, Swindow_left_child, 0, 1, 0, doc: /* Return the leftmost child window of window WINDOW. WINDOW must be a valid window and defaults to the selected one. Return nil if WINDOW is a live window (live windows have no children). @@ -576,7 +584,6 @@ vertical combination. */) (Lisp_Object window) { - CHECK_WINDOW (window); return decode_valid_window (window)->hchild; } @@ -598,7 +605,7 @@ return decode_valid_window (window)->prev; } -DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0, +DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 0, 1, 0, doc: /* Return combination limit of window WINDOW. WINDOW must be a valid window and defaults to the selected one. If the return value is nil, child windows of WINDOW can be recombined with @@ -829,10 +836,8 @@ window so that the location of point moves off-window. */) (Lisp_Object window, Lisp_Object ncol) { - struct window *w = decode_live_window (window); - CHECK_NUMBER (ncol); - return set_window_hscroll (w, XINT (ncol)); + return set_window_hscroll (decode_live_window (window), XINT (ncol)); } DEFUN ("window-redisplay-end-trigger", Fwindow_redisplay_end_trigger, @@ -877,11 +882,8 @@ { register struct window *w = decode_valid_window (window); - return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)), - Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)), - Fcons (make_number (WINDOW_RIGHT_EDGE_COL (w)), - Fcons (make_number (WINDOW_BOTTOM_EDGE_LINE (w)), - Qnil)))); + return quad (WINDOW_LEFT_EDGE_COL (w), WINDOW_TOP_EDGE_LINE (w), + WINDOW_RIGHT_EDGE_COL (w), WINDOW_BOTTOM_EDGE_LINE (w)); } DEFUN ("window-pixel-edges", Fwindow_pixel_edges, Swindow_pixel_edges, 0, 1, 0, @@ -900,11 +902,8 @@ { register struct window *w = decode_valid_window (window); - return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)), - Fcons (make_number (WINDOW_TOP_EDGE_Y (w)), - Fcons (make_number (WINDOW_RIGHT_EDGE_X (w)), - Fcons (make_number (WINDOW_BOTTOM_EDGE_Y (w)), - Qnil)))); + return quad (WINDOW_LEFT_EDGE_X (w), WINDOW_TOP_EDGE_Y (w), + WINDOW_RIGHT_EDGE_X (w), WINDOW_BOTTOM_EDGE_Y (w)); } static void @@ -946,13 +945,13 @@ { register struct window *w = decode_valid_window (window); int add_x, add_y; + calc_absolute_offset (w, &add_x, &add_y); - return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x), - Fcons (make_number (WINDOW_TOP_EDGE_Y (w) + add_y), - Fcons (make_number (WINDOW_RIGHT_EDGE_X (w) + add_x), - Fcons (make_number (WINDOW_BOTTOM_EDGE_Y (w) + add_y), - Qnil)))); + return quad (WINDOW_LEFT_EDGE_X (w) + add_x, + WINDOW_TOP_EDGE_Y (w) + add_y, + WINDOW_RIGHT_EDGE_X (w) + add_x, + WINDOW_BOTTOM_EDGE_Y (w) + add_y); } DEFUN ("window-inside-edges", Fwindow_inside_edges, Swindow_inside_edges, 0, 1, 0, @@ -971,16 +970,16 @@ { register struct window *w = decode_live_window (window); - return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) - + WINDOW_LEFT_MARGIN_COLS (w) - + WINDOW_LEFT_FRINGE_COLS (w)), - make_number (WINDOW_TOP_EDGE_LINE (w) - + WINDOW_HEADER_LINE_LINES (w)), - make_number (WINDOW_BOX_RIGHT_EDGE_COL (w) - - WINDOW_RIGHT_MARGIN_COLS (w) - - WINDOW_RIGHT_FRINGE_COLS (w)), - make_number (WINDOW_BOTTOM_EDGE_LINE (w) - - WINDOW_MODE_LINE_LINES (w))); + return quad (WINDOW_BOX_LEFT_EDGE_COL (w) + + WINDOW_LEFT_MARGIN_COLS (w) + + WINDOW_LEFT_FRINGE_COLS (w), + WINDOW_TOP_EDGE_LINE (w) + + WINDOW_HEADER_LINE_LINES (w), + WINDOW_BOX_RIGHT_EDGE_COL (w) + - WINDOW_RIGHT_MARGIN_COLS (w) + - WINDOW_RIGHT_FRINGE_COLS (w), + WINDOW_BOTTOM_EDGE_LINE (w) + - WINDOW_MODE_LINE_LINES (w)); } DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, @@ -998,16 +997,16 @@ { register struct window *w = decode_live_window (window); - return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) - + WINDOW_LEFT_MARGIN_WIDTH (w) - + WINDOW_LEFT_FRINGE_WIDTH (w)), - make_number (WINDOW_TOP_EDGE_Y (w) - + WINDOW_HEADER_LINE_HEIGHT (w)), - make_number (WINDOW_BOX_RIGHT_EDGE_X (w) - - WINDOW_RIGHT_MARGIN_WIDTH (w) - - WINDOW_RIGHT_FRINGE_WIDTH (w)), - make_number (WINDOW_BOTTOM_EDGE_Y (w) - - WINDOW_MODE_LINE_HEIGHT (w))); + return quad (WINDOW_BOX_LEFT_EDGE_X (w) + + WINDOW_LEFT_MARGIN_WIDTH (w) + + WINDOW_LEFT_FRINGE_WIDTH (w), + WINDOW_TOP_EDGE_Y (w) + + WINDOW_HEADER_LINE_HEIGHT (w), + WINDOW_BOX_RIGHT_EDGE_X (w) + - WINDOW_RIGHT_MARGIN_WIDTH (w) + - WINDOW_RIGHT_FRINGE_WIDTH (w), + WINDOW_BOTTOM_EDGE_Y (w) + - WINDOW_MODE_LINE_HEIGHT (w)); } DEFUN ("window-inside-absolute-pixel-edges", @@ -1027,18 +1026,19 @@ { register struct window *w = decode_live_window (window); int add_x, add_y; + calc_absolute_offset (w, &add_x, &add_y); - return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) - + WINDOW_LEFT_MARGIN_WIDTH (w) - + WINDOW_LEFT_FRINGE_WIDTH (w) + add_x), - make_number (WINDOW_TOP_EDGE_Y (w) - + WINDOW_HEADER_LINE_HEIGHT (w) + add_y), - make_number (WINDOW_BOX_RIGHT_EDGE_X (w) - - WINDOW_RIGHT_MARGIN_WIDTH (w) - - WINDOW_RIGHT_FRINGE_WIDTH (w) + add_x), - make_number (WINDOW_BOTTOM_EDGE_Y (w) - - WINDOW_MODE_LINE_HEIGHT (w) + add_y)); + return quad (WINDOW_BOX_LEFT_EDGE_X (w) + + WINDOW_LEFT_MARGIN_WIDTH (w) + + WINDOW_LEFT_FRINGE_WIDTH (w) + add_x, + WINDOW_TOP_EDGE_Y (w) + + WINDOW_HEADER_LINE_HEIGHT (w) + add_y, + WINDOW_BOX_RIGHT_EDGE_X (w) + - WINDOW_RIGHT_MARGIN_WIDTH (w) + - WINDOW_RIGHT_FRINGE_WIDTH (w) + add_x, + WINDOW_BOTTOM_EDGE_Y (w) + - WINDOW_MODE_LINE_HEIGHT (w) + add_y); } /* Test if the character at column X, row Y is within window W. @@ -1624,8 +1624,7 @@ { Lisp_Object part = Qnil; if (!fully_p) - part = list4 (make_number (rtop), make_number (rbot), - make_number (rowh), make_number (vpos)); + part = quad (rtop, rbot, rowh, vpos); in_window = Fcons (make_number (x), Fcons (make_number (y), part)); } @@ -1691,23 +1690,18 @@ if (!WINDOW_WANTS_HEADER_LINE_P (w)) return Qnil; row = MATRIX_HEADER_LINE_ROW (w->current_matrix); - if (!row->enabled_p) - return Qnil; - return list4 (make_number (row->height), - make_number (0), make_number (0), - make_number (0)); + return row->enabled_p ? quad (row->height, 0, 0, 0) : Qnil; } if (EQ (line, Qmode_line)) { row = MATRIX_MODE_LINE_ROW (w->current_matrix); - if (!row->enabled_p) - return Qnil; - return list4 (make_number (row->height), - make_number (0), /* not accurate */ - make_number (WINDOW_HEADER_LINE_HEIGHT (w) - + window_text_bottom_y (w)), - make_number (0)); + return (row->enabled_p ? + quad (row->height, + 0, /* not accurate */ + WINDOW_HEADER_LINE_HEIGHT (w) + + window_text_bottom_y (w), 0) + : Qnil); } CHECK_NUMBER (line); @@ -1736,10 +1730,7 @@ found_row: crop = max (0, (row->y + row->height) - max_y); - return list4 (make_number (row->height + min (0, row->y) - crop), - make_number (i), - make_number (row->y), - make_number (crop)); + return quad (row->height + min (0, row->y) - crop, i, row->y, crop); } DEFUN ("window-dedicated-p", Fwindow_dedicated_p, Swindow_dedicated_p, @@ -6315,10 +6306,9 @@ { struct window *w = decode_live_window (window); - return Fcons (make_number (WINDOW_LEFT_FRINGE_WIDTH (w)), - Fcons (make_number (WINDOW_RIGHT_FRINGE_WIDTH (w)), - Fcons ((WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) - ? Qt : Qnil), Qnil))); + return list3 (make_number (WINDOW_LEFT_FRINGE_WIDTH (w)), + make_number (WINDOW_RIGHT_FRINGE_WIDTH (w)), + WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) ? Qt : Qnil); } @@ -6387,12 +6377,12 @@ (Lisp_Object window) { struct window *w = decode_live_window (window); - return Fcons (make_number ((WINDOW_CONFIG_SCROLL_BAR_WIDTH (w) + + return list4 (make_number ((WINDOW_CONFIG_SCROLL_BAR_WIDTH (w) ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (w) : WINDOW_SCROLL_BAR_AREA_WIDTH (w))), - Fcons (make_number (WINDOW_SCROLL_BAR_COLS (w)), - Fcons (w->vertical_scroll_bar_type, - Fcons (Qnil, Qnil)))); + make_number (WINDOW_SCROLL_BAR_COLS (w)), + w->vertical_scroll_bar_type, Qnil); } ------------------------------------------------------------ revno: 110809 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2012-11-05 18:29:30 +0100 message: Fix typos. diff: === modified file 'nt/inc/unistd.h' --- nt/inc/unistd.h 2012-11-05 16:21:18 +0000 +++ nt/inc/unistd.h 2012-11-05 17:29:30 +0000 @@ -8,8 +8,8 @@ also includes , so there's no need to declare 'environ' here. */ -/* Privide prototypes of library functions that are emulated on w32 - and whose prototypes are usually found in unistd.h on Posix +/* Provide prototypes of library functions that are emulated on w32 + and whose prototypes are usually found in unistd.h on POSIX platforms. */ extern ssize_t readlink (const char *, char *, size_t); extern int symlink (char const *, char const *); === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-05 17:25:50 +0000 +++ src/ChangeLog 2012-11-05 17:29:30 +0000 @@ -2,7 +2,7 @@ * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h. - * w32fns.c Include unistd.h, to avoid compiler warnings on Cygwin. + * w32fns.c: Include unistd.h, to avoid compiler warnings on Cygwin. (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use file descriptor 2 for standard error. (Bug#12805) @@ -827,7 +827,7 @@ now a supported configuration. * Makefile.in: consolidate image variables into LIBIMAGE; add - W32_OBJ and W32_LIBS. Compile new files. + W32_OBJ and W32_LIBS. Compile new files. * conf_post.h: (_DebPrint) declare tracing facility for W32 debugging. We need ------------------------------------------------------------ revno: 110808 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2012-11-05 19:25:50 +0200 message: Fix last entry in src/ChangeLog. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-05 16:30:45 +0000 +++ src/ChangeLog 2012-11-05 17:25:50 +0000 @@ -4,7 +4,7 @@ * w32fns.c Include unistd.h, to avoid compiler warnings on Cygwin. (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use - file descriptor 2 for standard error. + file descriptor 2 for standard error. (Bug#12805) 2012-11-05 Chong Yidong ------------------------------------------------------------ revno: 110807 committer: Agustin Martin branch nick: trunk timestamp: Mon 2012-11-05 17:32:35 +0100 message: ispell.el (ispell-program-name): Update spellchecker parameters when customized. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-04 04:13:13 +0000 +++ lisp/ChangeLog 2012-11-05 16:32:35 +0000 @@ -1,3 +1,8 @@ +2012-11-05 Agustín Martín Domingo + + * textmodes/ispell.el (ispell-program-name): Update + spellchecker parameters when customized. + 2012-11-04 Glenn Morris * vc/vc-svn.el (vc-svn-state-heuristic): Avoid calling svn. (Bug#7850) === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2012-10-13 09:51:59 +0000 +++ lisp/textmodes/ispell.el 2012-11-05 16:32:35 +0000 @@ -357,6 +357,10 @@ "ispell") "Program invoked by \\[ispell-word] and \\[ispell-region] commands." :type 'string + :set (lambda (symbol value) + (set-default symbol value) + (if (featurep 'ispell) + (ispell-set-spellchecker-params))) :group 'ispell) (defcustom ispell-alternate-dictionary ------------------------------------------------------------ revno: 110806 fixes bug: http://debbugs.gnu.org/12805 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2012-11-05 18:30:45 +0200 message: Fix bug #12805 with compilation error in the cygw32 build. src/makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h. src/w32fns.c Include unistd.h, to avoid compiler warnings on Cygwin. (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use file descriptor 2 for standard error. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-05 04:00:58 +0000 +++ src/ChangeLog 2012-11-05 16:30:45 +0000 @@ -1,3 +1,11 @@ +2012-11-05 Eli Zaretskii + + * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h. + + * w32fns.c Include unistd.h, to avoid compiler warnings on Cygwin. + (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use + file descriptor 2 for standard error. + 2012-11-05 Chong Yidong * process.c (wait_reading_process_output): Revert previous change. === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2012-10-17 19:02:44 +0000 +++ src/makefile.w32-in 2012-11-05 16:30:45 +0000 @@ -1564,6 +1564,7 @@ $(SRC)/w32.h \ $(SRC)/w32common.h \ $(SRC)/w32heap.h \ + $(NT_INC)/unistd.h \ $(BUFFER_H) \ $(CCL_H) \ $(CHARACTER_H) \ === modified file 'src/w32fns.c' --- src/w32fns.c 2012-11-03 05:59:17 +0000 +++ src/w32fns.c 2012-11-05 16:30:45 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include #include "lisp.h" #include "w32term.h" @@ -7749,12 +7750,19 @@ if (i) { +#ifdef CYGWIN + int stderr_fd = 2; +#else HANDLE errout = GetStdHandle (STD_ERROR_HANDLE); - int stderr_fd = -1, errfile_fd = -1; + int stderr_fd = -1; +#endif + int errfile_fd = -1; int j; +#ifndef CYGWIN if (errout && errout != INVALID_HANDLE_VALUE) stderr_fd = _open_osfhandle ((intptr_t)errout, O_APPEND | O_BINARY); +#endif if (stderr_fd >= 0) write (stderr_fd, "\r\nBacktrace:\r\n", 14); errfile_fd = _open ("emacs_backtrace.txt", O_RDWR | O_CREAT | O_BINARY, S_IREAD | S_IWRITE); ------------------------------------------------------------ revno: 110805 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2012-11-05 18:21:18 +0200 message: Avoid compiler warnings in the MS-Windows build. nt/inc/unistd.h (tcgetpgrp, setsid): Provide prototypes. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-11-05 14:30:32 +0000 +++ nt/ChangeLog 2012-11-05 16:21:18 +0000 @@ -1,3 +1,7 @@ +2012-11-05 Eli Zaretskii + + * inc/unistd.h (tcgetpgrp, setsid): Provide prototypes. + 2012-11-05 Juanma Barranquero * config.nt: Sync with autogen/config.in. === modified file 'nt/inc/unistd.h' --- nt/inc/unistd.h 2012-11-01 14:21:45 +0000 +++ nt/inc/unistd.h 2012-11-05 16:21:18 +0000 @@ -8,9 +8,14 @@ also includes , so there's no need to declare 'environ' here. */ +/* Privide prototypes of library functions that are emulated on w32 + and whose prototypes are usually found in unistd.h on Posix + platforms. */ extern ssize_t readlink (const char *, char *, size_t); extern int symlink (char const *, char const *); extern int setpgid (pid_t, pid_t); extern pid_t getpgrp (void); +extern pid_t setsid (void); +extern pid_t tcgetpgrp (int); #endif /* _UNISTD_H */ ------------------------------------------------------------ revno: 110804 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2012-11-05 15:30:32 +0100 message: nt/config.nt: Sync with autogen/config.in. (DISPNEW_NEEDS_STDIO_EXT, GETPGRP_VOID, HAVE_SETPGID, HAVE_SETSID) (PENDING_OUTPUT_COUNT, SETPGRP_RELEASES_CTTY): Remove. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-11-04 12:44:58 +0000 +++ nt/ChangeLog 2012-11-05 14:30:32 +0000 @@ -1,3 +1,9 @@ +2012-11-05 Juanma Barranquero + + * config.nt: Sync with autogen/config.in. + (DISPNEW_NEEDS_STDIO_EXT, GETPGRP_VOID, HAVE_SETPGID, HAVE_SETSID) + (PENDING_OUTPUT_COUNT, SETPGRP_RELEASES_CTTY): Remove. + 2012-11-04 Juanma Barranquero * config.nt: Sync with autogen/config.in. === modified file 'nt/config.nt' --- nt/config.nt 2012-11-04 12:44:58 +0000 +++ nt/config.nt 2012-11-05 14:30:32 +0000 @@ -118,9 +118,6 @@ /* Character that separates directories in a file name. */ #define DIRECTORY_SEP '/' -/* Define if dispnew.c should include stdio_ext.h. */ -#undef DISPNEW_NEEDS_STDIO_EXT - /* Define if process.c does not need to close a pty to make it a controlling terminal (it is already a controlling terminal of the subprocess, because we did ioctl TIOCSCTTY). */ @@ -183,9 +180,6 @@ setjmp does work. */ #define GC_SETJMP_WORKS 1 -/* Define to 1 if the `getpgrp' function requires zero arguments. */ -#define GETPGRP_VOID 1 - /* Define if gettimeofday clobbers the localtime buffer. */ #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME @@ -790,15 +784,9 @@ /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 -/* Define to 1 if you have the `setpgid' function. */ -#undef HAVE_SETPGID - /* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT -/* Define to 1 if you have the `setsid' function. */ -#undef HAVE_SETSID - /* Define to 1 if you have the `shutdown' function. */ #define HAVE_SHUTDOWN 1 @@ -1224,9 +1212,6 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Number of chars of output in the buffer of a stdio stream. */ -#undef PENDING_OUTPUT_COUNT - /* the number of pending output bytes on stream 'fp' */ #define PENDING_OUTPUT_N_BYTES (fp->_ptr - fp->_base) @@ -1285,9 +1270,6 @@ /* Character that separates PATH elements. */ #define SEPCHAR ';' -/* Define if process.c:child_setup should not call setpgrp. */ -#undef SETPGRP_RELEASES_CTTY - /* How to set up a slave PTY, if needed. */ #undef SETUP_SLAVE_PTY ------------------------------------------------------------ revno: 110803 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-11-05 06:17:32 -0500 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2012-11-04 11:19:07 +0000 +++ autogen/config.in 2012-11-05 11:17:32 +0000 @@ -114,9 +114,6 @@ /* Character that separates directories in a file name. */ #undef DIRECTORY_SEP -/* Define if dispnew.c should include stdio_ext.h. */ -#undef DISPNEW_NEEDS_STDIO_EXT - /* Define if process.c does not need to close a pty to make it a controlling terminal (it is already a controlling terminal of the subprocess, because we did ioctl TIOCSCTTY). */ @@ -177,9 +174,6 @@ garbage collection in the jmp_buf. */ #undef GC_SETJMP_WORKS -/* Define to 1 if the `getpgrp' function requires zero arguments. */ -#undef GETPGRP_VOID - /* Define if gettimeofday clobbers the localtime buffer. */ #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME @@ -781,15 +775,9 @@ /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE -/* Define to 1 if you have the `setpgid' function. */ -#undef HAVE_SETPGID - /* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT -/* Define to 1 if you have the `setsid' function. */ -#undef HAVE_SETSID - /* Define to 1 if you have the `shutdown' function. */ #undef HAVE_SHUTDOWN @@ -1214,9 +1202,6 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Number of chars of output in the buffer of a stdio stream. */ -#undef PENDING_OUTPUT_COUNT - /* the number of pending output bytes on stream 'fp' */ #undef PENDING_OUTPUT_N_BYTES @@ -1275,9 +1260,6 @@ /* Character that separates PATH elements. */ #undef SEPCHAR -/* Define if process.c:child_setup should not call setpgrp. */ -#undef SETPGRP_RELEASES_CTTY - /* How to set up a slave PTY, if needed. */ #undef SETUP_SLAVE_PTY === modified file 'autogen/configure' --- autogen/configure 2012-11-04 11:19:07 +0000 +++ autogen/configure 2012-11-05 11:17:32 +0000 @@ -3184,7 +3184,6 @@ as_fn_append ac_header_list " linux/version.h" as_fn_append ac_header_list " sys/systeminfo.h" -as_fn_append ac_header_list " stdio_ext.h" as_fn_append ac_header_list " fcntl.h" as_fn_append ac_header_list " coff.h" as_fn_append ac_header_list " pty.h" @@ -3206,6 +3205,7 @@ as_fn_append ac_func_list " tzset" as_fn_append ac_func_list " readlinkat" as_fn_append ac_header_list " execinfo.h" +as_fn_append ac_header_list " stdio_ext.h" as_fn_append ac_func_list " __fpending" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" @@ -8752,8 +8752,6 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 $as_echo_n "checking if personality LINUX32 can be set... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13418,10 +13416,10 @@ for ac_func in gethostname \ closedir getrusage get_current_dir_name \ -lrand48 setsid \ +lrand48 \ fpathconf select euidaccess getpagesize setlocale \ -utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ -__fpending strsignal setitimer \ +utimes getrlimit setrlimit getcwd shutdown getaddrinfo \ +strsignal setitimer \ sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ gai_strerror mkstemp getline getdelim fsync sync \ difftime posix_memalign \ @@ -13587,40 +13585,6 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 -$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } -if test "${ac_cv_func_getpgrp_void+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Use it with a single arg. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -getpgrp (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_func_getpgrp_void=no -else - ac_cv_func_getpgrp_void=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 -$as_echo "$ac_cv_func_getpgrp_void" >&6; } -if test $ac_cv_func_getpgrp_void = yes; then - -$as_echo "#define GETPGRP_VOID 1" >>confdefs.h - -fi - - # UNIX98 PTYs. for ac_func in grantpt do : @@ -15376,145 +15340,6 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C library" >&5 -$as_echo_n "checking whether we are using the GNU C library... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifndef __GNU_LIBRARY__ -# error "this is not the GNU C library" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - emacs_glibc=yes -else - emacs_glibc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_glibc" >&5 -$as_echo "$emacs_glibc" >&6; } - -if test $emacs_glibc = yes; then - - emacs_pending_output=unknown - - case $opsys in - gnu | gnu-linux | gnu-kfreebsd ) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5 -$as_echo_n "checking for style of pending output formalism... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM) -# error "stdio definitions not found" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - emacs_pending_output=new -fi -rm -f conftest.err conftest.$ac_ext - - if test $emacs_pending_output = unknown; then - case $opsys in - gnu-linux | gnu-kfreebsd) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifndef __UCLIBC__ -# error "not using uclibc" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - emacs_pending_output=uclibc -else - emacs_pending_output=old -fi -rm -f conftest.err conftest.$ac_ext - ;; - esac - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5 -$as_echo "$emacs_pending_output" >&6; } - - case $emacs_pending_output in - new) - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h - - ;; - uclibc) - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h - - ;; - old) - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h - - ;; - esac - ;; - esac - if test $emacs_pending_output = unknown; then - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer)" >>confdefs.h - - fi - -else - case $opsys in - cygwin | darwin | freebsd | netbsd | openbsd ) - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h - - ;; - - unixware) - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h - - ;; - - *) - if test x$ac_cv_header_stdio_ext_h = xyes && \ - test x$ac_cv_func___fpending = xyes; then - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) __fpending (FILE)" >>confdefs.h - - -$as_echo "#define DISPNEW_NEEDS_STDIO_EXT 1" >>confdefs.h - - else - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)" >>confdefs.h - - fi - ;; - esac -fi - - - case $opsys in gnu) @@ -15992,9 +15817,6 @@ $as_echo "#define PREFER_VSUSP 1" >>confdefs.h - -$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h - ;; sol2-10) @@ -17004,6 +16826,8 @@ + + GNULIB__EXIT=0; GNULIB_ATOLL=0; GNULIB_CALLOC_POSIX=0; ------------------------------------------------------------ revno: 110802 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-11-05 12:00:58 +0800 message: * process.c (wait_reading_process_output): Revert previous change. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-05 03:18:32 +0000 +++ src/ChangeLog 2012-11-05 04:00:58 +0000 @@ -1,3 +1,7 @@ +2012-11-05 Chong Yidong + + * process.c (wait_reading_process_output): Revert previous change. + 2012-11-05 Paul Eggert Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800). === modified file 'src/process.c' --- src/process.c 2012-11-05 03:18:32 +0000 +++ src/process.c 2012-11-05 04:00:58 +0000 @@ -4336,6 +4336,8 @@ while (1) { + int timeout_reduced_for_timers = 0; + /* If calling from keyboard input, do not quit since we want to return C-g as an input character. Otherwise, do pending quit if requested. */ @@ -4415,7 +4417,10 @@ if (EMACS_TIME_VALID_P (timer_delay)) { if (EMACS_TIME_LT (timer_delay, timeout)) - timeout = timer_delay; + { + timeout = timer_delay; + timeout_reduced_for_timers = 1; + } } else { @@ -4674,12 +4679,9 @@ /* If we woke up due to SIGWINCH, actually change size now. */ do_pending_window_change (0); - /* We used to break here if nfds == 0, i.e. we seemed to have - waited the full period. But apparently if Emacs receives - SIGIO between set_waiting_for_input and select, select can - return with nfds == 0 due to the timeout being zeroed out by - the signal handler (Bug#11536). */ - + if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers) + /* We waited the full specified time, so return now. */ + break; if (nfds < 0) { if (xerrno == EINTR)