Now on revision 114038. ------------------------------------------------------------ revno: 114038 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-08-27 23:01:52 -0700 message: * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, for portability to hosts where /bin/sh has problems. diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-28 01:37:13 +0000 +++ ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-28 Stefan Monnier * configure.ac (DOCMISC_W32): New var to replace DOCMISC_*_W32. === modified file 'Makefile.in' --- Makefile.in 2013-08-27 07:57:39 +0000 +++ Makefile.in 2013-08-28 06:01:52 +0000 @@ -56,7 +56,7 @@ # make docs # Make Emacs documentation files from their sources; requires makeinfo. -SHELL = /bin/sh +SHELL = @SHELL@ # This may not work with certain non-GNU make's. It only matters when # inheriting a CDPATH not starting with the current directory. === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-08-27 17:19:04 +0000 +++ admin/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * unidata/Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-27 Glenn Morris * admin.el (manual-misc-manuals): Use INFO_COMMON rather than === modified file 'admin/unidata/Makefile.in' --- admin/unidata/Makefile.in 2013-07-23 22:55:38 +0000 +++ admin/unidata/Makefile.in 2013-08-28 06:01:52 +0000 @@ -21,7 +21,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . -SHELL = /bin/sh +SHELL = @SHELL@ srcdir = @srcdir@ abs_builddir = @abs_builddir@ === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-08-17 02:45:22 +0000 +++ doc/emacs/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-17 Xue Fuqiao * text.texi (Enriched Justification): Minor fixes. === modified file 'doc/emacs/Makefile.in' --- doc/emacs/Makefile.in 2013-08-12 00:04:15 +0000 +++ doc/emacs/Makefile.in 2013-08-28 06:01:52 +0000 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . -SHELL = /bin/sh +SHELL = @SHELL@ # NB If you add any more configure variables, # update the sed rules in the dist target below. === modified file 'doc/lispintro/ChangeLog' --- doc/lispintro/ChangeLog 2013-08-12 00:09:11 +0000 +++ doc/lispintro/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-12 Glenn Morris * emacs-lisp-intro.texi (Complete copy-region-as-kill): Fix typo. === modified file 'doc/lispintro/Makefile.in' --- doc/lispintro/Makefile.in 2013-08-12 00:04:15 +0000 +++ doc/lispintro/Makefile.in 2013-08-28 06:01:52 +0000 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . -SHELL = /bin/sh +SHELL = @SHELL@ # NB If you add any more configure variables, # update the sed rules in the dist target below. === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-26 15:28:24 +0000 +++ doc/lispref/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-26 Stefan Monnier * variables.texi (File Local Variables): Don't recommend quoting! Ever! === modified file 'doc/lispref/Makefile.in' --- doc/lispref/Makefile.in 2013-08-12 00:04:15 +0000 +++ doc/lispref/Makefile.in 2013-08-28 06:01:52 +0000 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . -SHELL = /bin/sh +SHELL = @SHELL@ # NB If you add any more configure variables, # update the sed rules in the dist target below. === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-08-28 01:37:13 +0000 +++ doc/misc/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-28 Stefan Monnier Try to reduce redundancy in doc/misc/Makefile.in. === modified file 'doc/misc/Makefile.in' --- doc/misc/Makefile.in 2013-08-28 01:37:13 +0000 +++ doc/misc/Makefile.in 2013-08-28 06:01:52 +0000 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . -SHELL = /bin/sh +SHELL = @SHELL@ # Where to find the source code. $(srcdir) will be the man-aux # subdirectory of the source tree. This is === modified file 'leim/ChangeLog' --- leim/ChangeLog 2013-06-21 13:37:15 +0000 +++ leim/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-06-21 Juanma Barranquero * quail/croatian.el ("croatian-prefix"): === modified file 'leim/Makefile.in' --- leim/Makefile.in 2013-07-23 22:55:38 +0000 +++ leim/Makefile.in 2013-08-28 06:01:52 +0000 @@ -21,10 +21,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . - -# Avoid trouble on systems where the `SHELL' variable might be -# inherited from the environment. -SHELL = /bin/sh +SHELL = @SHELL@ # Here are the things that we expect ../configure to edit. srcdir=@srcdir@ === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2013-08-10 07:43:41 +0000 +++ lib-src/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-10 Eli Zaretskii * update-game-score.exe.manifest: New file. === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2013-08-10 07:43:41 +0000 +++ lib-src/Makefile.in 2013-08-28 06:01:52 +0000 @@ -18,10 +18,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . - -# Avoid trouble on systems where the `SHELL' variable might be -# inherited from the environment. -SHELL = /bin/sh +SHELL = @SHELL@ # Following ../lisp/Makefile.in. EMACS = ../src/emacs === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-28 01:33:31 +0000 +++ lisp/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-28 Stefan Monnier * emacs-lisp/cconv.el (cconv--analyse-function): Improve warning. === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2013-07-23 22:55:38 +0000 +++ lisp/Makefile.in 2013-08-28 06:01:52 +0000 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . -SHELL = /bin/sh +SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ === modified file 'nextstep/ChangeLog' --- nextstep/ChangeLog 2013-06-02 19:14:25 +0000 +++ nextstep/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-06-02 Jan Djärv * templates/Info-gnustep.plist.in: Add NSDocumentClass EmacsDocument. === modified file 'nextstep/Makefile.in' --- nextstep/Makefile.in 2013-07-23 22:55:38 +0000 +++ nextstep/Makefile.in 2013-08-28 06:01:52 +0000 @@ -20,7 +20,7 @@ ### Commentary: ### Code: -SHELL = /bin/sh +SHELL = @SHELL@ srcdir = @srcdir@ EXEEXT = @EXEEXT@ === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-28 05:45:38 +0000 +++ src/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-28 Dmitry Antipov Redesign redisplay interface to drop global output_cursor. === modified file 'src/Makefile.in' --- src/Makefile.in 2013-08-11 19:43:36 +0000 +++ src/Makefile.in 2013-08-28 06:01:52 +0000 @@ -23,7 +23,7 @@ # script may need modifying in sync with changes made here. Try to # avoid shell-ism because the DOS build has to use the DOS shell. -SHELL = /bin/sh +SHELL = @SHELL@ # Here are the things that we expect ../configure to edit. # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH. === modified file 'test/ChangeLog' --- test/ChangeLog 2013-08-21 19:42:52 +0000 +++ test/ChangeLog 2013-08-28 06:01:52 +0000 @@ -1,3 +1,8 @@ +2013-08-28 Paul Eggert + + * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, + for portability to hosts where /bin/sh has problems. + 2013-08-21 David Engster * automated/eieio-tests.el, automated/eieio-test-persist.el: === modified file 'test/automated/Makefile.in' --- test/automated/Makefile.in 2013-07-23 22:55:38 +0000 +++ test/automated/Makefile.in 2013-08-28 06:01:52 +0000 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . -SHELL = /bin/sh +SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ ------------------------------------------------------------ revno: 114037 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-08-28 09:45:38 +0400 message: Redesign redisplay interface to drop global output_cursor. * dispextern.h (struct redisplay_interface): Remove cursor_to member. (toplevel): Remove declaration of output_cursor. (set_output_cursor, x_cursor_to): Remove prototype. * window.h (struct window): New member output_cursor. (output_cursor_to): New function to replace RIF member. * dispnew.c (redraw_overlapped_rows, update_marginal_area) (update_text_area, set_window_cursor_after_update): Use it. * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove. (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line): * nsterm.m (ns_update_window_begin, ns_update_window_end): * w32term.c (x_update_window_begin, x_update_window_end): * xterm.c (x_update_window_begin, x_update_window_end): Adjust to use per-window output cursor. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-27 19:36:28 +0000 +++ src/ChangeLog 2013-08-28 05:45:38 +0000 @@ -1,3 +1,20 @@ +2013-08-28 Dmitry Antipov + + Redesign redisplay interface to drop global output_cursor. + * dispextern.h (struct redisplay_interface): Remove cursor_to member. + (toplevel): Remove declaration of output_cursor. + (set_output_cursor, x_cursor_to): Remove prototype. + * window.h (struct window): New member output_cursor. + (output_cursor_to): New function to replace RIF member. + * dispnew.c (redraw_overlapped_rows, update_marginal_area) + (update_text_area, set_window_cursor_after_update): Use it. + * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove. + (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line): + * nsterm.m (ns_update_window_begin, ns_update_window_end): + * w32term.c (x_update_window_begin, x_update_window_end): + * xterm.c (x_update_window_begin, x_update_window_end): + Adjust to use per-window output cursor. + 2013-08-27 Paul Eggert Simplify SELECT_TYPE-related code. === modified file 'src/dispextern.h' --- src/dispextern.h 2013-08-27 18:47:55 +0000 +++ src/dispextern.h 2013-08-28 05:45:38 +0000 @@ -2790,11 +2790,6 @@ void (*update_window_end_hook) (struct window *w, bool cursor_on_p, bool mouse_face_overwritten_p); - /* Move cursor to row/column position VPOS/HPOS, pixel coordinates - Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y - are window-relative pixel positions. */ - void (*cursor_to) (struct window *w, int vpos, int hpos, int y, int x); - /* Flush the display of frame F. For X, this is XFlush. */ void (*flush_display) (struct frame *f); @@ -3232,9 +3227,6 @@ struct glyph *, enum glyph_row_area, int); extern void x_clear_end_of_line (struct window *, struct glyph_row *, enum glyph_row_area, int); - -extern struct cursor_pos output_cursor; - extern void x_fix_overlapping_area (struct window *, struct glyph_row *, enum glyph_row_area, int); extern void draw_phys_cursor_glyph (struct window *, @@ -3244,10 +3236,6 @@ struct glyph *, int *, int *, int *); extern void erase_phys_cursor (struct window *); extern void display_and_set_cursor (struct window *, bool, int, int, int, int); - -extern void set_output_cursor (struct cursor_pos *); -extern void x_cursor_to (struct window *, int, int, int, int); - extern void x_update_cursor (struct frame *, bool); extern void x_clear_cursor (struct window *); extern void x_draw_vertical_border (struct window *w); === modified file 'src/dispnew.c' --- src/dispnew.c 2013-08-27 18:47:55 +0000 +++ src/dispnew.c 2013-08-28 05:45:38 +0000 @@ -3223,8 +3223,8 @@ for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) { - FRAME_RIF (f)->cursor_to (w, i, 0, row->y, - area == TEXT_AREA ? row->x : 0); + output_cursor_to (w, i, 0, row->y, + area == TEXT_AREA ? row->x : 0); if (row->used[area]) FRAME_RIF (f)->write_glyphs (w, row, row->glyphs[area], area, row->used[area]); @@ -3481,7 +3481,7 @@ /* End the update of window W. Don't set the cursor if we paused updating the display because in this case, set_window_cursor_after_update hasn't been called, and - output_cursor doesn't contain the cursor location. */ + W->output_cursor doesn't contain the cursor location. */ rif->update_window_end_hook (w, !paused_p, mouse_face_overwritten_p); } else @@ -3511,7 +3511,7 @@ /* Set cursor to start of glyphs, write them, and clear to the end of the area. I don't think that something more sophisticated is necessary here, since marginal areas will not be the default. */ - rif->cursor_to (w, vpos, 0, desired_row->y, 0); + output_cursor_to (w, vpos, 0, desired_row->y, 0); if (desired_row->used[area]) rif->write_glyphs (w, updated_row, desired_row->glyphs[area], area, desired_row->used[area]); @@ -3549,7 +3549,7 @@ && !(current_row->mode_line_p && vpos > 0)) || current_row->x != desired_row->x) { - rif->cursor_to (w, vpos, 0, desired_row->y, desired_row->x); + output_cursor_to (w, vpos, 0, desired_row->y, desired_row->x); if (desired_row->used[TEXT_AREA]) rif->write_glyphs (w, updated_row, desired_row->glyphs[TEXT_AREA], @@ -3692,7 +3692,7 @@ break; } - rif->cursor_to (w, vpos, start_hpos, desired_row->y, start_x); + output_cursor_to (w, vpos, start_hpos, desired_row->y, start_x); rif->write_glyphs (w, updated_row, start, TEXT_AREA, i - start_hpos); changed_p = 1; @@ -3702,7 +3702,7 @@ /* Write the rest. */ if (i < desired_row->used[TEXT_AREA]) { - rif->cursor_to (w, vpos, i, desired_row->y, x); + output_cursor_to (w, vpos, i, desired_row->y, x); rif->write_glyphs (w, updated_row, desired_glyph, TEXT_AREA, desired_row->used[TEXT_AREA] - i); changed_p = 1; @@ -3724,8 +3724,8 @@ { /* If old row extends to the end of the text area, clear. */ if (i >= desired_row->used[TEXT_AREA]) - rif->cursor_to (w, vpos, i, desired_row->y, - desired_row->pixel_width); + output_cursor_to (w, vpos, i, desired_row->y, + desired_row->pixel_width); rif->clear_end_of_line (w, updated_row, TEXT_AREA, -1); changed_p = 1; } @@ -3736,8 +3736,8 @@ int xlim; if (i >= desired_row->used[TEXT_AREA]) - rif->cursor_to (w, vpos, i, desired_row->y, - desired_row->pixel_width); + output_cursor_to (w, vpos, i, desired_row->y, + desired_row->pixel_width); /* If cursor is displayed at the end of the line, make sure it's cleared. Nowadays we don't have a phys_cursor_glyph @@ -3836,7 +3836,6 @@ set_window_cursor_after_update (struct window *w) { struct frame *f = XFRAME (w->frame); - struct redisplay_interface *rif = FRAME_RIF (f); int cx, cy, vpos, hpos; /* Not intended for frame matrix updates. */ @@ -3908,7 +3907,7 @@ Horizontal position is -1 when cursor is on the left fringe. */ hpos = clip_to_bounds (-1, hpos, w->current_matrix->matrix_w - 1); vpos = clip_to_bounds (0, vpos, w->current_matrix->nrows - 1); - rif->cursor_to (w, vpos, hpos, cy, cx); + output_cursor_to (w, vpos, hpos, cy, cx); } === modified file 'src/nsterm.m' --- src/nsterm.m 2013-08-27 19:36:28 +0000 +++ src/nsterm.m 2013-08-28 05:45:38 +0000 @@ -720,7 +720,7 @@ Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); NSTRACE (ns_update_window_begin); - set_output_cursor (&w->cursor); + w->output_cursor = w->cursor; block_input (); @@ -756,8 +756,8 @@ if (cursor_on_p) display_and_set_cursor (w, 1, - output_cursor.hpos, output_cursor.vpos, - output_cursor.x, output_cursor.y); + w->output_cursor.hpos, w->output_cursor.vpos, + w->output_cursor.x, w->output_cursor.y); if (draw_window_fringes (w, 1)) x_draw_vertical_border (w); @@ -1989,9 +1989,6 @@ mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); - output_cursor.hpos = output_cursor.vpos = 0; - output_cursor.x = -1; - r = [view bounds]; block_input (); @@ -3978,7 +3975,6 @@ ns_after_update_window_line, ns_update_window_begin, ns_update_window_end, - x_cursor_to, ns_flush, 0, /* flush_display_optional */ x_clear_window_mouse_face, === modified file 'src/w32term.c' --- src/w32term.c 2013-08-27 03:52:21 +0000 +++ src/w32term.c 2013-08-28 05:45:38 +0000 @@ -576,8 +576,7 @@ } -/* Start update of window W. Set output_cursor to the cursor - position of W. */ +/* Start update of window W. */ static void x_update_window_begin (struct window *w) @@ -591,7 +590,7 @@ SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0); } - set_output_cursor (&w->cursor); + w->output_cursor = w->cursor; block_input (); @@ -683,9 +682,9 @@ block_input (); if (cursor_on_p) - display_and_set_cursor (w, 1, output_cursor.hpos, - output_cursor.vpos, - output_cursor.x, output_cursor.y); + display_and_set_cursor (w, 1, + w->output_cursor.hpos, w->output_cursor.vpos, + w->output_cursor.x, w->output_cursor.y); if (draw_window_fringes (w, 1)) x_draw_vertical_border (w); @@ -2651,11 +2650,7 @@ /* Clearing the frame will erase any cursor, so mark them all as no longer visible. */ mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); - output_cursor.hpos = output_cursor.vpos = 0; - output_cursor.x = -1; - /* We don't set the output cursor here because there will always - follow an explicit cursor_to. */ block_input (); w32_clear_window (f); @@ -6321,7 +6316,6 @@ x_after_update_window_line, x_update_window_begin, x_update_window_end, - x_cursor_to, x_flush, 0, /* flush_display_optional */ x_clear_window_mouse_face, === modified file 'src/window.h' --- src/window.h 2013-08-26 09:33:37 +0000 +++ src/window.h 2013-08-28 05:45:38 +0000 @@ -236,6 +236,9 @@ /* Where the cursor actually is. */ struct cursor_pos phys_cursor; + /* Internally used for redisplay purposes. */ + struct cursor_pos output_cursor; + /* Vertical cursor position as of last update that completed without pause. This is the position of last_point. */ int last_cursor_vpos; @@ -956,6 +959,22 @@ extern void syms_of_window (void); extern void keys_of_window (void); +/* Move cursor to row/column position VPOS/HPOS, pixel coordinates + Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y + are window-relative pixel positions. This is always done during + window update, so the position is the future output cursor position + for currently updated window W. */ + +WINDOW_INLINE void +output_cursor_to (struct window *w, int vpos, int hpos, int y, int x) +{ + eassert (w); + w->output_cursor.hpos = hpos; + w->output_cursor.vpos = vpos; + w->output_cursor.x = x; + w->output_cursor.y = y; +} + INLINE_HEADER_END #endif /* not WINDOW_H_INCLUDED */ === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-27 18:47:55 +0000 +++ src/xdisp.c 2013-08-28 05:45:38 +0000 @@ -11445,62 +11445,6 @@ return hooks_run; } - - -/*********************************************************************** - Output Cursor - ***********************************************************************/ - -#ifdef HAVE_WINDOW_SYSTEM - -/* EXPORT: - Nominal cursor position -- where to draw output. - HPOS and VPOS are window relative glyph matrix coordinates. - X and Y are window relative pixel coordinates. */ - -struct cursor_pos output_cursor; - - -/* EXPORT: - Set the global variable output_cursor to CURSOR. All cursor - positions are relative to currently updated window. */ - -void -set_output_cursor (struct cursor_pos *cursor) -{ - output_cursor.hpos = cursor->hpos; - output_cursor.vpos = cursor->vpos; - output_cursor.x = cursor->x; - output_cursor.y = cursor->y; -} - - -/* EXPORT for RIF: - Set a nominal cursor position. - - HPOS and VPOS are column/row positions in a window glyph matrix. - X and Y are window text area relative pixel positions. - - This is always done during window update, so the position is the - future output cursor position for currently updated window W. - NOTE: W is used only to check whether this function is called - in a consistent manner via the redisplay interface. */ - -void -x_cursor_to (struct window *w, int vpos, int hpos, int y, int x) -{ - eassert (w); - - /* Set the output cursor. */ - output_cursor.hpos = hpos; - output_cursor.vpos = vpos; - output_cursor.x = x; - output_cursor.y = y; -} - -#endif /* HAVE_WINDOW_SYSTEM */ - - /*********************************************************************** Tool-bars ***********************************************************************/ @@ -25790,7 +25734,7 @@ /* Write glyphs. */ hpos = start - updated_row->glyphs[updated_area]; - x = draw_glyphs (w, output_cursor.x, + x = draw_glyphs (w, w->output_cursor.x, updated_row, updated_area, hpos, hpos + len, DRAW_NORMAL_TEXT, 0); @@ -25798,7 +25742,7 @@ /* Invalidate old phys cursor if the glyph at its hpos is redrawn. */ if (updated_area == TEXT_AREA && w->phys_cursor_on_p - && w->phys_cursor.vpos == output_cursor.vpos + && w->phys_cursor.vpos == w->output_cursor.vpos && chpos >= hpos && chpos < hpos + len) w->phys_cursor_on_p = 0; @@ -25806,8 +25750,8 @@ unblock_input (); /* Advance the output cursor. */ - output_cursor.hpos += len; - output_cursor.x = x; + w->output_cursor.hpos += len; + w->output_cursor.x = x; } @@ -25840,25 +25784,25 @@ /* Get the width of the region to shift right. */ shifted_region_width = (window_box_width (w, updated_area) - - output_cursor.x + - w->output_cursor.x - shift_by_width); /* Shift right. */ - frame_x = window_box_left (w, updated_area) + output_cursor.x; - frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, output_cursor.y); + frame_x = window_box_left (w, updated_area) + w->output_cursor.x; + frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, w->output_cursor.y); FRAME_RIF (f)->shift_glyphs_for_insert (f, frame_x, frame_y, shifted_region_width, line_height, shift_by_width); /* Write the glyphs. */ hpos = start - row->glyphs[updated_area]; - draw_glyphs (w, output_cursor.x, row, updated_area, + draw_glyphs (w, w->output_cursor.x, row, updated_area, hpos, hpos + len, DRAW_NORMAL_TEXT, 0); /* Advance the output cursor. */ - output_cursor.hpos += len; - output_cursor.x += shift_by_width; + w->output_cursor.hpos += len; + w->output_cursor.x += shift_by_width; unblock_input (); } @@ -25897,16 +25841,16 @@ else to_x = min (to_x, max_x); - to_y = min (max_y, output_cursor.y + updated_row->height); + to_y = min (max_y, w->output_cursor.y + updated_row->height); /* Notice if the cursor will be cleared by this operation. */ if (!updated_row->full_width_p) notice_overwritten_cursor (w, updated_area, - output_cursor.x, -1, + w->output_cursor.x, -1, updated_row->y, MATRIX_ROW_BOTTOM_Y (updated_row)); - from_x = output_cursor.x; + from_x = w->output_cursor.x; /* Translate to frame coordinates. */ if (updated_row->full_width_p) @@ -25922,7 +25866,7 @@ } min_y = WINDOW_HEADER_LINE_HEIGHT (w); - from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, output_cursor.y)); + from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, w->output_cursor.y)); to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y); /* Prevent inadvertently clearing to end of the X window. */ === modified file 'src/xterm.c' --- src/xterm.c 2013-08-27 19:36:28 +0000 +++ src/xterm.c 2013-08-28 05:45:38 +0000 @@ -551,8 +551,7 @@ } -/* Start update of window W. Set output_cursor to the cursor - position of W. */ +/* Start update of window W. */ static void x_update_window_begin (struct window *w) @@ -560,7 +559,7 @@ struct frame *f = XFRAME (WINDOW_FRAME (w)); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); - set_output_cursor (&w->cursor); + w->output_cursor = w->cursor; block_input (); @@ -618,9 +617,9 @@ block_input (); if (cursor_on_p) - display_and_set_cursor (w, 1, output_cursor.hpos, - output_cursor.vpos, - output_cursor.x, output_cursor.y); + display_and_set_cursor (w, 1, + w->output_cursor.hpos, w->output_cursor.vpos, + w->output_cursor.x, w->output_cursor.y); if (draw_window_fringes (w, 1)) x_draw_vertical_border (w); @@ -2983,11 +2982,7 @@ /* Clearing the frame will erase any cursor, so mark them all as no longer visible. */ mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); - output_cursor.hpos = output_cursor.vpos = 0; - output_cursor.x = -1; - /* We don't set the output cursor here because there will always - follow an explicit cursor_to. */ block_input (); XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); @@ -10448,7 +10443,6 @@ x_after_update_window_line, x_update_window_begin, x_update_window_end, - x_cursor_to, x_flush, #ifdef XFlush x_flush, ------------------------------------------------------------ revno: 114036 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-08-27 21:37:13 -0400 message: Try to reduce redundancy in doc/misc/Makefile.in. * configure.ac (DOCMISC_W32): New var to replace DOCMISC_*_W32. * doc/misc/Makefile.in (DOCMISC_W32): New var to replace DOCMISC_*_W32. (TARGETS): New intermediate variable. (DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS): Use it. diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-27 18:47:55 +0000 +++ ChangeLog 2013-08-28 01:37:13 +0000 @@ -1,3 +1,7 @@ +2013-08-28 Stefan Monnier + + * configure.ac (DOCMISC_W32): New var to replace DOCMISC_*_W32. + 2013-08-27 Paul Eggert Simplify EMACS_TIME-related code. === modified file 'configure.ac' --- configure.ac 2013-08-27 15:44:07 +0000 +++ configure.ac 2013-08-28 01:37:13 +0000 @@ -998,23 +998,11 @@ AC_SUBST(INFO_OPTS) if test $opsys = mingw32; then - DOCMISC_DVI_W32=efaq-w32.dvi - DOCMISC_HTML_W32=efaq-w32.html - DOCMISC_INFO_W32=efaq-w32 - DOCMISC_PDF_W32=efaq-w32.pdf - DOCMISC_PS_W32=efaq-w32.ps + DOCMISC_W32=efaq-w32 else - DOCMISC_DVI_W32= - DOCMISC_HTML_W32= - DOCMISC_INFO_W32= - DOCMISC_PDF_W32= - DOCMISC_PS_W32= + DOCMISC_W32= fi -AC_SUBST(DOCMISC_DVI_W32) -AC_SUBST(DOCMISC_HTML_W32) -AC_SUBST(DOCMISC_INFO_W32) -AC_SUBST(DOCMISC_PDF_W32) -AC_SUBST(DOCMISC_PS_W32) +AC_SUBST(DOCMISC_W32) dnl Add our options to ac_link now, after it is set up. === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-08-27 19:40:24 +0000 +++ doc/misc/ChangeLog 2013-08-28 01:37:13 +0000 @@ -1,3 +1,10 @@ +2013-08-28 Stefan Monnier + + Try to reduce redundancy in doc/misc/Makefile.in. + * Makefile.in (DOCMISC_W32): New var to replace DOCMISC_*_W32. + (TARGETS): New intermediate variable. + (DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS): Use it. + 2013-08-27 Glenn Morris * efaq.texi (Emacs for MS-Windows): Update location of MS FAQ. === modified file 'doc/misc/Makefile.in' --- doc/misc/Makefile.in 2013-08-27 17:19:04 +0000 +++ doc/misc/Makefile.in 2013-08-28 01:37:13 +0000 @@ -60,11 +60,7 @@ MAKEINFO_OPTS = --force -I$(emacsdir) ## On MS Windows, efaq-w32; otherwise blank. -DOCMISC_DVI_W32 = @DOCMISC_DVI_W32@ -DOCMISC_HTML_W32 = @DOCMISC_HTML_W32@ -DOCMISC_INFO_W32 = @DOCMISC_INFO_W32@ -DOCMISC_PDF_W32 = @DOCMISC_PDF_W32@ -DOCMISC_PS_W32 = @DOCMISC_PS_W32@ +DOCMISC_W32 = @DOCMISC_W32@ ## Info files to build and install on all platforms. INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \ @@ -84,237 +80,15 @@ ## because the info files are pre-built in release tarfiles. INFO_TARGETS = $(INFO_COMMON) efaq-w32 -DVI_TARGETS = $(DOCMISC_DVI_W32) \ - ada-mode.dvi \ - auth.dvi \ - autotype.dvi \ - bovine.dvi \ - calc.dvi \ - cc-mode.dvi \ - cl.dvi \ - dbus.dvi \ - dired-x.dvi \ - ebrowse.dvi \ - ede.dvi \ - ediff.dvi \ - edt.dvi \ - efaq.dvi \ - eieio.dvi \ - emacs-mime.dvi \ - epa.dvi \ - erc.dvi \ - ert.dvi \ - eshell.dvi \ - eudc.dvi \ - flymake.dvi \ - forms.dvi \ - gnus.dvi \ - emacs-gnutls.dvi \ - htmlfontify.dvi \ - idlwave.dvi \ - ido.dvi \ - info.dvi \ - mairix-el.dvi \ - message.dvi \ - mh-e.dvi \ - newsticker.dvi \ - nxml-mode.dvi \ - org.dvi \ - pcl-cvs.dvi \ - pgg.dvi \ - rcirc.dvi \ - reftex.dvi \ - remember.dvi \ - sasl.dvi \ - sc.dvi \ - semantic.dvi \ - ses.dvi \ - sieve.dvi \ - smtpmail.dvi \ - speedbar.dvi \ - srecode.dvi \ - todo-mode.dvi \ - tramp.dvi \ - url.dvi \ - vip.dvi \ - viper.dvi \ - widget.dvi \ - wisent.dvi \ - woman.dvi - -HTML_TARGETS = $(DOCMISC_HTML_W32) \ - ada-mode.html \ - auth.html \ - autotype.html \ - bovine.html \ - calc.html \ - cc-mode.html \ - cl.html \ - dbus.html \ - dired-x.html \ - ebrowse.html \ - ede.html \ - ediff.html \ - edt.html \ - efaq.html \ - eieio.html \ - emacs-mime.html \ - epa.html \ - erc.html \ - ert.html \ - eshell.html \ - eudc.html \ - flymake.html \ - forms.html \ - gnus.html \ - emacs-gnutls.html \ - htmlfontify.html \ - idlwave.html \ - ido.html \ - info.html \ - mairix-el.html \ - message.html \ - mh-e.html \ - newsticker.html \ - nxml-mode.html \ - org.html \ - pcl-cvs.html \ - pgg.html \ - rcirc.html \ - reftex.html \ - remember.html \ - sasl.html \ - sc.html \ - semantic.html \ - ses.html \ - sieve.html \ - smtpmail.html \ - speedbar.html \ - srecode.html \ - todo-mode.html \ - tramp.html \ - url.html \ - vip.html \ - viper.html \ - widget.html \ - wisent.html \ - woman.html - -PDF_TARGETS = $(DOCMISC_PDF_W32) \ - ada-mode.pdf \ - auth.pdf \ - autotype.pdf \ - bovine.pdf \ - calc.pdf \ - cc-mode.pdf \ - cl.pdf \ - dbus.pdf \ - dired-x.pdf \ - ebrowse.pdf \ - ede.pdf \ - ediff.pdf \ - edt.pdf \ - efaq.pdf \ - eieio.pdf \ - emacs-mime.pdf \ - epa.pdf \ - erc.pdf \ - ert.pdf \ - eshell.pdf \ - eudc.pdf \ - flymake.pdf \ - forms.pdf \ - gnus.pdf \ - htmlfontify.pdf \ - emacs-gnutls.pdf \ - idlwave.pdf \ - ido.pdf \ - info.pdf \ - mairix-el.pdf \ - message.pdf \ - mh-e.pdf \ - newsticker.pdf \ - nxml-mode.pdf \ - org.pdf \ - pcl-cvs.pdf \ - pgg.pdf \ - rcirc.pdf \ - reftex.pdf \ - remember.pdf \ - sasl.pdf \ - sc.pdf \ - semantic.pdf \ - ses.pdf \ - sieve.pdf \ - smtpmail.pdf \ - speedbar.pdf \ - srecode.pdf \ - todo-mode.pdf \ - tramp.pdf \ - url.pdf \ - vip.pdf \ - viper.pdf \ - widget.pdf \ - wisent.pdf \ - woman.pdf - -PS_TARGETS = $(DOCMISC_PS_W32) \ - ada-mode.ps \ - auth.ps \ - autotype.ps \ - bovine.ps \ - calc.ps \ - cc-mode.ps \ - cl.ps \ - dbus.ps \ - dired-x.ps \ - ebrowse.ps \ - ede.ps \ - ediff.ps \ - edt.ps \ - efaq.ps \ - eieio.ps \ - emacs-mime.ps \ - epa.ps \ - erc.ps \ - ert.ps \ - eshell.ps \ - eudc.ps \ - flymake.ps \ - forms.ps \ - gnus.ps \ - htmlfontify.ps \ - emacs-gnutls.ps \ - idlwave.ps \ - ido.ps \ - info.ps \ - mairix-el.ps \ - message.ps \ - mh-e.ps \ - newsticker.ps \ - nxml-mode.ps \ - org.ps \ - pcl-cvs.ps \ - pgg.ps \ - rcirc.ps \ - reftex.ps \ - remember.ps \ - sasl.ps \ - sc.ps \ - semantic.ps \ - ses.ps \ - sieve.ps \ - smtpmail.ps \ - speedbar.ps \ - srecode.ps \ - todo-mode.ps \ - tramp.ps \ - url.ps \ - vip.ps \ - viper.ps \ - widget.ps \ - wisent.ps \ - woman.ps +# There are some naming differences between the info targets and the other +# targets, so let's resolve them here. +TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode) +TARGETS = $(TARGETS_1:info.info=info) + +DVI_TARGETS = $(TARGETS:=.dvi) +HTML_TARGETS = $(TARGETS:=.html) +PDF_TARGETS = $(TARGETS:=.pdf) +PS_TARGETS = $(TARGETS:=.ps) TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf ------------------------------------------------------------ revno: 114035 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-08-27 21:33:31 -0400 message: * lisp/emacs-lisp/cconv.el (cconv--analyse-function): Improve warning. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-27 16:06:16 +0000 +++ lisp/ChangeLog 2013-08-28 01:33:31 +0000 @@ -1,3 +1,7 @@ +2013-08-28 Stefan Monnier + + * emacs-lisp/cconv.el (cconv--analyse-function): Improve warning. + 2013-08-27 Juri Linkov * isearch.el (isearch-other-meta-char): Don't store kmacro commands @@ -12,8 +16,8 @@ 2013-08-27 Martin Rudalics * window.el (display-buffer-use-some-window): Add missing - argument in call of get-largest-window (Bug#15185). Reported by - Stephen Leake. + argument in call of get-largest-window (Bug#15185). + Reported by Stephen Leake. 2013-08-27 Glenn Morris @@ -38,8 +42,8 @@ * net/tramp-adb.el (tramp-adb-maybe-open-connection): * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * net/tramp-sh.el (tramp-maybe-open-connection): - * net/tramp-smb.el (tramp-smb-maybe-open-connection): Apply - `tramp-check-proper-host'. + * net/tramp-smb.el (tramp-smb-maybe-open-connection): + Apply `tramp-check-proper-host'. 2013-08-26 Tassilo Horn === modified file 'lisp/emacs-lisp/cconv.el' --- lisp/emacs-lisp/cconv.el 2013-06-14 02:31:28 +0000 +++ lisp/emacs-lisp/cconv.el 2013-08-28 01:33:31 +0000 @@ -552,7 +552,8 @@ (cond ((byte-compile-not-lexical-var-p arg) (byte-compile-log-warning - (format "Argument %S is not a lexical variable" arg))) + (format "Lexical argument shadows the dynamic variable %S" + arg))) ((eq ?& (aref (symbol-name arg) 0)) nil) ;Ignore &rest, &optional, ... (t (let ((varstruct (list arg nil nil nil nil))) (cl-pushnew arg byte-compile-lexical-variables) ------------------------------------------------------------ revno: 114034 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-27 15:40:24 -0400 message: Update location of Emacs on MS Windows FAQ diff: === modified file 'admin/nt/README-ftp-server' --- admin/nt/README-ftp-server 2013-06-19 06:31:20 +0000 +++ admin/nt/README-ftp-server 2013-08-27 19:40:24 +0000 @@ -16,12 +16,6 @@ accustomed to compiling programs themselves. Corresponding source can be found in the parent directory in emacs-24.3.tar.gz. - If you have access to the World Wide Web, I would recommend pointing - your favorite web browser to the following document (if you haven't - already): - - http://www.gnu.org/software/emacs/windows/ntemacs.html - * IMPORTANT LEGAL REMINDER If you want to redistribute any of the precompiled distributions of @@ -230,16 +224,10 @@ * Further information - If you have access to the World Wide Web, I would recommend pointing - your favorite web browser to following the document (if you haven't - already): - - http://www.gnu.org/software/emacs/windows/ntemacs.html - - This document serves as an FAQ and a source for further information - about the Windows port and related software packages. Note that as - most of the information in that FAQ is for earlier versions, so some - information may not be relevant to Emacs-24.3. + The Emacs on MS Windows FAQ is distributed with Emacs (info + manual "efaq-w32"), and at + + http://www.gnu.org/software/emacs/manual/efaq-w32.html In addition to the FAQ, there is a mailing list for discussing issues related to the Windows port of Emacs. For information about the === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-08-27 17:19:04 +0000 +++ doc/misc/ChangeLog 2013-08-27 19:40:24 +0000 @@ -1,5 +1,7 @@ 2013-08-27 Glenn Morris + * efaq.texi (Emacs for MS-Windows): Update location of MS FAQ. + * efaq.texi: Rename from faq.texi, to match its output files. * Makefile.in: Update for faq.texi name change. === modified file 'doc/misc/efaq.texi' --- doc/misc/efaq.texi 2013-08-27 17:19:04 +0000 +++ doc/misc/efaq.texi 2013-08-27 19:40:24 +0000 @@ -3452,8 +3452,9 @@ @cindex Emacs for MS-Windows @cindex Microsoft Windows, Emacs for -There is a @uref{http://www.gnu.org/software/emacs/windows/ntemacs.html, -separate FAQ} for Emacs on MS-Windows. For MS-DOS, @pxref{Emacs for MS-DOS}. +There is a separate FAQ for Emacs on MS-Windows, +@pxref{Top,,,efaq-w32,FAQ for Emacs on MS Windows}. +For MS-DOS, @pxref{Emacs for MS-DOS}. @node Emacs for GNUstep === modified file 'etc/PROBLEMS' --- etc/PROBLEMS 2013-05-15 20:12:53 +0000 +++ etc/PROBLEMS 2013-08-27 19:40:24 +0000 @@ -3016,9 +3016,9 @@ *** MS-Windows 95/98/ME: subprocesses do not terminate properly. This is a limitation of the Operating System, and can cause problems -when shutting down Windows. Ensure that all subprocesses are exited -cleanly before exiting Emacs. For more details, see the FAQ at -http://www.gnu.org/software/emacs/windows/. +when shutting down Windows. Ensure that all subprocesses are exited +cleanly before exiting Emacs. For more details, see the Emacs on MS +Windows FAQ (info manual "efaq-w32"). *** MS-Windows 95/98/ME: crashes when Emacs invokes non-existent programs. === modified file 'nt/README' --- nt/README 2013-04-01 07:28:56 +0000 +++ nt/README 2013-08-27 19:40:24 +0000 @@ -67,10 +67,10 @@ * Further information - There is a web page that serves as a FAQ for the Windows port of - Emacs (a.k.a. NTEmacs) at: + The FAQ for the MS Windows port of Emacs is distributed with Emacs + (info manual "efaq-w32"), and also available at - http://www.gnu.org/software/emacs/windows/ntemacs.html + http://www.gnu.org/software/emacs/manual/efaq-w32.html There is also a mailing list for discussing issues related to this port of Emacs. For information about the list, see this Web page: @@ -108,11 +108,7 @@ Use the built in bug reporting functionality in Emacs so that it will be seen by the right people. You can use the command M-x - report-emacs-bug to create and send the bug report, but in some - cases there is a function to report bugs in a specific package; - e.g. M-x gnus-bug for Gnus, M-x c-submit-bug-report for C/C++/Java - mode, etc. - + report-emacs-bug to create and send the bug report. This file is part of GNU Emacs. === modified file 'nt/README.W32' --- nt/README.W32 2013-05-15 20:12:53 +0000 +++ nt/README.W32 2013-08-27 19:40:24 +0000 @@ -18,12 +18,6 @@ this file as part of the Emacs source distribution, please read those 2 files and not this one. - Answers to frequently asked questions, and further information about - this port of GNU Emacs and related software packages can be found via - http: - - http://www.gnu.org/software/emacs/windows/ - * Preliminaries Along with this file should be six subdirectories (bin, etc, info, @@ -242,14 +236,10 @@ * Further information - If you have access to the World Wide Web, I would recommend pointing - your favorite web browser to the following document (if you haven't - already): - - http://www.gnu.org/software/emacs/windows/ - - This document serves as an FAQ and a source for further information - about the Windows port and related software packages. + The FAQ for the MS Windows port of Emacs is distributed with Emacs + (info manual "efaq-w32"), and also available at + + http://www.gnu.org/software/emacs/manual/efaq-w32.html In addition to the FAQ, there is a mailing list for discussing issues related to the Windows port of Emacs. For information about the ------------------------------------------------------------ revno: 114033 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-08-27 12:36:28 -0700 message: Simplify SELECT_TYPE-related code. Like EMACS_TIME, this portability layer is no longer needed, since Emacs has been using fd_set as a portability layer for some time. * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed. (SELECT_TYPE): Remove. All uses changed to fd_set. (fd_set) [!FD_SET]: New typedef. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-27 18:47:55 +0000 +++ src/ChangeLog 2013-08-27 19:36:28 +0000 @@ -1,5 +1,12 @@ 2013-08-27 Paul Eggert + Simplify SELECT_TYPE-related code. + Like EMACS_TIME, this portability layer is no longer needed, since + Emacs has been using fd_set as a portability layer for some time. + * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed. + (SELECT_TYPE): Remove. All uses changed to fd_set. + (fd_set) [!FD_SET]: New typedef. + Simplify EMACS_TIME-related code. This portability layer is no longer needed, since Emacs has been using struct timespec as a portability layer for some time. === modified file 'src/nsterm.m' --- src/nsterm.m 2013-08-27 18:47:55 +0000 +++ src/nsterm.m 2013-08-27 19:36:28 +0000 @@ -4686,7 +4686,7 @@ int waiting = 1, nfds; char c; - SELECT_TYPE readfds, writefds, *wfds; + fd_set readfds, writefds, *wfds; struct timespec timeout, *tmo; NSAutoreleasePool *pool = nil; @@ -4699,7 +4699,7 @@ if (waiting) { - SELECT_TYPE fds; + fd_set fds; FD_ZERO (&fds); FD_SET (selfds[0], &fds); result = select (selfds[0]+1, &fds, NULL, NULL, NULL); === modified file 'src/process.c' --- src/process.c 2013-08-27 18:47:55 +0000 +++ src/process.c 2013-08-27 19:36:28 +0000 @@ -132,7 +132,7 @@ #endif #ifdef WINDOWSNT -extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, +extern int sys_select (int, fd_set *, fd_set *, fd_set *, struct timespec *, void *); #endif @@ -280,7 +280,7 @@ static void create_process (Lisp_Object, char **, Lisp_Object); #ifdef USABLE_SIGIO -static bool keyboard_bit_set (SELECT_TYPE *); +static bool keyboard_bit_set (fd_set *); #endif static void deactivate_process (Lisp_Object); static void status_notify (struct Lisp_Process *); @@ -299,26 +299,26 @@ /* Mask of bits indicating the descriptors that we wait for input on. */ -static SELECT_TYPE input_wait_mask; +static fd_set input_wait_mask; /* Mask that excludes keyboard input descriptor(s). */ -static SELECT_TYPE non_keyboard_wait_mask; +static fd_set non_keyboard_wait_mask; /* Mask that excludes process input descriptor(s). */ -static SELECT_TYPE non_process_wait_mask; +static fd_set non_process_wait_mask; /* Mask for selecting for write. */ -static SELECT_TYPE write_mask; +static fd_set write_mask; #ifdef NON_BLOCKING_CONNECT /* Mask of bits indicating the descriptors that we wait for connect to complete on. Once they complete, they are removed from this mask and added to the input_wait_mask and non_keyboard_wait_mask. */ -static SELECT_TYPE connect_wait_mask; +static fd_set connect_wait_mask; /* Number of bits set in connect_wait_mask. */ static int num_pending_connects; @@ -331,7 +331,7 @@ static int max_input_desc; /* Indexed by descriptor, gives the process (if any) for that descriptor */ -static Lisp_Object chan_process[MAXDESC]; +static Lisp_Object chan_process[FD_SETSIZE]; /* Alist of elements (NAME . PROCESS) */ static Lisp_Object Vprocess_alist; @@ -342,18 +342,18 @@ output from the process is to read at least one char. Always -1 on systems that support FIONREAD. */ -static int proc_buffered_char[MAXDESC]; +static int proc_buffered_char[FD_SETSIZE]; /* Table of `struct coding-system' for each process. */ -static struct coding_system *proc_decode_coding_system[MAXDESC]; -static struct coding_system *proc_encode_coding_system[MAXDESC]; +static struct coding_system *proc_decode_coding_system[FD_SETSIZE]; +static struct coding_system *proc_encode_coding_system[FD_SETSIZE]; #ifdef DATAGRAM_SOCKETS /* Table of `partner address' for datagram sockets. */ static struct sockaddr_and_len { struct sockaddr *sa; int len; -} datagram_address[MAXDESC]; +} datagram_address[FD_SETSIZE]; #define DATAGRAM_CHAN_P(chan) (datagram_address[chan].sa != 0) #define DATAGRAM_CONN_P(proc) (PROCESSP (proc) && datagram_address[XPROCESS (proc)->infd].sa != 0) #else @@ -458,7 +458,7 @@ #define FOR_READ 1 #define FOR_WRITE 2 int condition; /* mask of the defines above. */ -} fd_callback_info[MAXDESC]; +} fd_callback_info[FD_SETSIZE]; /* Add a file descriptor FD to be monitored for when read is possible. @@ -467,7 +467,7 @@ void add_read_fd (int fd, fd_callback func, void *data) { - eassert (fd < MAXDESC); + eassert (fd < FD_SETSIZE); add_keyboard_wait_descriptor (fd); fd_callback_info[fd].func = func; @@ -480,7 +480,7 @@ void delete_read_fd (int fd) { - eassert (fd < MAXDESC); + eassert (fd < FD_SETSIZE); delete_keyboard_wait_descriptor (fd); fd_callback_info[fd].condition &= ~FOR_READ; @@ -497,7 +497,7 @@ void add_write_fd (int fd, fd_callback func, void *data) { - eassert (fd < MAXDESC); + eassert (fd < FD_SETSIZE); FD_SET (fd, &write_mask); if (fd > max_input_desc) max_input_desc = fd; @@ -528,7 +528,7 @@ void delete_write_fd (int fd) { - eassert (fd < MAXDESC); + eassert (fd < FD_SETSIZE); FD_CLR (fd, &write_mask); fd_callback_info[fd].condition &= ~FOR_WRITE; if (fd_callback_info[fd].condition == 0) @@ -3232,7 +3232,7 @@ wait for completion is pselect(). */ int sc; socklen_t len; - SELECT_TYPE fdset; + fd_set fdset; retry_select: FD_ZERO (&fdset); FD_SET (s, &fdset); @@ -4232,8 +4232,8 @@ struct Lisp_Process *wait_proc, int just_wait_proc) { int channel, nfds; - SELECT_TYPE Available; - SELECT_TYPE Writeok; + fd_set Available; + fd_set Writeok; bool check_write; int check_delay; bool no_avail; @@ -4387,8 +4387,8 @@ timeout to get our attention. */ if (update_tick != process_tick) { - SELECT_TYPE Atemp; - SELECT_TYPE Ctemp; + fd_set Atemp; + fd_set Ctemp; if (kbd_on_hold_p ()) FD_ZERO (&Atemp); @@ -4571,7 +4571,7 @@ the gnutls library -- 2.12.14 has been confirmed to need it. See http://comments.gmane.org/gmane.emacs.devel/145074 */ - for (channel = 0; channel < MAXDESC; ++channel) + for (channel = 0; channel < FD_SETSIZE; ++channel) if (! NILP (chan_process[channel])) { struct Lisp_Process *p = @@ -6542,7 +6542,7 @@ #else /* not subprocesses */ /* Defined on msdos.c. */ -extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, +extern int sys_select (int, fd_set *, fd_set *, fd_set *, struct timespec *, void *); /* Implementation of wait_reading_process_output, assuming that there @@ -6608,7 +6608,7 @@ while (1) { bool timeout_reduced_for_timers = 0; - SELECT_TYPE waitchannels; + fd_set waitchannels; int xerrno; /* If calling from keyboard input, do not quit @@ -7072,7 +7072,7 @@ Vprocess_alist = Qnil; deleted_pid_list = Qnil; - for (i = 0; i < MAXDESC; i++) + for (i = 0; i < FD_SETSIZE; i++) { chan_process[i] = Qnil; proc_buffered_char[i] = -1; === modified file 'src/sysdep.c' --- src/sysdep.c 2013-08-27 18:47:55 +0000 +++ src/sysdep.c 2013-08-27 19:36:28 +0000 @@ -588,7 +588,7 @@ } #ifdef USABLE_SIGIO -static int old_fcntl_flags[MAXDESC]; +static int old_fcntl_flags[FD_SETSIZE]; #endif void @@ -817,7 +817,7 @@ #ifdef F_SETOWN -static int old_fcntl_owner[MAXDESC]; +static int old_fcntl_owner[FD_SETSIZE]; #endif /* F_SETOWN */ /* This may also be defined in stdio, === modified file 'src/sysselect.h' --- src/sysselect.h 2013-01-01 09:11:05 +0000 +++ src/sysselect.h 2013-08-27 19:36:28 +0000 @@ -25,15 +25,12 @@ definitions in w32.h are incompatible with the below. */ #ifndef WINDOWSNT #ifdef FD_SET -#ifdef FD_SETSIZE -#define MAXDESC FD_SETSIZE -#else -#define MAXDESC 64 +#ifndef FD_SETSIZE +#define FD_SETSIZE 64 #endif -#define SELECT_TYPE fd_set #else /* no FD_SET */ -#define MAXDESC 32 -#define SELECT_TYPE int +#define FD_SETSIZE 32 +typedef int fd_set; /* Define the macros to access a single-int bitmap of descriptors. */ #define FD_SET(n, p) (*(p) |= (1 << (n))) === modified file 'src/xgselect.c' --- src/xgselect.c 2013-08-27 18:47:55 +0000 +++ src/xgselect.c 2013-08-27 19:36:28 +0000 @@ -29,10 +29,10 @@ #include "frame.h" int -xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, +xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timespec const *timeout, sigset_t const *sigmask) { - SELECT_TYPE all_rfds, all_wfds; + fd_set all_rfds, all_wfds; struct timespec tmo; struct timespec const *tmop = timeout; === modified file 'src/xgselect.h' --- src/xgselect.h 2013-08-27 18:47:55 +0000 +++ src/xgselect.h 2013-08-27 19:36:28 +0000 @@ -25,9 +25,7 @@ #include "sysselect.h" extern int xg_select (int max_fds, - SELECT_TYPE *rfds, - SELECT_TYPE *wfds, - SELECT_TYPE *efds, + fd_set *rfds, fd_set *wfds, fd_set *efds, struct timespec const *timeout, sigset_t const *sigmask); === modified file 'src/xmenu.c' --- src/xmenu.c 2013-08-27 18:47:55 +0000 +++ src/xmenu.c 2013-08-27 19:36:28 +0000 @@ -378,7 +378,7 @@ ) { struct timespec next_time = timer_check (), *ntp; - SELECT_TYPE read_fds; + fd_set read_fds; struct x_display_info *dpyinfo; int n = 0; === modified file 'src/xterm.c' --- src/xterm.c 2013-08-27 18:47:55 +0000 +++ src/xterm.c 2013-08-27 19:36:28 +0000 @@ -8676,7 +8676,7 @@ { int level = interrupt_input_blocked; - SELECT_TYPE fds; + fd_set fds; struct timespec tmo, tmo_at, time_now; int fd = ConnectionNumber (FRAME_X_DISPLAY (f)); ------------------------------------------------------------ revno: 114032 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-08-27 12:02:42 -0700 message: Spelling fixes. diff: === modified file 'lisp/ChangeLog.12' --- lisp/ChangeLog.12 2013-01-01 09:11:05 +0000 +++ lisp/ChangeLog.12 2013-08-27 19:02:42 +0000 @@ -17355,7 +17355,7 @@ * calc/calc-embed.el (calc-do-embedded): Update help message. - * calc/calc-prog.el (calc-user-define-invokation): Update help message. + * calc/calc-prog.el (calc-user-define-invocation): Update help message. 2005-11-28 Stefan Monnier === modified file 'test/automated/eieio-test-methodinvoke.el' --- test/automated/eieio-test-methodinvoke.el 2013-08-21 19:42:52 +0000 +++ test/automated/eieio-test-methodinvoke.el 2013-08-27 19:02:42 +0000 @@ -1,4 +1,4 @@ -;;; eieio-testsinvoke.el -- eieio tests for method invokation +;;; eieio-testsinvoke.el -- eieio tests for method invocation ;; Copyright (C) 2005, 2008, 2010, 2013 Free Software Foundation, Inc. @@ -136,7 +136,7 @@ (setq eieio-test-method-order-list (nreverse eieio-test-method-order-list)) (eieio-test-match ans))) -;;; Test static invokation +;;; Test static invocation ;; (defmethod eitest-H :STATIC ((class eitest-A)) "No need to do work in here." === modified file 'test/automated/eieio-tests.el' --- test/automated/eieio-tests.el 2013-08-21 19:42:52 +0000 +++ test/automated/eieio-tests.el 2013-08-27 19:02:42 +0000 @@ -21,7 +21,7 @@ ;; along with GNU Emacs. If not, see . ;;; Commentary: -;; +;; ;; Test the various features of EIEIO. (require 'ert) @@ -66,7 +66,7 @@ :initform moose :type symbol :allocation :instance - :documentation "Fisrt slot testing slot arguments." + :documentation "First slot testing slot arguments." :custom symbol :label "Wild Animal" :group borg @@ -166,7 +166,7 @@ (defun anormalfunction () "A plain function for error testing." nil) (should-error (progn - (defgeneric anormalfunction () + (defgeneric anormalfunction () "Attempt to turn it into a generic."))) ;; Check that generic-p works @@ -589,7 +589,7 @@ ;;; HACK ALERT: The new value of a class slot is inherited by the ;; subclass! This is probably a bug. We should either share the slot ;; so sets on the baseclass change the subclass, or we should inherit - ;; the original value. + ;; the original value. ;; (should (eq (get-slot-3 eitest-t2) 'emu)) ;; (should (eq (get-slot-3 class-subc) 'emu)) ;; (setf (get-slot-3 eitest-t2) 'setf-emu) @@ -604,7 +604,7 @@ "Try to access slot-2 from this class which doesn't have it. The object S2 passed in will be of class prot-1, which does have the slot. This could be allowed, and currently is in EIEIO. -Needed by the eieio persistant base class." +Needed by the eieio persistent base class." (oref s2 slot-2)) (defclass prot-1 (prot-0) @@ -662,7 +662,7 @@ (prot0-slot-2 eitest-p1) ;; Accessing private slot out of context must fail (should-error (oref eitest-p1 slot-3) :type 'invalid-slot-name) - ;; Access private slot in ethod + ;; Access private slot in method (prot1-slot-3 eitest-p1) ;; Access private slot in subclass method must fail (should-error (prot1-slot-3 eitest-p2) :type 'invalid-slot-name) @@ -713,7 +713,7 @@ Subclasses to override slot attributes.") (defclass slotattr-ok (slotattr-base) - ((initform :initform no-init) + ((initform :initform no-init) (initarg :initarg :initblarg) (custom :custom string :label "One String" @@ -767,7 +767,7 @@ Subclasses to override slot attributes.") (defclass slotattr-class-ok (slotattr-class-base) - ((initform :initform no-init) + ((initform :initform no-init) (initarg :initarg :initblarg) (custom :custom string :label "One String" ------------------------------------------------------------ revno: 114031 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-08-27 11:47:55 -0700 message: Simplify EMACS_TIME-related code. This portability layer is no longer needed, since Emacs has been using struct timespec as a portability layer for some time. Merge from gnulib, incorporating: 2013-08-27 timespec: new convenience constants and function * src/atimer.h, src/buffer.h, src/dispextern.h, src/xgselect.h: Include rather than "systime.h"; that's all that's needed now. * src/dispnew.c: Include rather than "systime.h"; that's all that's needed now. * src/systime.h (EMACS_TIME): Remove. All uses changed to struct timespec. (EMACS_TIME_RESOLUTION): Remove. All uses changed to TIMESPEC_RESOLUTION. (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to LOG10_TIMESPEC_RESOLUTION. (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec. (EMACS_NSECS): Remove. All uses changed to tv_nsec. (make_emacs_time): Remove. All used changed to make_timespec. (invalid_timespec): Rename from invalid_emacs_time. All uses changed. (current_timespec): Rename from current_emacs_time. All uses changed. (add_emacs_time): Remove. All uses changed to timespec_add. (sub_emacs_time): Remove. All uses change dot timespec_sub. (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign. (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed. (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec. (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod. (current_timespec): Rename from current_emacs_time. All uses changed. (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses changed to timespec_cmp. * src/xgselect.c: Include , since our .h files don't. diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-27 09:21:46 +0000 +++ ChangeLog 2013-08-27 18:47:55 +0000 @@ -1,3 +1,9 @@ +2013-08-27 Paul Eggert + + Simplify EMACS_TIME-related code. + Merge from gnulib, incorporating: + 2013-08-27 timespec: new convenience constants and function + 2013-08-27 Dmitry Antipov * configure.ac (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32) === modified file 'lib-src/profile.c' --- lib-src/profile.c 2013-01-01 09:11:05 +0000 +++ lib-src/profile.c 2013-08-27 18:47:55 +0000 @@ -39,17 +39,17 @@ #include #include -static EMACS_TIME TV1; +static struct timespec TV1; static int watch_not_started = 1; /* flag */ static char time_string[INT_STRLEN_BOUND (uintmax_t) + sizeof "." - + LOG10_EMACS_TIME_RESOLUTION]; + + LOG10_TIMESPEC_RESOLUTION]; /* Reset the stopwatch to zero. */ static void reset_watch (void) { - TV1 = current_emacs_time (); + TV1 = current_timespec (); watch_not_started = 0; } @@ -60,12 +60,12 @@ static char * get_time (void) { - EMACS_TIME TV2 = sub_emacs_time (current_emacs_time (), TV1); - uintmax_t s = EMACS_SECS (TV2); - int ns = EMACS_NSECS (TV2); + struct timespec TV2 = timespec_sub (current_timespec (), TV1); + uintmax_t s = TV2.tv_sec; + int ns = TV2.tv_nsec; if (watch_not_started) exit (EXIT_FAILURE); /* call reset_watch first ! */ - sprintf (time_string, "%"PRIuMAX".%0*d", s, LOG10_EMACS_TIME_RESOLUTION, ns); + sprintf (time_string, "%"PRIuMAX".%0*d", s, LOG10_TIMESPEC_RESOLUTION, ns); return time_string; } === modified file 'lib/timespec.h' --- lib/timespec.h 2013-01-01 09:11:05 +0000 +++ lib/timespec.h 2013-08-27 18:47:55 +0000 @@ -26,6 +26,23 @@ # define _GL_TIMESPEC_INLINE _GL_INLINE #endif +/* Resolution of timespec time stamps (in units per second), and log + base 10 of the resolution. */ + +enum { TIMESPEC_RESOLUTION = 1000000000 }; +enum { LOG10_TIMESPEC_RESOLUTION = 9 }; + +/* Return a timespec with seconds S and nanoseconds NS. */ + +_GL_TIMESPEC_INLINE struct timespec +make_timespec (time_t s, long int ns) +{ + struct timespec r; + r.tv_sec = s; + r.tv_nsec = ns; + return r; +} + /* Return negative, zero, positive if A < B, A == B, A > B, respectively. For each time stamp T, this code assumes that either: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-27 04:23:54 +0000 +++ src/ChangeLog 2013-08-27 18:47:55 +0000 @@ -1,3 +1,33 @@ +2013-08-27 Paul Eggert + + Simplify EMACS_TIME-related code. + This portability layer is no longer needed, since Emacs has been + using struct timespec as a portability layer for some time. + * atimer.h, buffer.h, dispextern.h, xgselect.h: + Include rather than "systime.h"; that's all that's needed now. + * dispnew.c: Include rather than "systime.h"; + that's all that's needed now. + * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec. + (EMACS_TIME_RESOLUTION): Remove. All uses changed to + TIMESPEC_RESOLUTION. + (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to + LOG10_TIMESPEC_RESOLUTION. + (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec. + (EMACS_NSECS): Remove. All uses changed to tv_nsec. + (make_emacs_time): Remove. All used changed to make_timespec. + (invalid_timespec): Rename from invalid_emacs_time. All uses changed. + (current_timespec): Rename from current_emacs_time. All uses changed. + (add_emacs_time): Remove. All uses changed to timespec_add. + (sub_emacs_time): Remove. All uses change dot timespec_sub. + (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign. + (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed. + (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec. + (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod. + (current_timespec): Rename from current_emacs_time. All uses changed. + (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses + changed to timespec_cmp. + * xgselect.c: Include , since our .h files don't. + 2013-08-27 Dmitry Antipov * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:) === modified file 'src/alloc.c' --- src/alloc.c 2013-08-26 05:26:06 +0000 +++ src/alloc.c 2013-08-27 18:47:55 +0000 @@ -5233,7 +5233,7 @@ ptrdiff_t i; bool message_p; ptrdiff_t count = SPECPDL_INDEX (); - EMACS_TIME start; + struct timespec start; Lisp_Object retval = Qnil; size_t tot_before = 0; @@ -5258,7 +5258,7 @@ if (profiler_memory_running) tot_before = total_bytes_of_live_objects (); - start = current_emacs_time (); + start = current_timespec (); /* In case user calls debug_print during GC, don't let that cause a recursive GC. */ @@ -5521,9 +5521,9 @@ /* Accumulate statistics. */ if (FLOATP (Vgc_elapsed)) { - EMACS_TIME since_start = sub_emacs_time (current_emacs_time (), start); + struct timespec since_start = timespec_sub (current_timespec (), start); Vgc_elapsed = make_float (XFLOAT_DATA (Vgc_elapsed) - + EMACS_TIME_TO_DOUBLE (since_start)); + + timespectod (since_start)); } gcs_done++; === modified file 'src/atimer.c' --- src/atimer.c 2013-07-16 21:35:45 +0000 +++ src/atimer.c 2013-08-27 18:47:55 +0000 @@ -94,17 +94,16 @@ to cancel_atimer; don't free it yourself. */ struct atimer * -start_atimer (enum atimer_type type, EMACS_TIME timestamp, atimer_callback fn, - void *client_data) +start_atimer (enum atimer_type type, struct timespec timestamp, + atimer_callback fn, void *client_data) { struct atimer *t; /* Round TIME up to the next full second if we don't have itimers. */ #ifndef HAVE_SETITIMER - if (EMACS_NSECS (timestamp) != 0 - && EMACS_SECS (timestamp) < TYPE_MAXIMUM (time_t)) - timestamp = make_emacs_time (EMACS_SECS (timestamp) + 1, 0); + if (timestamp.tv_nsec != 0 && timestamp.tv_sec < TYPE_MAXIMUM (time_t)) + timestamp = make_timespec (timestamp.tv_sec + 1, 0); #endif /* not HAVE_SETITIMER */ /* Get an atimer structure from the free-list, or allocate @@ -133,11 +132,11 @@ break; case ATIMER_RELATIVE: - t->expiration = add_emacs_time (current_emacs_time (), timestamp); + t->expiration = timespec_add (current_timespec (), timestamp); break; case ATIMER_CONTINUOUS: - t->expiration = add_emacs_time (current_emacs_time (), timestamp); + t->expiration = timespec_add (current_timespec (), timestamp); t->interval = timestamp; break; } @@ -284,7 +283,7 @@ #ifdef HAVE_SETITIMER struct itimerval it; #endif - EMACS_TIME now, interval; + struct timespec now, interval; #ifdef HAVE_ITIMERSPEC if (alarm_timer_ok) @@ -299,10 +298,10 @@ /* Determine interval till the next timer is ripe. Don't set the interval to 0; this disables the timer. */ - now = current_emacs_time (); - interval = (EMACS_TIME_LE (atimers->expiration, now) - ? make_emacs_time (0, 1000 * 1000) - : sub_emacs_time (atimers->expiration, now)); + now = current_timespec (); + interval = (timespec_cmp (atimers->expiration, now) <= 0 + ? make_timespec (0, 1000 * 1000) + : timespec_sub (atimers->expiration, now)); #ifdef HAVE_SETITIMER @@ -310,7 +309,7 @@ it.it_value = make_timeval (interval); setitimer (ITIMER_REAL, &it, 0); #else /* not HAVE_SETITIMER */ - alarm (max (EMACS_SECS (interval), 1)); + alarm (max (interval.tv_sec, 1)); #endif /* not HAVE_SETITIMER */ } } @@ -326,7 +325,7 @@ struct atimer *a = atimers, *prev = NULL; /* Look for the first atimer that is ripe after T. */ - while (a && EMACS_TIME_LT (a->expiration, t->expiration)) + while (a && timespec_cmp (a->expiration, t->expiration) < 0) prev = a, a = a->next; /* Insert T in front of the atimer found, if any. */ @@ -341,9 +340,9 @@ static void run_timers (void) { - EMACS_TIME now = current_emacs_time (); + struct timespec now = current_timespec (); - while (atimers && EMACS_TIME_LE (atimers->expiration, now)) + while (atimers && timespec_cmp (atimers->expiration, now) <= 0) { struct atimer *t = atimers; atimers = atimers->next; @@ -351,7 +350,7 @@ if (t->type == ATIMER_CONTINUOUS) { - t->expiration = add_emacs_time (now, t->interval); + t->expiration = timespec_add (now, t->interval); schedule_atimer (t); } else === modified file 'src/atimer.h' --- src/atimer.h 2013-07-16 21:35:45 +0000 +++ src/atimer.h 2013-08-27 18:47:55 +0000 @@ -19,8 +19,8 @@ #ifndef EMACS_ATIMER_H #define EMACS_ATIMER_H -#include "systime.h" /* for EMACS_TIME */ #include +#include /* Forward declaration. */ @@ -52,10 +52,10 @@ enum atimer_type type; /* Time when this timer is ripe. */ - EMACS_TIME expiration; + struct timespec expiration; /* Interval of this timer. */ - EMACS_TIME interval; + struct timespec interval; /* Function to call when timer is ripe. Interrupt input is guaranteed to not be blocked when this function is called. */ @@ -70,7 +70,7 @@ /* Function prototypes. */ -struct atimer *start_atimer (enum atimer_type, EMACS_TIME, +struct atimer *start_atimer (enum atimer_type, struct timespec, atimer_callback, void *); void cancel_atimer (struct atimer *); void do_pending_atimers (void); === modified file 'src/buffer.c' --- src/buffer.c 2013-08-16 22:32:24 +0000 +++ src/buffer.c 2013-08-27 18:47:55 +0000 @@ -933,7 +933,7 @@ bset_filename (b, Qnil); bset_file_truename (b, Qnil); bset_directory (b, current_buffer ? BVAR (current_buffer, directory) : Qnil); - b->modtime = make_emacs_time (0, UNKNOWN_MODTIME_NSECS); + b->modtime = make_timespec (0, UNKNOWN_MODTIME_NSECS); b->modtime_size = -1; XSETFASTINT (BVAR (b, save_length), 0); b->last_window_start = 1; === modified file 'src/buffer.h' --- src/buffer.h 2013-08-15 14:52:53 +0000 +++ src/buffer.h 2013-08-27 18:47:55 +0000 @@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#include /* for off_t, time_t */ -#include "systime.h" /* for EMACS_TIME */ +#include +#include INLINE_HEADER_BEGIN #ifndef BUFFER_INLINE @@ -794,13 +794,13 @@ char local_flags[MAX_PER_BUFFER_VARS]; /* Set to the modtime of the visited file when read or written. - EMACS_NSECS (modtime) == NONEXISTENT_MODTIME_NSECS means - visited file was nonexistent. EMACS_NSECS (modtime) == + modtime.tv_nsec == NONEXISTENT_MODTIME_NSECS means + visited file was nonexistent. modtime.tv_nsec == UNKNOWN_MODTIME_NSECS means visited file modtime unknown; in no case complain about any mismatch on next save attempt. */ #define NONEXISTENT_MODTIME_NSECS (-1) #define UNKNOWN_MODTIME_NSECS (-2) - EMACS_TIME modtime; + struct timespec modtime; /* Size of the file when modtime was set. This is used to detect the case where the file grew while we were reading it, so the modtime === modified file 'src/dispextern.h' --- src/dispextern.h 2013-08-27 03:52:21 +0000 +++ src/dispextern.h 2013-08-27 18:47:55 +0000 @@ -83,7 +83,7 @@ #endif #ifdef HAVE_WINDOW_SYSTEM -# include "systime.h" +# include #endif #ifndef HAVE_WINDOW_SYSTEM @@ -2710,7 +2710,7 @@ hlinfo->mouse_face_mouse_x = hlinfo->mouse_face_mouse_y = 0; hlinfo->mouse_face_beg_x = hlinfo->mouse_face_end_x = 0; hlinfo->mouse_face_face_id = DEFAULT_FACE_ID; - hlinfo->mouse_face_mouse_frame = NULL; + hlinfo->mouse_face_mouse_frame = NULL; hlinfo->mouse_face_window = Qnil; hlinfo->mouse_face_overlay = Qnil; hlinfo->mouse_face_past_end = 0; @@ -2914,7 +2914,7 @@ { /* The time in seconds at which the image was last displayed. Set in prepare_image_for_display. */ - EMACS_TIME timestamp; + struct timespec timestamp; /* Pixmaps of the image. */ Pixmap pixmap, mask; === modified file 'src/dispnew.c' --- src/dispnew.c 2013-08-23 03:03:37 +0000 +++ src/dispnew.c 2013-08-27 18:47:55 +0000 @@ -49,12 +49,10 @@ #include TERM_HEADER #endif /* HAVE_WINDOW_SYSTEM */ -/* Include systime.h after xterm.h to avoid double inclusion of time.h. */ - -#include "systime.h" #include #include +#include #if defined (HAVE_TERM_H) && defined (GNU_LINUX) #include /* for tgetent */ @@ -5708,9 +5706,9 @@ if (duration > 0) { - EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (duration); - wait_reading_process_output (min (EMACS_SECS (t), WAIT_READING_MAX), - EMACS_NSECS (t), 0, 0, Qnil, NULL, 0); + struct timespec t = dtotimespec (duration); + wait_reading_process_output (min (t.tv_sec, WAIT_READING_MAX), + t.tv_nsec, 0, 0, Qnil, NULL, 0); } return Qnil; @@ -5757,9 +5755,9 @@ return Qt; else { - EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (seconds); - sec = min (EMACS_SECS (t), WAIT_READING_MAX); - nsec = EMACS_NSECS (t); + struct timespec t = dtotimespec (seconds); + sec = min (t.tv_sec, WAIT_READING_MAX); + nsec = t.tv_nsec; } } else if (EQ (timeout, Qt)) === modified file 'src/editfns.c' --- src/editfns.c 2013-08-16 02:09:08 +0000 +++ src/editfns.c 2013-08-27 18:47:55 +0000 @@ -64,7 +64,7 @@ extern Lisp_Object w32_get_internal_run_time (void); #endif -static Lisp_Object format_time_string (char const *, ptrdiff_t, EMACS_TIME, +static Lisp_Object format_time_string (char const *, ptrdiff_t, struct timespec, bool, struct tm *); static int tm_diff (struct tm *, struct tm *); static void update_buffer_properties (ptrdiff_t, ptrdiff_t); @@ -1420,7 +1420,7 @@ picosecond counts. */) (void) { - return make_lisp_time (current_emacs_time ()); + return make_lisp_time (current_timespec ()); } DEFUN ("get-internal-run-time", Fget_internal_run_time, Sget_internal_run_time, @@ -1450,7 +1450,7 @@ usecs -= 1000000; secs++; } - return make_lisp_time (make_emacs_time (secs, usecs * 1000)); + return make_lisp_time (make_timespec (secs, usecs * 1000)); #else /* ! HAVE_GETRUSAGE */ #ifdef WINDOWSNT return w32_get_internal_run_time (); @@ -1481,10 +1481,10 @@ UNKNOWN_MODTIME_NSECS; in that case, the Lisp list contains a correspondingly negative picosecond count. */ Lisp_Object -make_lisp_time (EMACS_TIME t) +make_lisp_time (struct timespec t) { - int ns = EMACS_NSECS (t); - return make_time_tail (EMACS_SECS (t), list2i (ns / 1000, ns % 1000 * 1000)); + int ns = t.tv_nsec; + return make_time_tail (t.tv_sec, list2i (ns / 1000, ns % 1000 * 1000)); } /* Decode a Lisp list SPECIFIED_TIME that represents a time. @@ -1529,7 +1529,7 @@ list, generate the corresponding time value. If RESULT is not null, store into *RESULT the converted time; - this can fail if the converted time does not fit into EMACS_TIME. + this can fail if the converted time does not fit into struct timespec. If *DRESULT is not null, store into *DRESULT the number of seconds since the start of the POSIX Epoch. @@ -1537,7 +1537,7 @@ bool decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec, Lisp_Object psec, - EMACS_TIME *result, double *dresult) + struct timespec *result, double *dresult) { EMACS_INT hi, lo, us, ps; if (! (INTEGERP (high) && INTEGERP (low) @@ -1565,7 +1565,7 @@ /* Return the greatest representable time that is not greater than the requested time. */ time_t sec = hi; - *result = make_emacs_time ((sec << 16) + lo, us * 1000 + ps / 1000); + *result = make_timespec ((sec << 16) + lo, us * 1000 + ps / 1000); } else { @@ -1583,15 +1583,15 @@ /* Decode a Lisp list SPECIFIED_TIME that represents a time. If SPECIFIED_TIME is nil, use the current time. - Round the time down to the nearest EMACS_TIME value. + Round the time down to the nearest struct timespec value. Return seconds since the Epoch. Signal an error if unsuccessful. */ -EMACS_TIME +struct timespec lisp_time_argument (Lisp_Object specified_time) { - EMACS_TIME t; + struct timespec t; if (NILP (specified_time)) - t = current_emacs_time (); + t = current_timespec (); else { Lisp_Object high, low, usec, psec; @@ -1613,12 +1613,12 @@ else { Lisp_Object high, low, usec, psec; - EMACS_TIME t; + struct timespec t; if (! (disassemble_lisp_time (specified_time, &high, &low, &usec, &psec) && decode_time_components (high, low, make_number (0), make_number (0), &t, 0))) error ("Invalid time specification"); - return EMACS_SECS (t); + return t.tv_sec; } } @@ -1639,8 +1639,8 @@ double t; if (NILP (specified_time)) { - EMACS_TIME now = current_emacs_time (); - t = EMACS_SECS (now) + EMACS_NSECS (now) / 1e9; + struct timespec now = current_timespec (); + t = now.tv_sec + now.tv_nsec / 1e9; } else { @@ -1758,7 +1758,7 @@ usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL) */) (Lisp_Object format_string, Lisp_Object timeval, Lisp_Object universal) { - EMACS_TIME t = lisp_time_argument (timeval); + struct timespec t = lisp_time_argument (timeval); struct tm tm; CHECK_STRING (format_string); @@ -1770,20 +1770,20 @@ static Lisp_Object format_time_string (char const *format, ptrdiff_t formatlen, - EMACS_TIME t, bool ut, struct tm *tmp) + struct timespec t, bool ut, struct tm *tmp) { char buffer[4000]; char *buf = buffer; ptrdiff_t size = sizeof buffer; size_t len; Lisp_Object bufstring; - int ns = EMACS_NSECS (t); + int ns = t.tv_nsec; struct tm *tm; USE_SAFE_ALLOCA; while (1) { - time_t *taddr = emacs_secs_addr (&t); + time_t *taddr = &t.tv_sec; block_input (); synchronize_system_time_locale (); @@ -2068,17 +2068,17 @@ the data it can't find. */) (Lisp_Object specified_time) { - EMACS_TIME value; + struct timespec value; int offset; struct tm *t; struct tm localtm; Lisp_Object zone_offset, zone_name; zone_offset = Qnil; - value = make_emacs_time (lisp_seconds_argument (specified_time), 0); + value = make_timespec (lisp_seconds_argument (specified_time), 0); zone_name = format_time_string ("%Z", sizeof "%Z" - 1, value, 0, &localtm); block_input (); - t = gmtime (emacs_secs_addr (&value)); + t = gmtime (&value.tv_sec); if (t) offset = tm_diff (&localtm, t); unblock_input (); === modified file 'src/fileio.c' --- src/fileio.c 2013-08-23 17:57:07 +0000 +++ src/fileio.c 2013-08-27 18:47:55 +0000 @@ -2045,7 +2045,7 @@ /* CopyFile retains the timestamp by default. */ else if (NILP (keep_time)) { - EMACS_TIME now; + struct timespec now; DWORD attributes; char * filename; @@ -2054,7 +2054,7 @@ /* Ensure file is writable while its modified time is set. */ attributes = GetFileAttributes (filename); SetFileAttributes (filename, attributes & ~FILE_ATTRIBUTE_READONLY); - now = current_emacs_time (); + now = current_timespec (); if (set_file_times (-1, filename, now, now)) { /* Restore original attributes. */ @@ -2178,8 +2178,8 @@ if (!NILP (keep_time)) { - EMACS_TIME atime = get_stat_atime (&st); - EMACS_TIME mtime = get_stat_mtime (&st); + struct timespec atime = get_stat_atime (&st); + struct timespec mtime = get_stat_mtime (&st); if (set_file_times (ofd, SSDATA (encoded_newname), atime, mtime)) xsignal2 (Qfile_date_error, build_string ("Cannot set file date"), newname); @@ -3286,7 +3286,7 @@ { Lisp_Object absname, encoded_absname; Lisp_Object handler; - EMACS_TIME t = lisp_time_argument (timestamp); + struct timespec t = lisp_time_argument (timestamp); absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); @@ -3363,7 +3363,7 @@ if (stat (SSDATA (absname2), &st2) < 0) return Qt; - return (EMACS_TIME_LT (get_stat_mtime (&st2), get_stat_mtime (&st1)) + return (timespec_cmp (get_stat_mtime (&st2), get_stat_mtime (&st1)) < 0 ? Qt : Qnil); } @@ -3463,13 +3463,13 @@ } /* Return a special time value indicating the error number ERRNUM. */ -static EMACS_TIME +static struct timespec time_error_value (int errnum) { int ns = (errnum == ENOENT || errnum == EACCES || errnum == ENOTDIR ? NONEXISTENT_MODTIME_NSECS : UNKNOWN_MODTIME_NSECS); - return make_emacs_time (0, ns); + return make_timespec (0, ns); } DEFUN ("insert-file-contents", Finsert_file_contents, Sinsert_file_contents, @@ -3501,7 +3501,7 @@ (Lisp_Object filename, Lisp_Object visit, Lisp_Object beg, Lisp_Object end, Lisp_Object replace) { struct stat st; - EMACS_TIME mtime; + struct timespec mtime; int fd; ptrdiff_t inserted = 0; ptrdiff_t how_much; @@ -4567,7 +4567,7 @@ } if (!NILP (visit) - && EMACS_NSECS (current_buffer->modtime) == NONEXISTENT_MODTIME_NSECS) + && current_buffer->modtime.tv_nsec == NONEXISTENT_MODTIME_NSECS) { /* If visiting nonexistent file, return nil. */ report_file_errno ("Opening input file", orig_filename, save_errno); @@ -4766,7 +4766,7 @@ int save_errno = 0; const char *fn; struct stat st; - EMACS_TIME modtime; + struct timespec modtime; ptrdiff_t count = SPECPDL_INDEX (); ptrdiff_t count1 IF_LINT (= 0); Lisp_Object handler; @@ -4980,7 +4980,7 @@ } } - modtime = invalid_emacs_time (); + modtime = invalid_timespec (); if (visiting) { if (fstat (desc, &st) == 0) @@ -5014,7 +5014,7 @@ unlikely and a similar race between the last write and the fstat above cannot possibly be closed anyway. */ - if (EMACS_TIME_VALID_P (modtime) + if (timespec_valid_p (modtime) && ! (valid_timestamp_file_system && st.st_dev == timestamp_file_system)) { int desc1 = emacs_open (fn, O_WRONLY | O_BINARY, 0); @@ -5036,11 +5036,11 @@ bool use_heuristic = ((open_flags & (O_EXCL | O_TRUNC)) != 0 && st.st_size != 0 - && EMACS_NSECS (modtime) % 100 != 0); + && modtime.tv_nsec % 100 != 0); - EMACS_TIME modtime1 = get_stat_mtime (&st1); + struct timespec modtime1 = get_stat_mtime (&st1); if (use_heuristic - && EMACS_TIME_EQ (modtime, modtime1) + && timespec_cmp (modtime, modtime1) == 0 && st.st_size == st1.st_size) { timestamp_file_system = st.st_dev; @@ -5080,7 +5080,7 @@ /* Do this before reporting IO error to avoid a "file has changed on disk" warning on next attempt to save. */ - if (EMACS_TIME_VALID_P (modtime)) + if (timespec_valid_p (modtime)) { current_buffer->modtime = modtime; current_buffer->modtime_size = st.st_size; @@ -5355,7 +5355,7 @@ struct stat st; Lisp_Object handler; Lisp_Object filename; - EMACS_TIME mtime; + struct timespec mtime; if (NILP (buf)) b = current_buffer; @@ -5366,7 +5366,7 @@ } if (!STRINGP (BVAR (b, filename))) return Qt; - if (EMACS_NSECS (b->modtime) == UNKNOWN_MODTIME_NSECS) return Qt; + if (b->modtime.tv_nsec == UNKNOWN_MODTIME_NSECS) return Qt; /* If the file name has special constructs in it, call the corresponding file handler. */ @@ -5380,7 +5380,7 @@ mtime = (stat (SSDATA (filename), &st) == 0 ? get_stat_mtime (&st) : time_error_value (errno)); - if (EMACS_TIME_EQ (mtime, b->modtime) + if (timespec_cmp (mtime, b->modtime) == 0 && (b->modtime_size < 0 || st.st_size == b->modtime_size)) return Qt; @@ -5397,7 +5397,7 @@ See Info node `(elisp)Modification Time' for more details. */) (void) { - int ns = EMACS_NSECS (current_buffer->modtime); + int ns = current_buffer->modtime.tv_nsec; if (ns < 0) return make_number (UNKNOWN_MODTIME_NSECS - ns); return make_lisp_time (current_buffer->modtime); @@ -5416,11 +5416,11 @@ { if (!NILP (time_flag)) { - EMACS_TIME mtime; + struct timespec mtime; if (INTEGERP (time_flag)) { CHECK_RANGED_INTEGER (time_flag, -1, 0); - mtime = make_emacs_time (0, UNKNOWN_MODTIME_NSECS - XINT (time_flag)); + mtime = make_timespec (0, UNKNOWN_MODTIME_NSECS - XINT (time_flag)); } else mtime = lisp_time_argument (time_flag); @@ -5683,12 +5683,12 @@ || NILP (Ffind_file_name_handler (BVAR (b, auto_save_file_name), Qwrite_region)))) { - EMACS_TIME before_time = current_emacs_time (); - EMACS_TIME after_time; + struct timespec before_time = current_timespec (); + struct timespec after_time; /* If we had a failure, don't try again for 20 minutes. */ if (b->auto_save_failure_time > 0 - && EMACS_SECS (before_time) - b->auto_save_failure_time < 1200) + && before_time.tv_sec - b->auto_save_failure_time < 1200) continue; set_buffer_internal (b); @@ -5721,12 +5721,12 @@ XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG); set_buffer_internal (old); - after_time = current_emacs_time (); + after_time = current_timespec (); /* If auto-save took more than 60 seconds, assume it was an NFS failure that got a timeout. */ - if (EMACS_SECS (after_time) - EMACS_SECS (before_time) > 60) - b->auto_save_failure_time = EMACS_SECS (after_time); + if (after_time.tv_sec - before_time.tv_sec > 60) + b->auto_save_failure_time = after_time.tv_sec; } } === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-08-27 04:23:54 +0000 +++ src/gtkutil.c 2013-08-27 18:47:55 +0000 @@ -1685,15 +1685,15 @@ xg_maybe_add_timer (gpointer data) { struct xg_dialog_data *dd = data; - EMACS_TIME next_time = timer_check (); + struct timespec next_time = timer_check (); dd->timerid = 0; - if (EMACS_TIME_VALID_P (next_time)) + if (timespec_valid_p (next_time)) { - time_t s = EMACS_SECS (next_time); - int per_ms = EMACS_TIME_RESOLUTION / 1000; - int ms = (EMACS_NSECS (next_time) + per_ms - 1) / per_ms; + time_t s = next_time.tv_sec; + int per_ms = TIMESPEC_RESOLUTION / 1000; + int ms = (next_time.tv_nsec + per_ms - 1) / per_ms; if (s <= ((guint) -1 - ms) / 1000) dd->timerid = g_timeout_add (s * 1000 + ms, xg_maybe_add_timer, dd); } === modified file 'src/image.c' --- src/image.c 2013-08-27 04:23:54 +0000 +++ src/image.c 2013-08-27 18:47:55 +0000 @@ -1041,7 +1041,7 @@ prepare_image_for_display (struct frame *f, struct image *img) { /* We're about to display IMG, so set its timestamp to `now'. */ - img->timestamp = current_emacs_time (); + img->timestamp = current_timespec (); /* If IMG doesn't have a pixmap yet, load it now, using the image type dependent loader function. */ @@ -1480,7 +1480,7 @@ else if (INTEGERP (Vimage_cache_eviction_delay)) { /* Free cache based on timestamp. */ - EMACS_TIME old, t; + struct timespec old, t; double delay; ptrdiff_t nimages = 0; @@ -1495,13 +1495,13 @@ delay = 1600 * delay / nimages / nimages; delay = max (delay, 1); - t = current_emacs_time (); - old = sub_emacs_time (t, EMACS_TIME_FROM_DOUBLE (delay)); + t = current_timespec (); + old = timespec_sub (t, dtotimespec (delay)); for (i = 0; i < c->used; ++i) { struct image *img = c->images[i]; - if (img && EMACS_TIME_LT (img->timestamp, old)) + if (img && timespec_cmp (img->timestamp, old) < 0) { free_image (f, img); ++nfreed; @@ -1764,7 +1764,7 @@ } /* We're using IMG, so set its timestamp to `now'. */ - img->timestamp = current_emacs_time (); + img->timestamp = current_timespec (); /* Value is the image id. */ return img->id; @@ -7884,7 +7884,7 @@ { MagickWand *wand; int index; - EMACS_TIME update_time; + struct timespec update_time; struct animation_cache *next; char signature[FLEXIBLE_ARRAY_MEMBER]; }; @@ -7909,13 +7909,13 @@ imagemagick_prune_animation_cache (void) { struct animation_cache **pcache = &animation_cache; - EMACS_TIME old = sub_emacs_time (current_emacs_time (), - make_emacs_time (60, 0)); + struct timespec old = timespec_sub (current_timespec (), + make_timespec (60, 0)); while (*pcache) { struct animation_cache *cache = *pcache; - if (EMACS_TIME_LE (old, cache->update_time)) + if (timespec_cmp (old, cache->update_time) <= 0) pcache = &cache->next; else { @@ -7950,7 +7950,7 @@ } DestroyString (signature); - cache->update_time = current_emacs_time (); + cache->update_time = current_timespec (); return cache; } === modified file 'src/keyboard.c' --- src/keyboard.c 2013-08-13 08:39:14 +0000 +++ src/keyboard.c 2013-08-27 18:47:55 +0000 @@ -360,7 +360,7 @@ static void recursive_edit_unwind (Lisp_Object buffer); static Lisp_Object command_loop (void); static Lisp_Object Qcommand_execute; -EMACS_TIME timer_check (void); +struct timespec timer_check (void); static void echo_now (void); static ptrdiff_t echo_length (void); @@ -370,9 +370,9 @@ /* Incremented whenever a timer is run. */ unsigned timers_run; -/* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt +/* Address (if not 0) of struct timespec to zero out if a SIGIO interrupt happens. */ -EMACS_TIME *input_available_clear_time; +struct timespec *input_available_clear_time; /* True means use SIGIO interrupts; false means use CBREAK mode. Default is true if INTERRUPT_INPUT is defined. */ @@ -389,12 +389,12 @@ /* The time when Emacs started being idle. */ -static EMACS_TIME timer_idleness_start_time; +static struct timespec timer_idleness_start_time; /* After Emacs stops being idle, this saves the last value of timer_idleness_start_time from when it was idle. */ -static EMACS_TIME timer_last_idleness_start_time; +static struct timespec timer_last_idleness_start_time; /* Global variable declarations. */ @@ -1986,10 +1986,10 @@ /* If poll timer doesn't exist, are we need one with a different interval, start a new one. */ if (poll_timer == NULL - || EMACS_SECS (poll_timer->interval) != polling_period) + || poll_timer->interval.tv_sec != polling_period) { time_t period = max (1, min (polling_period, TYPE_MAXIMUM (time_t))); - EMACS_TIME interval = make_emacs_time (period, 0); + struct timespec interval = make_timespec (period, 0); if (poll_timer) cancel_atimer (poll_timer); @@ -2182,7 +2182,7 @@ /* Input of single characters from keyboard */ static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu, - EMACS_TIME *end_time); + struct timespec *end_time); static void record_char (Lisp_Object c); static Lisp_Object help_form_saved_window_configs; @@ -2204,7 +2204,7 @@ polling_stopped_here = 0; } while (0) static Lisp_Object -read_event_from_main_queue (EMACS_TIME *end_time, +read_event_from_main_queue (struct timespec *end_time, sys_jmp_buf local_getcjmp, bool *used_mouse_menu) { @@ -2217,7 +2217,7 @@ /* Read from the main queue, and if that gives us something we can't use yet, we put it on the appropriate side queue and try again. */ - if (end_time && EMACS_TIME_LE (*end_time, current_emacs_time ())) + if (end_time && timespec_cmp (*end_time, current_timespec ()) <= 0) return c; /* Actually read a character, waiting if necessary. */ @@ -2278,7 +2278,7 @@ /* Like `read_event_from_main_queue' but applies keyboard-coding-system to tty input. */ static Lisp_Object -read_decoded_event_from_main_queue (EMACS_TIME *end_time, +read_decoded_event_from_main_queue (struct timespec *end_time, sys_jmp_buf local_getcjmp, Lisp_Object prev_event, bool *used_mouse_menu) @@ -2376,7 +2376,7 @@ Value is -2 when we find input on another keyboard. A second call to read_char will read it. - If END_TIME is non-null, it is a pointer to an EMACS_TIME + If END_TIME is non-null, it is a pointer to a struct timespec specifying the maximum time to wait until. If no input arrives by that time, stop waiting and return nil. @@ -2385,7 +2385,7 @@ Lisp_Object read_char (int commandflag, Lisp_Object map, Lisp_Object prev_event, - bool *used_mouse_menu, EMACS_TIME *end_time) + bool *used_mouse_menu, struct timespec *end_time) { Lisp_Object c; ptrdiff_t jmpcount; @@ -2877,7 +2877,7 @@ { c = read_decoded_event_from_main_queue (end_time, local_getcjmp, prev_event, used_mouse_menu); - if (end_time && EMACS_TIME_LE (*end_time, current_emacs_time ())) + if (end_time && timespec_cmp (*end_time, current_timespec ()) <= 0) goto exit; if (EQ (c, make_number (-2))) { @@ -3798,7 +3798,7 @@ static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu, - EMACS_TIME *end_time) + struct timespec *end_time) { Lisp_Object obj; @@ -3856,15 +3856,15 @@ break; if (end_time) { - EMACS_TIME now = current_emacs_time (); - if (EMACS_TIME_LE (*end_time, now)) + struct timespec now = current_timespec (); + if (timespec_cmp (*end_time, now) <= 0) return Qnil; /* Finished waiting. */ else { - EMACS_TIME duration = sub_emacs_time (*end_time, now); - wait_reading_process_output (min (EMACS_SECS (duration), + struct timespec duration = timespec_sub (*end_time, now); + wait_reading_process_output (min (duration.tv_sec, WAIT_READING_MAX), - EMACS_NSECS (duration), + duration.tv_nsec, -1, 1, Qnil, NULL, 0); } } @@ -4295,10 +4295,10 @@ timer_start_idle (void) { /* If we are already in the idle state, do nothing. */ - if (EMACS_TIME_VALID_P (timer_idleness_start_time)) + if (timespec_valid_p (timer_idleness_start_time)) return; - timer_idleness_start_time = current_emacs_time (); + timer_idleness_start_time = current_timespec (); timer_last_idleness_start_time = timer_idleness_start_time; /* Mark all idle-time timers as once again candidates for running. */ @@ -4310,7 +4310,7 @@ static void timer_stop_idle (void) { - timer_idleness_start_time = invalid_emacs_time (); + timer_idleness_start_time = invalid_timespec (); } /* Resume idle timer from last idle start time. */ @@ -4318,7 +4318,7 @@ static void timer_resume_idle (void) { - if (EMACS_TIME_VALID_P (timer_idleness_start_time)) + if (timespec_valid_p (timer_idleness_start_time)) return; timer_idleness_start_time = timer_last_idleness_start_time; @@ -4334,7 +4334,7 @@ /* Return true if TIMER is a valid timer, placing its value into *RESULT. */ static bool -decode_timer (Lisp_Object timer, EMACS_TIME *result) +decode_timer (Lisp_Object timer, struct timespec *result) { Lisp_Object *vector; @@ -4361,16 +4361,16 @@ In that case we return 0 to indicate that a new timer_check_2 call should be done. */ -static EMACS_TIME +static struct timespec timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers) { - EMACS_TIME nexttime; - EMACS_TIME now; - EMACS_TIME idleness_now; + struct timespec nexttime; + struct timespec now; + struct timespec idleness_now; Lisp_Object chosen_timer; struct gcpro gcpro1; - nexttime = invalid_emacs_time (); + nexttime = invalid_timespec (); chosen_timer = Qnil; GCPRO1 (chosen_timer); @@ -4385,19 +4385,19 @@ if (CONSP (timers) || CONSP (idle_timers)) { - now = current_emacs_time (); - idleness_now = (EMACS_TIME_VALID_P (timer_idleness_start_time) - ? sub_emacs_time (now, timer_idleness_start_time) - : make_emacs_time (0, 0)); + now = current_timespec (); + idleness_now = (timespec_valid_p (timer_idleness_start_time) + ? timespec_sub (now, timer_idleness_start_time) + : make_timespec (0, 0)); } while (CONSP (timers) || CONSP (idle_timers)) { Lisp_Object timer = Qnil, idle_timer = Qnil; - EMACS_TIME timer_time, idle_timer_time; - EMACS_TIME difference; - EMACS_TIME timer_difference = invalid_emacs_time (); - EMACS_TIME idle_timer_difference = invalid_emacs_time (); + struct timespec timer_time, idle_timer_time; + struct timespec difference; + struct timespec timer_difference = invalid_timespec (); + struct timespec idle_timer_difference = invalid_timespec (); bool ripe, timer_ripe = 0, idle_timer_ripe = 0; /* Set TIMER and TIMER_DIFFERENCE @@ -4414,10 +4414,10 @@ continue; } - timer_ripe = EMACS_TIME_LE (timer_time, now); + timer_ripe = timespec_cmp (timer_time, now) <= 0; timer_difference = (timer_ripe - ? sub_emacs_time (now, timer_time) - : sub_emacs_time (timer_time, now)); + ? timespec_sub (now, timer_time) + : timespec_sub (timer_time, now)); } /* Likewise for IDLE_TIMER and IDLE_TIMER_DIFFERENCE @@ -4431,26 +4431,27 @@ continue; } - idle_timer_ripe = EMACS_TIME_LE (idle_timer_time, idleness_now); + idle_timer_ripe = timespec_cmp (idle_timer_time, idleness_now) <= 0; idle_timer_difference = (idle_timer_ripe - ? sub_emacs_time (idleness_now, idle_timer_time) - : sub_emacs_time (idle_timer_time, idleness_now)); + ? timespec_sub (idleness_now, idle_timer_time) + : timespec_sub (idle_timer_time, idleness_now)); } /* Decide which timer is the next timer, and set CHOSEN_TIMER, DIFFERENCE, and RIPE accordingly. Also step down the list where we found that timer. */ - if (EMACS_TIME_VALID_P (timer_difference) - && (! EMACS_TIME_VALID_P (idle_timer_difference) + if (timespec_valid_p (timer_difference) + && (! timespec_valid_p (idle_timer_difference) || idle_timer_ripe < timer_ripe || (idle_timer_ripe == timer_ripe - && (timer_ripe - ? EMACS_TIME_LT (idle_timer_difference, + && ((timer_ripe + ? timespec_cmp (idle_timer_difference, timer_difference) - : EMACS_TIME_LT (timer_difference, - idle_timer_difference))))) + : timespec_cmp (timer_difference, + idle_timer_difference)) + < 0)))) { chosen_timer = timer; timers = XCDR (timers); @@ -4490,7 +4491,7 @@ return 0 to indicate that. */ } - nexttime = make_emacs_time (0, 0); + nexttime = make_timespec (0, 0); break; } else @@ -4518,10 +4519,10 @@ As long as any timer is ripe, we run it. */ -EMACS_TIME +struct timespec timer_check (void) { - EMACS_TIME nexttime; + struct timespec nexttime; Lisp_Object timers, idle_timers; struct gcpro gcpro1, gcpro2; @@ -4535,7 +4536,7 @@ /* Always consider the ordinary timers. */ timers = Fcopy_sequence (Vtimer_list); /* Consider the idle timers only if Emacs is idle. */ - if (EMACS_TIME_VALID_P (timer_idleness_start_time)) + if (timespec_valid_p (timer_idleness_start_time)) idle_timers = Fcopy_sequence (Vtimer_idle_list); else idle_timers = Qnil; @@ -4548,7 +4549,7 @@ { nexttime = timer_check_2 (timers, idle_timers); } - while (EMACS_SECS (nexttime) == 0 && EMACS_NSECS (nexttime) == 0); + while (nexttime.tv_sec == 0 && nexttime.tv_nsec == 0); UNGCPRO; return nexttime; @@ -4564,9 +4565,9 @@ PSEC is a multiple of the system clock resolution. */) (void) { - if (EMACS_TIME_VALID_P (timer_idleness_start_time)) - return make_lisp_time (sub_emacs_time (current_emacs_time (), - timer_idleness_start_time)); + if (timespec_valid_p (timer_idleness_start_time)) + return make_lisp_time (timespec_sub (current_timespec (), + timer_idleness_start_time)); return Qnil; } @@ -7126,7 +7127,7 @@ pending_signals = 1; if (input_available_clear_time) - *input_available_clear_time = make_emacs_time (0, 0); + *input_available_clear_time = make_timespec (0, 0); } static void @@ -7213,7 +7214,7 @@ /* Tell wait_reading_process_output that it needs to wake up and look around. */ if (input_available_clear_time) - *input_available_clear_time = make_emacs_time (0, 0); + *input_available_clear_time = make_timespec (0, 0); } break; } @@ -10235,7 +10236,7 @@ } void -set_waiting_for_input (EMACS_TIME *time_to_clear) +set_waiting_for_input (struct timespec *time_to_clear) { input_available_clear_time = time_to_clear; @@ -10846,7 +10847,7 @@ immediate_quit = 0; quit_char = Ctl ('g'); Vunread_command_events = Qnil; - timer_idleness_start_time = invalid_emacs_time (); + timer_idleness_start_time = invalid_timespec (); total_keys = 0; recent_keys_index = 0; kbd_fetch_ptr = kbd_buffer; === modified file 'src/keyboard.h' --- src/keyboard.h 2013-07-16 21:35:45 +0000 +++ src/keyboard.h 2013-08-27 18:47:55 +0000 @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#include "systime.h" /* for EMACS_TIME, Time */ +#include "systime.h" /* for struct timespec, Time */ #include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ INLINE_HEADER_BEGIN @@ -466,9 +466,9 @@ /* True while doing kbd input. */ extern bool waiting_for_input; -/* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt +/* Address (if not 0) of struct timespec to zero out if a SIGIO interrupt happens. */ -extern EMACS_TIME *input_available_clear_time; +extern struct timespec *input_available_clear_time; #if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS extern bool ignore_mouse_drag_p; @@ -483,7 +483,7 @@ extern Lisp_Object parse_modifiers (Lisp_Object); extern Lisp_Object reorder_modifiers (Lisp_Object); extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object, - bool *, EMACS_TIME *); + bool *, struct timespec *); extern int parse_solitary_modifier (Lisp_Object symbol); @@ -549,7 +549,7 @@ extern void add_user_signal (int, const char *); extern int tty_read_avail_input (struct terminal *, struct input_event *); -extern EMACS_TIME timer_check (void); +extern struct timespec timer_check (void); extern void mark_kboards (void); #ifdef HAVE_NTGUI === modified file 'src/lread.c' --- src/lread.c 2013-08-26 20:33:21 +0000 +++ src/lread.c 2013-08-27 18:47:55 +0000 @@ -609,7 +609,7 @@ bool error_nonascii, bool input_method, Lisp_Object seconds) { Lisp_Object val, delayed_switch_frame; - EMACS_TIME end_time; + struct timespec end_time; #ifdef HAVE_WINDOW_SYSTEM if (display_hourglass_p) @@ -622,8 +622,8 @@ if (NUMBERP (seconds)) { double duration = extract_float (seconds); - EMACS_TIME wait_time = EMACS_TIME_FROM_DOUBLE (duration); - end_time = add_emacs_time (current_emacs_time (), wait_time); + struct timespec wait_time = dtotimespec (duration); + end_time = timespec_add (current_timespec (), wait_time); } /* Read until we get an acceptable event. */ @@ -1262,7 +1262,7 @@ } if (result == 0 - && EMACS_TIME_LT (get_stat_mtime (&s1), get_stat_mtime (&s2))) + && timespec_cmp (get_stat_mtime (&s1), get_stat_mtime (&s2)) < 0) { /* Make the progress messages mention that source is newer. */ newer = 1; === modified file 'src/msdos.c' --- src/msdos.c 2013-08-27 03:52:21 +0000 +++ src/msdos.c 2013-08-27 18:47:55 +0000 @@ -4055,7 +4055,7 @@ because wait_reading_process_output takes care of that. */ int sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, - EMACS_TIME *timeout, void *ignored) + struct timespec *timeout, void *ignored) { int check_input; struct timespec t; @@ -4085,20 +4085,20 @@ } else { - EMACS_TIME clnow, cllast, cldiff; + struct timespec clnow, cllast, cldiff; gettime (&t); - cllast = make_emacs_time (t.tv_sec, t.tv_nsec); + cllast = make_timespec (t.tv_sec, t.tv_nsec); while (!check_input || !detect_input_pending ()) { gettime (&t); - clnow = make_emacs_time (t.tv_sec, t.tv_nsec); - cldiff = sub_emacs_time (clnow, cllast); - *timeout = sub_emacs_time (*timeout, cldiff); + clnow = make_timespec (t.tv_sec, t.tv_nsec); + cldiff = timespec_sub (clnow, cllast); + *timeout = timespec_sub (*timeout, cldiff); /* Stop when timeout value crosses zero. */ - if (EMACS_TIME_SIGN (*timeout) <= 0) + if (timespec_sign (*timeout) <= 0) return 0; cllast = clnow; dos_yield_time_slice (); === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-08-26 21:31:50 +0000 +++ src/nsmenu.m 2013-08-27 18:47:55 +0000 @@ -1867,11 +1867,11 @@ while (popup_activated_flag) { NSTimer *tmo = nil; - EMACS_TIME next_time = timer_check (); + struct timespec next_time = timer_check (); - if (EMACS_TIME_VALID_P (next_time)) + if (timespec_valid_p (next_time)) { - double time = EMACS_TIME_TO_DOUBLE (next_time); + double time = timespectod (next_time); tmo = [NSTimer timerWithTimeInterval: time target: self selector: @selector (timeout_handler:) === modified file 'src/nsterm.h' --- src/nsterm.h 2013-08-27 04:23:54 +0000 +++ src/nsterm.h 2013-08-27 18:47:55 +0000 @@ -872,7 +872,7 @@ /* This in nsterm.m */ extern void x_destroy_window (struct frame *f); extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, EMACS_TIME const *timeout, + fd_set *exceptfds, struct timespec const *timeout, sigset_t const *sigmask); extern unsigned long ns_get_rgb_color (struct frame *f, float r, float g, float b, float a); === modified file 'src/nsterm.m' --- src/nsterm.m 2013-08-27 03:52:21 +0000 +++ src/nsterm.m 2013-08-27 18:47:55 +0000 @@ -214,7 +214,7 @@ static fd_set select_readfds, select_writefds; enum { SELECT_HAVE_READ = 1, SELECT_HAVE_WRITE = 2, SELECT_HAVE_TMO = 4 }; static int select_nfds = 0, select_valid = 0; -static EMACS_TIME select_timeout = { 0, 0 }; +static struct timespec select_timeout = { 0, 0 }; static int selfds[2] = { -1, -1 }; static pthread_mutex_t select_mutex; static int apploopnr = 0; @@ -485,16 +485,16 @@ Blocking timer utility used by ns_ring_bell -------------------------------------------------------------------------- */ { - EMACS_TIME wakeup = add_emacs_time (current_emacs_time (), - make_emacs_time (0, usecs * 1000)); + struct timespec wakeup = timespec_add (current_timespec (), + make_timespec (0, usecs * 1000)); /* Keep waiting until past the time wakeup. */ while (1) { - EMACS_TIME timeout, now = current_emacs_time (); - if (EMACS_TIME_LE (wakeup, now)) + struct timespec timeout, now = current_timespec (); + if (timespec_cmp (wakeup, now) <= 0) break; - timeout = sub_emacs_time (wakeup, now); + timeout = timespec_sub (wakeup, now); /* Try to wait that long--but we might wake up sooner. */ pselect (0, NULL, NULL, NULL, &timeout, NULL); @@ -3529,7 +3529,7 @@ int ns_select (int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, EMACS_TIME const *timeout, + fd_set *exceptfds, struct timespec const *timeout, sigset_t const *sigmask) /* -------------------------------------------------------------------------- Replacement for select, checking for events @@ -3600,7 +3600,7 @@ else if (nr == 0 && timeout) { /* No file descriptor, just a timeout, no need to wake fd_handler */ - double time = EMACS_TIME_TO_DOUBLE (*timeout); + double time = timespectod (*timeout); timed_entry = [[NSTimer scheduledTimerWithTimeInterval: time target: NSApp selector: @@ -4687,7 +4687,7 @@ char c; SELECT_TYPE readfds, writefds, *wfds; - EMACS_TIME timeout, *tmo; + struct timespec timeout, *tmo; NSAutoreleasePool *pool = nil; /* NSTRACE (fd_handler); */ === modified file 'src/process.c' --- src/process.c 2013-08-24 02:23:34 +0000 +++ src/process.c 2013-08-27 18:47:55 +0000 @@ -133,7 +133,7 @@ #ifdef WINDOWSNT extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, - EMACS_TIME *, void *); + struct timespec *, void *); #endif #ifndef SOCK_CLOEXEC @@ -261,7 +261,7 @@ #endif #ifdef ADAPTIVE_READ_BUFFERING -#define READ_OUTPUT_DELAY_INCREMENT (EMACS_TIME_RESOLUTION / 100) +#define READ_OUTPUT_DELAY_INCREMENT (TIMESPEC_RESOLUTION / 100) #define READ_OUTPUT_DELAY_MAX (READ_OUTPUT_DELAY_INCREMENT * 5) #define READ_OUTPUT_DELAY_MAX_MAX (READ_OUTPUT_DELAY_INCREMENT * 7) @@ -3932,9 +3932,9 @@ { if (XFLOAT_DATA (seconds) > 0) { - EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (XFLOAT_DATA (seconds)); - secs = min (EMACS_SECS (t), WAIT_READING_MAX); - nsecs = EMACS_NSECS (t); + struct timespec t = dtotimespec (XFLOAT_DATA (seconds)); + secs = min (t.tv_sec, WAIT_READING_MAX); + nsecs = t.tv_nsec; } } else @@ -4239,7 +4239,7 @@ bool no_avail; int xerrno; Lisp_Object proc; - EMACS_TIME timeout, end_time; + struct timespec timeout, end_time; int wait_channel = -1; bool got_some_input = 0; ptrdiff_t count = SPECPDL_INDEX (); @@ -4272,8 +4272,8 @@ compute the absolute time to return at. */ if (time_limit || nsecs > 0) { - timeout = make_emacs_time (time_limit, nsecs); - end_time = add_emacs_time (current_emacs_time (), timeout); + timeout = make_timespec (time_limit, nsecs); + end_time = timespec_add (current_timespec (), timeout); } while (1) @@ -4300,18 +4300,18 @@ gobble output available now but don't wait at all. */ - timeout = make_emacs_time (0, 0); + timeout = make_timespec (0, 0); } else if (time_limit || nsecs > 0) { - EMACS_TIME now = current_emacs_time (); - if (EMACS_TIME_LE (end_time, now)) + struct timespec now = current_timespec (); + if (timespec_cmp (end_time, now) <= 0) break; - timeout = sub_emacs_time (end_time, now); + timeout = timespec_sub (end_time, now); } else { - timeout = make_emacs_time (100000, 0); + timeout = make_timespec (100000, 0); } /* Normally we run timers here. @@ -4321,7 +4321,7 @@ if (NILP (wait_for_cell) && just_wait_proc >= 0) { - EMACS_TIME timer_delay; + struct timespec timer_delay; do { @@ -4356,9 +4356,9 @@ /* A negative timeout means do not wait at all. */ if (nsecs >= 0) { - if (EMACS_TIME_VALID_P (timer_delay)) + if (timespec_valid_p (timer_delay)) { - if (EMACS_TIME_LT (timer_delay, timeout)) + if (timespec_cmp (timer_delay, timeout) < 0) { timeout = timer_delay; timeout_reduced_for_timers = 1; @@ -4396,7 +4396,7 @@ Atemp = input_wait_mask; Ctemp = write_mask; - timeout = make_emacs_time (0, 0); + timeout = make_timespec (0, 0); if ((pselect (max (max_process_desc, max_input_desc) + 1, &Atemp, #ifdef NON_BLOCKING_CONNECT @@ -4518,8 +4518,8 @@ Vprocess_adaptive_read_buffering is nil. */ if (process_output_skip && check_delay > 0) { - int nsecs = EMACS_NSECS (timeout); - if (EMACS_SECS (timeout) > 0 || nsecs > READ_OUTPUT_DELAY_MAX) + int nsecs = timeout.tv_nsec; + if (timeout.tv_sec > 0 || nsecs > READ_OUTPUT_DELAY_MAX) nsecs = READ_OUTPUT_DELAY_MAX; for (channel = 0; check_delay > 0 && channel <= max_process_desc; channel++) { @@ -4539,7 +4539,7 @@ nsecs = XPROCESS (proc)->read_output_delay; } } - timeout = make_emacs_time (0, nsecs); + timeout = make_timespec (0, nsecs); process_output_skip = 0; } #endif @@ -6543,7 +6543,7 @@ /* Defined on msdos.c. */ extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, - EMACS_TIME *, void *); + struct timespec *, void *); /* Implementation of wait_reading_process_output, assuming that there are no subprocesses. Used only by the MS-DOS build. @@ -6582,7 +6582,7 @@ struct Lisp_Process *wait_proc, int just_wait_proc) { register int nfds; - EMACS_TIME end_time, timeout; + struct timespec end_time, timeout; if (time_limit < 0) { @@ -6595,8 +6595,8 @@ /* What does time_limit really mean? */ if (time_limit || nsecs > 0) { - timeout = make_emacs_time (time_limit, nsecs); - end_time = add_emacs_time (current_emacs_time (), timeout); + timeout = make_timespec (time_limit, nsecs); + end_time = timespec_add (current_timespec (), timeout); } /* Turn off periodic alarms (in case they are in use) @@ -6629,18 +6629,18 @@ gobble output available now but don't wait at all. */ - timeout = make_emacs_time (0, 0); + timeout = make_timespec (0, 0); } else if (time_limit || nsecs > 0) { - EMACS_TIME now = current_emacs_time (); - if (EMACS_TIME_LE (end_time, now)) + struct timespec now = current_timespec (); + if (timespec_cmp (end_time, now) <= 0) break; - timeout = sub_emacs_time (end_time, now); + timeout = timespec_sub (end_time, now); } else { - timeout = make_emacs_time (100000, 0); + timeout = make_timespec (100000, 0); } /* If our caller will not immediately handle keyboard events, @@ -6649,7 +6649,7 @@ call timer_delay on their own.) */ if (NILP (wait_for_cell)) { - EMACS_TIME timer_delay; + struct timespec timer_delay; do { @@ -6669,9 +6669,9 @@ && requeued_events_pending_p ()) break; - if (EMACS_TIME_VALID_P (timer_delay) && nsecs >= 0) + if (timespec_valid_p (timer_delay) && nsecs >= 0) { - if (EMACS_TIME_LT (timer_delay, timeout)) + if (timespec_cmp (timer_delay, timeout) < 0) { timeout = timer_delay; timeout_reduced_for_timers = 1; === modified file 'src/profiler.c' --- src/profiler.c 2013-07-10 23:23:57 +0000 +++ src/profiler.c 2013-08-27 18:47:55 +0000 @@ -267,8 +267,8 @@ return NOT_RUNNING; current_sampling_interval = XINT (sampling_interval); - interval = make_emacs_time (current_sampling_interval / billion, - current_sampling_interval % billion); + interval = make_timespec (current_sampling_interval / billion, + current_sampling_interval % billion); emacs_sigaction_init (&action, deliver_profiler_signal); sigaction (SIGPROF, &action, 0); === modified file 'src/sysdep.c' --- src/sysdep.c 2013-08-24 02:23:34 +0000 +++ src/sysdep.c 2013-08-27 18:47:55 +0000 @@ -306,7 +306,7 @@ /* If successful and status is requested, tell wait_reading_process_output that it needs to wake up and look around. */ if (pid && status && input_available_clear_time) - *input_available_clear_time = make_emacs_time (0, 0); + *input_available_clear_time = make_timespec (0, 0); return pid; } @@ -2021,8 +2021,8 @@ void init_random (void) { - EMACS_TIME t = current_emacs_time (); - uintmax_t v = getpid () ^ EMACS_SECS (t) ^ EMACS_NSECS (t); + struct timespec t = current_timespec (); + uintmax_t v = getpid () ^ t.tv_sec ^ t.tv_nsec; seed_random (&v, sizeof v); } @@ -2357,7 +2357,7 @@ Use the least timeval not less than T. Return an extremal value if the result would overflow. */ struct timeval -make_timeval (EMACS_TIME t) +make_timeval (struct timespec t) { struct timeval tv; tv.tv_sec = t.tv_sec; @@ -2384,7 +2384,7 @@ If FD is nonnegative, then FILE can be NULL. */ int set_file_times (int fd, const char *filename, - EMACS_TIME atime, EMACS_TIME mtime) + struct timespec atime, struct timespec mtime) { struct timespec timespec[2]; timespec[0] = atime; @@ -2701,7 +2701,7 @@ #endif /* !defined (WINDOWSNT) */ #if defined GNU_LINUX && defined HAVE_LONG_LONG_INT -static EMACS_TIME +static struct timespec time_from_jiffies (unsigned long long tval, long hz) { unsigned long long s = tval / hz; @@ -2710,34 +2710,34 @@ if (TYPE_MAXIMUM (time_t) < s) time_overflow (); - if (LONG_MAX - 1 <= ULLONG_MAX / EMACS_TIME_RESOLUTION - || frac <= ULLONG_MAX / EMACS_TIME_RESOLUTION) - ns = frac * EMACS_TIME_RESOLUTION / hz; + if (LONG_MAX - 1 <= ULLONG_MAX / TIMESPEC_RESOLUTION + || frac <= ULLONG_MAX / TIMESPEC_RESOLUTION) + ns = frac * TIMESPEC_RESOLUTION / hz; else { /* This is reachable only in the unlikely case that HZ * HZ exceeds ULLONG_MAX. It calculates an approximation that is guaranteed to be in range. */ - long hz_per_ns = (hz / EMACS_TIME_RESOLUTION - + (hz % EMACS_TIME_RESOLUTION != 0)); + long hz_per_ns = (hz / TIMESPEC_RESOLUTION + + (hz % TIMESPEC_RESOLUTION != 0)); ns = frac / hz_per_ns; } - return make_emacs_time (s, ns); + return make_timespec (s, ns); } static Lisp_Object ltime_from_jiffies (unsigned long long tval, long hz) { - EMACS_TIME t = time_from_jiffies (tval, hz); + struct timespec t = time_from_jiffies (tval, hz); return make_lisp_time (t); } -static EMACS_TIME +static struct timespec get_up_time (void) { FILE *fup; - EMACS_TIME up = make_emacs_time (0, 0); + struct timespec up = make_timespec (0, 0); block_input (); fup = emacs_fopen ("/proc/uptime", "r"); @@ -2755,18 +2755,18 @@ if (TYPE_MAXIMUM (time_t) < upsec) { upsec = TYPE_MAXIMUM (time_t); - upfrac = EMACS_TIME_RESOLUTION - 1; + upfrac = TIMESPEC_RESOLUTION - 1; } else { int upfraclen = upfrac_end - upfrac_start; - for (; upfraclen < LOG10_EMACS_TIME_RESOLUTION; upfraclen++) + for (; upfraclen < LOG10_TIMESPEC_RESOLUTION; upfraclen++) upfrac *= 10; - for (; LOG10_EMACS_TIME_RESOLUTION < upfraclen; upfraclen--) + for (; LOG10_TIMESPEC_RESOLUTION < upfraclen; upfraclen--) upfrac /= 10; - upfrac = min (upfrac, EMACS_TIME_RESOLUTION - 1); + upfrac = min (upfrac, TIMESPEC_RESOLUTION - 1); } - up = make_emacs_time (upsec, upfrac); + up = make_timespec (upsec, upfrac); } fclose (fup); } @@ -2887,7 +2887,7 @@ unsigned long long u_time, s_time, cutime, cstime, start; long priority, niceness, rss; unsigned long minflt, majflt, cminflt, cmajflt, vsize; - EMACS_TIME tnow, tstart, tboot, telapsed, us_time; + struct timespec tnow, tstart, tboot, telapsed, us_time; double pcpu, pmem; Lisp_Object attrs = Qnil; Lisp_Object cmd_str, decoded_cmd; @@ -3008,20 +3008,19 @@ attrs = Fcons (Fcons (Qnice, make_number (niceness)), attrs); attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (thcount)), attrs); - tnow = current_emacs_time (); + tnow = current_timespec (); telapsed = get_up_time (); - tboot = sub_emacs_time (tnow, telapsed); + tboot = timespec_sub (tnow, telapsed); tstart = time_from_jiffies (start, clocks_per_sec); - tstart = add_emacs_time (tboot, tstart); + tstart = timespec_add (tboot, tstart); attrs = Fcons (Fcons (Qstart, make_lisp_time (tstart)), attrs); attrs = Fcons (Fcons (Qvsize, make_fixnum_or_float (vsize / 1024)), attrs); attrs = Fcons (Fcons (Qrss, make_fixnum_or_float (4 * rss)), attrs); - telapsed = sub_emacs_time (tnow, tstart); + telapsed = timespec_sub (tnow, tstart); attrs = Fcons (Fcons (Qetime, make_lisp_time (telapsed)), attrs); us_time = time_from_jiffies (u_time + s_time, clocks_per_sec); - pcpu = (EMACS_TIME_TO_DOUBLE (us_time) - / EMACS_TIME_TO_DOUBLE (telapsed)); + pcpu = timespectod (us_time) / timespectod (telapsed); if (pcpu > 1.0) pcpu = 1.0; attrs = Fcons (Fcons (Qpcpu, make_float (100 * pcpu)), attrs); @@ -3239,16 +3238,16 @@ #elif defined __FreeBSD__ -static EMACS_TIME -timeval_to_EMACS_TIME (struct timeval t) +static struct timespec +timeval_to_timespec (struct timeval t) { - return make_emacs_time (t.tv_sec, t.tv_usec * 1000); + return make_timespec (t.tv_sec, t.tv_usec * 1000); } static Lisp_Object make_lisp_timeval (struct timeval t) { - return make_lisp_time (timeval_to_EMACS_TIME (t)); + return make_lisp_time (timeval_to_timespec (t)); } Lisp_Object @@ -3263,7 +3262,7 @@ char *ttyname; size_t len; char args[MAXPATHLEN]; - EMACS_TIME t, now; + struct timespec t, now; int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID}; struct kinfo_proc proc; @@ -3350,8 +3349,8 @@ attrs); attrs = Fcons (Fcons (Qstime, make_lisp_timeval (proc.ki_rusage.ru_stime)), attrs); - t = add_emacs_time (timeval_to_EMACS_TIME (proc.ki_rusage.ru_utime), - timeval_to_EMACS_TIME (proc.ki_rusage.ru_stime)); + t = timespec_add (timeval_to_timespec (proc.ki_rusage.ru_utime), + timeval_to_timespec (proc.ki_rusage.ru_stime)); attrs = Fcons (Fcons (Qtime, make_lisp_time (t)), attrs); attrs = Fcons (Fcons (Qcutime, @@ -3360,8 +3359,8 @@ attrs = Fcons (Fcons (Qcstime, make_lisp_timeval (proc.ki_rusage_ch.ru_utime)), attrs); - t = add_emacs_time (timeval_to_EMACS_TIME (proc.ki_rusage_ch.ru_utime), - timeval_to_EMACS_TIME (proc.ki_rusage_ch.ru_stime)); + t = timespec_add (timeval_to_timespec (proc.ki_rusage_ch.ru_utime), + timeval_to_timespec (proc.ki_rusage_ch.ru_stime)); attrs = Fcons (Fcons (Qctime, make_lisp_time (t)), attrs); attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (proc.ki_numthreads)), @@ -3373,8 +3372,8 @@ attrs = Fcons (Fcons (Qrss, make_number (proc.ki_rssize * pagesize >> 10)), attrs); - now = current_emacs_time (); - t = sub_emacs_time (now, timeval_to_EMACS_TIME (proc.ki_start)); + now = current_timespec (); + t = timespec_sub (now, timeval_to_timespec (proc.ki_start)); attrs = Fcons (Fcons (Qetime, make_lisp_time (t)), attrs); len = sizeof fscale; === modified file 'src/systime.h' --- src/systime.h 2013-07-10 06:26:23 +0000 +++ src/systime.h 2013-08-27 18:47:55 +0000 @@ -46,140 +46,56 @@ #include /* for 'struct timeval' */ -/* The type to use to represent non-negative temporal intervals. Its - address can be passed as the timeout argument to the pselect system - call. */ -typedef struct timespec EMACS_TIME; - -/* Resolution of EMACS_TIME time stamps (in units per second), and log - base 10 of the resolution. The log must be a positive integer. */ -enum { EMACS_TIME_RESOLUTION = 1000000000 }; -enum { LOG10_EMACS_TIME_RESOLUTION = 9 }; - -/* EMACS_SECS (TIME) is the seconds component of TIME. - EMACS_NSECS (TIME) is the nanoseconds component of TIME. - emacs_secs_addr (PTIME) is the address of *PTIME's seconds component. */ -SYSTIME_INLINE time_t EMACS_SECS (EMACS_TIME t) { return t.tv_sec; } -SYSTIME_INLINE int EMACS_NSECS (EMACS_TIME t) { return t.tv_nsec; } -SYSTIME_INLINE time_t *emacs_secs_addr (EMACS_TIME *t) { return &t->tv_sec; } - -/* Return an Emacs time with seconds S and nanoseconds NS. */ -SYSTIME_INLINE EMACS_TIME -make_emacs_time (time_t s, int ns) +/* Emacs uses struct timespec to represent nonnegative temporal intervals. + + WARNING: Since tv_sec might be an unsigned value, do not use struct + timespec as a general-purpose data type for adding or subtracting + arbitrary time values! When computing A + B or A - B, typically A + should be an absolute time since the epoch and B a nonnegative offset. */ + +/* Return an invalid timespec. */ +SYSTIME_INLINE struct timespec +invalid_timespec (void) { - EMACS_TIME r; - r.tv_sec = s; - r.tv_nsec = ns; - return r; + return make_timespec (0, -1); } -/* Return an invalid Emacs time. */ -SYSTIME_INLINE EMACS_TIME -invalid_emacs_time (void) +/* Return 1 if TIME is a valid timespec. This currently doesn't worry + about whether tv_nsec is less than TIMESPEC_RESOLUTION; leap seconds + might cause a problem if it did. */ +SYSTIME_INLINE int +timespec_valid_p (struct timespec t) { - EMACS_TIME r; - r.tv_sec = 0; - r.tv_nsec = -1; - return r; + return t.tv_nsec >= 0; } /* Return current system time. */ -SYSTIME_INLINE EMACS_TIME -current_emacs_time (void) +SYSTIME_INLINE struct timespec +current_timespec (void) { - EMACS_TIME r; + struct timespec r; gettime (&r); return r; } -/* Return the result of adding A to B, or of subtracting B from A. - On overflow, store an extremal value: ergo, if time_t is unsigned, - return 0 if the true answer would be negative. - - WARNING: These are NOT general-purpose macros for adding or - subtracting arbitrary time values! They are generally intended to - be used with their first argument an absolute time since the epoch - and the second argument a non-negative offset. Do NOT use them for - anything else. */ -SYSTIME_INLINE EMACS_TIME -add_emacs_time (EMACS_TIME a, EMACS_TIME b) -{ - return timespec_add (a, b); -} -SYSTIME_INLINE EMACS_TIME -sub_emacs_time (EMACS_TIME a, EMACS_TIME b) -{ - return timespec_sub (a, b); -} - -/* Return the sign of the valid time stamp TIME, either -1, 0, or 1. - Note: this can only return a negative value if time_t is a signed - data type. */ -SYSTIME_INLINE int -EMACS_TIME_SIGN (EMACS_TIME t) -{ - return timespec_sign (t); -} - -/* Return 1 if TIME is a valid time stamp. */ -SYSTIME_INLINE int -EMACS_TIME_VALID_P (EMACS_TIME t) -{ - return t.tv_nsec >= 0; -} - -/* Convert the double D to the greatest EMACS_TIME not greater than D. - On overflow, return an extremal value; in particular, if time_t is - an unsigned data type and D is negative, return zero. Return the - minimum EMACS_TIME if D is not a number. */ -SYSTIME_INLINE EMACS_TIME -EMACS_TIME_FROM_DOUBLE (double d) -{ - return dtotimespec (d); -} - -/* Convert the Emacs time T to an approximate double value D. */ -SYSTIME_INLINE double -EMACS_TIME_TO_DOUBLE (EMACS_TIME t) -{ - return timespectod (t); -} - /* defined in sysdep.c */ -extern int set_file_times (int, const char *, EMACS_TIME, EMACS_TIME); -extern struct timeval make_timeval (EMACS_TIME) ATTRIBUTE_CONST; +extern int set_file_times (int, const char *, struct timespec, struct timespec); +extern struct timeval make_timeval (struct timespec) ATTRIBUTE_CONST; /* defined in keyboard.c */ -extern void set_waiting_for_input (EMACS_TIME *); +extern void set_waiting_for_input (struct timespec *); /* When lisp.h is not included Lisp_Object is not defined (this can happen when this files is used outside the src directory). Use GCPRO1 to determine if lisp.h was included. */ #ifdef GCPRO1 /* defined in editfns.c */ -extern Lisp_Object make_lisp_time (EMACS_TIME); +extern Lisp_Object make_lisp_time (struct timespec); extern bool decode_time_components (Lisp_Object, Lisp_Object, Lisp_Object, - Lisp_Object, EMACS_TIME *, double *); -extern EMACS_TIME lisp_time_argument (Lisp_Object); + Lisp_Object, struct timespec *, double *); +extern struct timespec lisp_time_argument (Lisp_Object); #endif -/* Compare times T1 and T2 for equality, inequality etc. */ -SYSTIME_INLINE int -EMACS_TIME_EQ (EMACS_TIME t1, EMACS_TIME t2) -{ - return timespec_cmp (t1, t2) == 0; -} -SYSTIME_INLINE int -EMACS_TIME_LT (EMACS_TIME t1, EMACS_TIME t2) -{ - return timespec_cmp (t1, t2) < 0; -} -SYSTIME_INLINE int -EMACS_TIME_LE (EMACS_TIME t1, EMACS_TIME t2) -{ - return timespec_cmp (t1, t2) <= 0; -} - INLINE_HEADER_END #endif /* EMACS_SYSTIME_H */ === modified file 'src/w32.c' --- src/w32.c 2013-08-24 10:15:01 +0000 +++ src/w32.c 2013-08-27 18:47:55 +0000 @@ -247,7 +247,7 @@ extern int sys_access (const char *, int); extern void *e_malloc (size_t); extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, - EMACS_TIME *, void *); + struct timespec *, void *); extern int sys_dup (int); @@ -7939,7 +7939,7 @@ { int n, err; SELECT_TYPE fdset; - EMACS_TIME timeout; + struct timespec timeout; struct Lisp_Process *process = (struct Lisp_Process *)p; int fd = process->infd; === modified file 'src/w32proc.c' --- src/w32proc.c 2013-02-25 17:36:03 +0000 +++ src/w32proc.c 2013-08-27 18:47:55 +0000 @@ -1916,7 +1916,7 @@ int sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, - EMACS_TIME *timeout, void *ignored) + struct timespec *timeout, void *ignored) { SELECT_TYPE orfds; DWORD timeout_ms, start_time; === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-27 03:52:21 +0000 +++ src/xdisp.c 2013-08-27 18:47:55 +0000 @@ -29800,20 +29800,20 @@ start_hourglass (void) { #if defined (HAVE_WINDOW_SYSTEM) - EMACS_TIME delay; + struct timespec delay; cancel_hourglass (); if (INTEGERP (Vhourglass_delay) && XINT (Vhourglass_delay) > 0) - delay = make_emacs_time (min (XINT (Vhourglass_delay), + delay = make_timespec (min (XINT (Vhourglass_delay), TYPE_MAXIMUM (time_t)), - 0); + 0); else if (FLOATP (Vhourglass_delay) && XFLOAT_DATA (Vhourglass_delay) > 0) - delay = EMACS_TIME_FROM_DOUBLE (XFLOAT_DATA (Vhourglass_delay)); + delay = dtotimespec (XFLOAT_DATA (Vhourglass_delay)); else - delay = make_emacs_time (DEFAULT_HOURGLASS_DELAY, 0); + delay = make_timespec (DEFAULT_HOURGLASS_DELAY, 0); #ifdef HAVE_NTGUI { === modified file 'src/xgselect.c' --- src/xgselect.c 2013-08-26 21:31:50 +0000 +++ src/xgselect.c 2013-08-27 18:47:55 +0000 @@ -25,15 +25,16 @@ #include #include +#include #include "frame.h" int xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, - EMACS_TIME const *timeout, sigset_t const *sigmask) + struct timespec const *timeout, sigset_t const *sigmask) { SELECT_TYPE all_rfds, all_wfds; - EMACS_TIME tmo; - EMACS_TIME const *tmop = timeout; + struct timespec tmo; + struct timespec const *tmop = timeout; GMainContext *context; int have_wfds = wfds != NULL; @@ -86,9 +87,9 @@ if (tmo_in_millisec >= 0) { - tmo = make_emacs_time (tmo_in_millisec / 1000, - 1000 * 1000 * (tmo_in_millisec % 1000)); - if (!timeout || EMACS_TIME_LT (tmo, *timeout)) + tmo = make_timespec (tmo_in_millisec / 1000, + 1000 * 1000 * (tmo_in_millisec % 1000)); + if (!timeout || timespec_cmp (tmo, *timeout) < 0) tmop = &tmo; } === modified file 'src/xgselect.h' --- src/xgselect.h 2013-08-26 21:31:50 +0000 +++ src/xgselect.h 2013-08-27 18:47:55 +0000 @@ -21,14 +21,14 @@ #define XGSELECT_H #include "lisp.h" -#include "systime.h" +#include #include "sysselect.h" extern int xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, - EMACS_TIME const *timeout, + struct timespec const *timeout, sigset_t const *sigmask); #endif /* XGSELECT_H */ === modified file 'src/xmenu.c' --- src/xmenu.c 2013-08-11 01:30:20 +0000 +++ src/xmenu.c 2013-08-27 18:47:55 +0000 @@ -377,7 +377,7 @@ #endif ) { - EMACS_TIME next_time = timer_check (), *ntp; + struct timespec next_time = timer_check (), *ntp; SELECT_TYPE read_fds; struct x_display_info *dpyinfo; int n = 0; @@ -391,7 +391,7 @@ XFlush (dpyinfo->display); } - if (! EMACS_TIME_VALID_P (next_time)) + if (! timespec_valid_p (next_time)) ntp = 0; else ntp = &next_time; === modified file 'src/xterm.c' --- src/xterm.c 2013-08-27 03:52:21 +0000 +++ src/xterm.c 2013-08-27 18:47:55 +0000 @@ -3112,22 +3112,22 @@ x_flush (f); { - EMACS_TIME delay = make_emacs_time (0, 150 * 1000 * 1000); - EMACS_TIME wakeup = add_emacs_time (current_emacs_time (), delay); + struct timespec delay = make_timespec (0, 150 * 1000 * 1000); + struct timespec wakeup = timespec_add (current_timespec (), delay); /* Keep waiting until past the time wakeup or any input gets available. */ while (! detect_input_pending ()) { - EMACS_TIME current = current_emacs_time (); - EMACS_TIME timeout; + struct timespec current = current_timespec (); + struct timespec timeout; /* Break if result would not be positive. */ - if (EMACS_TIME_LE (wakeup, current)) + if (timespec_cmp (wakeup, current) <= 0) break; /* How long `select' should wait. */ - timeout = make_emacs_time (0, 10 * 1000 * 1000); + timeout = make_timespec (0, 10 * 1000 * 1000); /* Try to wait that long--but we might wake up sooner. */ pselect (0, NULL, NULL, NULL, &timeout, NULL); @@ -8677,7 +8677,7 @@ int level = interrupt_input_blocked; SELECT_TYPE fds; - EMACS_TIME tmo, tmo_at, time_now; + struct timespec tmo, tmo_at, time_now; int fd = ConnectionNumber (FRAME_X_DISPLAY (f)); pending_event_wait.f = f; @@ -8685,8 +8685,8 @@ /* Set timeout to 0.1 second. Hopefully not noticeable. Maybe it should be configurable. */ - tmo = make_emacs_time (0, 100 * 1000 * 1000); - tmo_at = add_emacs_time (current_emacs_time (), tmo); + tmo = make_timespec (0, 100 * 1000 * 1000); + tmo_at = timespec_add (current_timespec (), tmo); while (pending_event_wait.eventtype) { @@ -8699,11 +8699,11 @@ FD_ZERO (&fds); FD_SET (fd, &fds); - time_now = current_emacs_time (); - if (EMACS_TIME_LT (tmo_at, time_now)) + time_now = current_timespec (); + if (timespec_cmp (tmo_at, time_now) < 0) break; - tmo = sub_emacs_time (tmo_at, time_now); + tmo = timespec_sub (tmo_at, time_now); if (pselect (fd + 1, &fds, NULL, NULL, &tmo, NULL) == 0) break; /* Timeout */ } @@ -10425,7 +10425,7 @@ block_input (); if (!x_timeout_atimer_activated_flag) { - EMACS_TIME interval = make_emacs_time (0, 100 * 1000 * 1000); + struct timespec interval = make_timespec (0, 100 * 1000 * 1000); start_atimer (ATIMER_RELATIVE, interval, x_process_timeouts, 0); x_timeout_atimer_activated_flag = 1; } ------------------------------------------------------------ revno: 114030 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-27 13:19:04 -0400 message: * doc/misc/efaq.texi: Rename from faq.texi, to match its output files. * doc/misc/Makefile.in: Update for faq.texi name change. * admin/admin.el (manual-misc-manuals): "faq" does not need special treatment any more. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-08-27 07:57:39 +0000 +++ admin/ChangeLog 2013-08-27 17:19:04 +0000 @@ -1,7 +1,7 @@ 2013-08-27 Glenn Morris * admin.el (manual-misc-manuals): Use INFO_COMMON rather than - INFO_TARGETS. + INFO_TARGETS. "faq" does not need special treatment any more. 2013-08-15 Glenn Morris === modified file 'admin/admin.el' --- admin/admin.el 2013-08-27 07:57:39 +0000 +++ admin/admin.el 2013-08-27 17:19:04 +0000 @@ -289,9 +289,8 @@ (defun manual-misc-html (name root html-node-dir html-mono-dir) ;; Hack to deal with the cases where .texi creates a different .info. - ;; Blech. TODO Why not just rename the .texi files? + ;; Blech. TODO Why not just rename the .texi (or .info) files? (let* ((texiname (cond ((equal name "ccmode") "cc-mode") - ((equal name "efaq") "faq") (t name))) (texi (expand-file-name (format "doc/misc/%s.texi" texiname) root))) (manual-html-node texi (expand-file-name name html-node-dir)) === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-08-27 08:14:58 +0000 +++ doc/misc/ChangeLog 2013-08-27 17:19:04 +0000 @@ -1,5 +1,8 @@ 2013-08-27 Glenn Morris + * efaq.texi: Rename from faq.texi, to match its output files. + * Makefile.in: Update for faq.texi name change. + * efaq-w32.texi (EMACSVER): Get it from emacsver.texi. * Makefile.in (webhack): Remove; it's nothing to do with Emacs. === modified file 'doc/misc/Makefile.in' --- doc/misc/Makefile.in 2013-08-27 08:04:08 +0000 +++ doc/misc/Makefile.in 2013-08-27 17:19:04 +0000 @@ -98,6 +98,7 @@ ede.dvi \ ediff.dvi \ edt.dvi \ + efaq.dvi \ eieio.dvi \ emacs-mime.dvi \ epa.dvi \ @@ -105,7 +106,6 @@ ert.dvi \ eshell.dvi \ eudc.dvi \ - faq.dvi \ flymake.dvi \ forms.dvi \ gnus.dvi \ @@ -156,6 +156,7 @@ ede.html \ ediff.html \ edt.html \ + efaq.html \ eieio.html \ emacs-mime.html \ epa.html \ @@ -163,7 +164,6 @@ ert.html \ eshell.html \ eudc.html \ - faq.html \ flymake.html \ forms.html \ gnus.html \ @@ -214,6 +214,7 @@ ede.pdf \ ediff.pdf \ edt.pdf \ + efaq.pdf \ eieio.pdf \ emacs-mime.pdf \ epa.pdf \ @@ -221,7 +222,6 @@ ert.pdf \ eshell.pdf \ eudc.pdf \ - faq.pdf \ flymake.pdf \ forms.pdf \ gnus.pdf \ @@ -272,6 +272,7 @@ ede.ps \ ediff.ps \ edt.ps \ + efaq.ps \ eieio.ps \ emacs-mime.ps \ epa.ps \ @@ -279,7 +280,6 @@ ert.ps \ eshell.ps \ eudc.ps \ - faq.ps \ flymake.ps \ forms.ps \ gnus.ps \ @@ -515,6 +515,31 @@ edt.html: $(edt_deps) $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/edt.texi +## No gfdl dependency. +efaq_deps = ${srcdir}/efaq.texi $(emacsdir)/emacsver.texi +efaq : $(buildinfodir)/efaq$(INFO_EXT) +$(buildinfodir)/efaq$(INFO_EXT): $(efaq_deps) + $(mkinfodir) + $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/efaq.texi +efaq.dvi: $(efaq_deps) + $(ENVADD) $(TEXI2DVI) ${srcdir}/efaq.texi +efaq.pdf: $(efaq_deps) + $(ENVADD) $(TEXI2PDF) ${srcdir}/efaq.texi +efaq.html: $(efaq_deps) + $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/efaq.texi + +efaq_w32_deps = ${srcdir}/efaq-w32.texi $(emacsdir)/emacsver.texi +efaq-w32 : $(buildinfodir)/efaq-w32$(INFO_EXT) +$(buildinfodir)/efaq-w32$(INFO_EXT): $(efaq_w32_deps) + $(mkinfodir) + $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/efaq-w32.texi +efaq-w32.dvi: $(efaq_w32_deps) + $(ENVADD) $(TEXI2DVI) ${srcdir}/efaq-w32.texi +efaq-w32.pdf: $(efaq_w32_deps) + $(ENVADD) $(TEXI2PDF) ${srcdir}/efaq-w32.texi +efaq-w32.html: $(efaq_w32_deps) + $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/efaq-w32.texi + eieio_deps = ${srcdir}/eieio.texi ${gfdl} eieio : $(buildinfodir)/eieio$(INFO_EXT) $(buildinfodir)/eieio$(INFO_EXT): $(eieio_deps) @@ -611,31 +636,6 @@ eudc.html: $(eudc_deps) $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/eudc.texi -## No gfdl dependency. -faq_deps = ${srcdir}/faq.texi $(emacsdir)/emacsver.texi -efaq : $(buildinfodir)/efaq$(INFO_EXT) -$(buildinfodir)/efaq$(INFO_EXT): $(faq_deps) - $(mkinfodir) - $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/faq.texi -faq.dvi: $(faq_deps) - $(ENVADD) $(TEXI2DVI) ${srcdir}/faq.texi -faq.pdf: $(faq_deps) - $(ENVADD) $(TEXI2PDF) ${srcdir}/faq.texi -faq.html: $(faq_deps) - $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/faq.texi - -efaq_w32_deps = ${srcdir}/efaq-w32.texi $(emacsdir)/emacsver.texi -efaq-w32 : $(buildinfodir)/efaq-w32$(INFO_EXT) -$(buildinfodir)/efaq-w32$(INFO_EXT): $(efaq_w32_deps) - $(mkinfodir) - $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/efaq-w32.texi -efaq-w32.dvi: $(efaq_w32_deps) - $(ENVADD) $(TEXI2DVI) ${srcdir}/efaq-w32.texi -efaq-w32.pdf: $(efaq_w32_deps) - $(ENVADD) $(TEXI2PDF) ${srcdir}/efaq-w32.texi -efaq-w32.html: $(efaq_w32_deps) - $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/efaq-w32.texi - flymake_deps = ${srcdir}/flymake.texi ${gfdl} flymake : $(buildinfodir)/flymake$(INFO_EXT) $(buildinfodir)/flymake$(INFO_EXT): $(flymake_deps) === renamed file 'doc/misc/faq.texi' => 'doc/misc/efaq.texi' ------------------------------------------------------------ revno: 114029 fixes bug: http://debbugs.gnu.org/15126 committer: Juri Linkov branch nick: trunk timestamp: Tue 2013-08-27 19:06:16 +0300 message: * lisp/isearch.el (isearch-other-meta-char): Don't store kmacro commands in the keyboard macro. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-27 15:57:16 +0000 +++ lisp/ChangeLog 2013-08-27 16:06:16 +0000 @@ -1,5 +1,10 @@ 2013-08-27 Juri Linkov + * isearch.el (isearch-other-meta-char): Don't store kmacro commands + in the keyboard macro. (Bug#15126) + +2013-08-27 Juri Linkov + * isearch.el (isearch-quote-char): Comment out converting unibyte to multibyte, thus syncing with its `quoted-insert' counterpart. (Bug#15166) === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-08-27 15:57:16 +0000 +++ lisp/isearch.el 2013-08-27 16:06:16 +0000 @@ -2386,6 +2386,13 @@ (isearch-unread-key-sequence keylist) (setq main-event (car unread-command-events)) + ;; Don't store special commands in the keyboard macro. + (let (overriding-terminal-local-map) + (when (memq (key-binding key) + '(kmacro-start-macro + kmacro-end-macro kmacro-end-and-call-macro)) + (cancel-kbd-macro-events))) + ;; If we got a mouse click event, that event contains the ;; window clicked on. maybe it was read with the buffer ;; it was clicked on. If so, that buffer, not the current one, ------------------------------------------------------------ revno: 114028 fixes bug: http://debbugs.gnu.org/15166 committer: Juri Linkov branch nick: trunk timestamp: Tue 2013-08-27 18:57:16 +0300 message: * lisp/isearch.el (isearch-quote-char): Comment out converting unibyte to multibyte, thus syncing with its `quoted-insert' counterpart. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-27 12:46:00 +0000 +++ lisp/ChangeLog 2013-08-27 15:57:16 +0000 @@ -1,3 +1,9 @@ +2013-08-27 Juri Linkov + + * isearch.el (isearch-quote-char): Comment out converting unibyte + to multibyte, thus syncing with its `quoted-insert' counterpart. + (Bug#15166) + 2013-08-27 Martin Rudalics * window.el (display-buffer-use-some-window): Add missing === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-08-08 23:59:14 +0000 +++ lisp/isearch.el 2013-08-27 15:57:16 +0000 @@ -2430,10 +2430,14 @@ (if (subregexp-context-p isearch-string (length isearch-string)) (isearch-process-search-string "[ ]" " ") (isearch-process-search-char char count)) - (and enable-multibyte-characters - (>= char ?\200) - (<= char ?\377) - (setq char (unibyte-char-to-multibyte char))) + ;; This used to assume character codes 0240 - 0377 stand for + ;; characters in some single-byte character set, and converted them + ;; to Emacs characters. But in 23.1 this feature is deprecated + ;; in favor of inserting the corresponding Unicode characters. + ;; (and enable-multibyte-characters + ;; (>= char ?\200) + ;; (<= char ?\377) + ;; (setq char (unibyte-char-to-multibyte char))) (isearch-process-search-char char count)))) (defun isearch-printing-char (&optional char count) ------------------------------------------------------------ revno: 114027 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-27 08:44:07 -0700 message: * configure.ac (DOCMISC_INFO_W32): Typo fix. diff: === modified file 'configure.ac' --- configure.ac 2013-08-27 09:21:46 +0000 +++ configure.ac 2013-08-27 15:44:07 +0000 @@ -1000,7 +1000,7 @@ if test $opsys = mingw32; then DOCMISC_DVI_W32=efaq-w32.dvi DOCMISC_HTML_W32=efaq-w32.html - DOCMISC_INFO_W32=efaq-w32.info + DOCMISC_INFO_W32=efaq-w32 DOCMISC_PDF_W32=efaq-w32.pdf DOCMISC_PS_W32=efaq-w32.ps else ------------------------------------------------------------ revno: 114026 committer: martin rudalics branch nick: trunk timestamp: Tue 2013-08-27 14:46:00 +0200 message: Add missing argument in call of get-largest-window (Bug#15185). * window.el (display-buffer-use-some-window): Add missing argument in call of get-largest-window (Bug#15185). Reported by Stephen Leake. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-27 08:01:13 +0000 +++ lisp/ChangeLog 2013-08-27 12:46:00 +0000 @@ -1,3 +1,9 @@ +2013-08-27 Martin Rudalics + + * window.el (display-buffer-use-some-window): Add missing + argument in call of get-largest-window (Bug#15185). Reported by + Stephen Leake. + 2013-08-27 Glenn Morris * emacs-lisp/package.el (package-buffer-info): Fix message typo. === modified file 'lisp/window.el' --- lisp/window.el 2013-08-23 06:52:19 +0000 +++ lisp/window.el 2013-08-27 12:46:00 +0000 @@ -5813,7 +5813,7 @@ (unless (and not-this-window (eq window (selected-window))) window)) - (get-largest-window 0 not-this-window)))) + (get-largest-window 0 nil not-this-window)))) (when (window-live-p window) (prog1 (window--display-buffer buffer window 'reuse alist) ------------------------------------------------------------ revno: 114025 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-27 06:17:45 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2013-08-12 10:17:43 +0000 +++ autogen/Makefile.in 2013-08-27 10:17:45 +0000 @@ -423,6 +423,11 @@ DEPDIR = @DEPDIR@ DEPFLAGS = @DEPFLAGS@ DESLIB = @DESLIB@ +DOCMISC_DVI_W32 = @DOCMISC_DVI_W32@ +DOCMISC_HTML_W32 = @DOCMISC_HTML_W32@ +DOCMISC_INFO_W32 = @DOCMISC_INFO_W32@ +DOCMISC_PDF_W32 = @DOCMISC_PDF_W32@ +DOCMISC_PS_W32 = @DOCMISC_PS_W32@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ === modified file 'autogen/configure' --- autogen/configure 2013-08-27 08:01:13 +0000 +++ autogen/configure 2013-08-27 10:17:45 +0000 @@ -1397,6 +1397,11 @@ C_SWITCH_MACHINE LD_SWITCH_SYSTEM CANNOT_DUMP +DOCMISC_PS_W32 +DOCMISC_PDF_W32 +DOCMISC_INFO_W32 +DOCMISC_HTML_W32 +DOCMISC_DVI_W32 INFO_OPTS INFO_EXT HAVE_MAKEINFO @@ -8755,6 +8760,25 @@ +if test $opsys = mingw32; then + DOCMISC_DVI_W32=efaq-w32.dvi + DOCMISC_HTML_W32=efaq-w32.html + DOCMISC_INFO_W32=efaq-w32.info + DOCMISC_PDF_W32=efaq-w32.pdf + DOCMISC_PS_W32=efaq-w32.ps +else + DOCMISC_DVI_W32= + DOCMISC_HTML_W32= + DOCMISC_INFO_W32= + DOCMISC_PDF_W32= + DOCMISC_PS_W32= +fi + + + + + + if test x$GCC = xyes; then test "x$GCC_LINK_TEST_OPTIONS" != x && \ @@ -16476,7 +16500,7 @@ emacs_broken_SIGIO=no case $opsys in - hpux* | irix6-5 | openbsd | sol2* | unixware | gnu-kfreebsd ) + hpux* | irix6-5 | openbsd | sol2* | unixware ) emacs_broken_SIGIO=yes ;; @@ -22241,9 +22265,11 @@ - - - + : + + + + : ------------------------------------------------------------ revno: 114024 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-27 13:21:46 +0400 message: * configure.ac (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32) (DOCMISC_PDF_W32, DOCMISC_PS_W32): No spaces! diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-27 08:01:13 +0000 +++ ChangeLog 2013-08-27 09:21:46 +0000 @@ -1,3 +1,8 @@ +2013-08-27 Dmitry Antipov + + * configure.ac (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32) + (DOCMISC_PDF_W32, DOCMISC_PS_W32): No spaces! + 2013-08-27 Glenn Morris * configure.ac (emacs_broken_SIGIO): No longer set on gnu-kfreebsd. === modified file 'configure.ac' --- configure.ac 2013-08-27 08:01:13 +0000 +++ configure.ac 2013-08-27 09:21:46 +0000 @@ -997,19 +997,18 @@ AC_SUBST(INFO_EXT) AC_SUBST(INFO_OPTS) - if test $opsys = mingw32; then - DOCMISC_DVI_W32 = efaq-w32.dvi - DOCMISC_HTML_W32 = efaq-w32.html - DOCMISC_INFO_W32 = efaq-w32.info - DOCMISC_PDF_W32 = efaq-w32.pdf - DOCMISC_PS_W32 = efaq-w32.ps + DOCMISC_DVI_W32=efaq-w32.dvi + DOCMISC_HTML_W32=efaq-w32.html + DOCMISC_INFO_W32=efaq-w32.info + DOCMISC_PDF_W32=efaq-w32.pdf + DOCMISC_PS_W32=efaq-w32.ps else - DOCMISC_DVI_W32 = - DOCMISC_HTML_W32 = - DOCMISC_INFO_W32 = - DOCMISC_PDF_W32 = - DOCMISC_PS_W32 = + DOCMISC_DVI_W32= + DOCMISC_HTML_W32= + DOCMISC_INFO_W32= + DOCMISC_PDF_W32= + DOCMISC_PS_W32= fi AC_SUBST(DOCMISC_DVI_W32) AC_SUBST(DOCMISC_HTML_W32) @@ -1017,7 +1016,6 @@ AC_SUBST(DOCMISC_PDF_W32) AC_SUBST(DOCMISC_PS_W32) - dnl Add our options to ac_link now, after it is set up. if test x$GCC = xyes; then ------------------------------------------------------------ revno: 114023 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-27 01:14:58 -0700 message: * doc/misc/efaq-w32.texi (EMACSVER): Get it from emacsver.texi. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-08-27 08:04:08 +0000 +++ doc/misc/ChangeLog 2013-08-27 08:14:58 +0000 @@ -1,5 +1,7 @@ 2013-08-27 Glenn Morris + * efaq-w32.texi (EMACSVER): Get it from emacsver.texi. + * Makefile.in (webhack): Remove; it's nothing to do with Emacs. * efaq-w32.texi: Move here from the web-pages repository. === modified file 'doc/misc/efaq-w32.texi' --- doc/misc/efaq-w32.texi 2013-08-27 07:57:39 +0000 +++ doc/misc/efaq-w32.texi 2013-08-27 08:14:58 +0000 @@ -11,7 +11,7 @@ Answers to Frequently asked Questions about using Emacs on Microsoft Windows. @end documentdescription -@set EMACSVER 24.3 +@include emacsver.texi @documentencoding utf-8 @documentlanguage en @@ -58,7 +58,8 @@ @node Top @top GNU Emacs FAQ for MS Windows -This is the GNU Emacs FAQ for MS Windows. +This is the FAQ for using GNU Emacs on MS Windows, as distributed with +Emacs @value{EMACSVER}. This FAQ is maintained by the developers and users of Emacs on MS Windows. If you find any errors, or have any suggestions, please send them to ------------------------------------------------------------ revno: 114022 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-27 01:04:08 -0700 message: * doc/misc/Makefile.in (webhack): Remove; it's nothing to do with Emacs. Presumably it is some Gnus thing. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-08-27 07:57:39 +0000 +++ doc/misc/ChangeLog 2013-08-27 08:04:08 +0000 @@ -1,5 +1,7 @@ 2013-08-27 Glenn Morris + * Makefile.in (webhack): Remove; it's nothing to do with Emacs. + * efaq-w32.texi: Move here from the web-pages repository. * Makefile.in (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32) (DOCMISC_PDF_W32, DOCMISC_PS_W32): New configure output variables. === modified file 'doc/misc/Makefile.in' --- doc/misc/Makefile.in 2013-08-27 07:57:39 +0000 +++ doc/misc/Makefile.in 2013-08-27 08:04:08 +0000 @@ -345,10 +345,6 @@ @echo "$(INFO_INSTALL) " | \ sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ */$(INFO_EXT) /g" -# please modify this for all the web manual targets -webhack: clean - $(MAKE) pdf MAKEINFO_OPTS="-DWEBHACKDEVEL $(MAKEINFO_OPTS)" - dvi: $(DVI_TARGETS) html: $(HTML_TARGETS) ------------------------------------------------------------ revno: 114021 [merge] committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-27 01:01:13 -0700 message: Merge from emacs-24; up to r111403 diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-27 07:57:39 +0000 +++ ChangeLog 2013-08-27 08:01:13 +0000 @@ -1,5 +1,7 @@ 2013-08-27 Glenn Morris + * configure.ac (emacs_broken_SIGIO): No longer set on gnu-kfreebsd. + * configure.ac (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32) (DOCMISC_PDF_W32, DOCMISC_PS_W32): New output variables. * Makefile.in (check-info-dir): Ignore efaq-w32. === modified file 'configure.ac' --- configure.ac 2013-08-27 07:57:39 +0000 +++ configure.ac 2013-08-27 08:01:13 +0000 @@ -3868,7 +3868,7 @@ case $opsys in dnl SIGIO exists, but the feature doesn't work in the way Emacs needs. dnl See eg . - hpux* | irix6-5 | openbsd | sol2* | unixware | gnu-kfreebsd ) + hpux* | irix6-5 | openbsd | sol2* | unixware ) emacs_broken_SIGIO=yes ;; === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-27 02:41:41 +0000 +++ lisp/ChangeLog 2013-08-27 08:01:13 +0000 @@ -1,3 +1,7 @@ +2013-08-27 Glenn Morris + + * emacs-lisp/package.el (package-buffer-info): Fix message typo. + 2013-08-27 Stefan Monnier * progmodes/python.el (python-font-lock-keywords): Don't return nil === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-08-03 02:34:22 +0000 +++ lisp/emacs-lisp/package.el 2013-08-27 08:01:13 +0000 @@ -981,7 +981,7 @@ boundaries." (goto-char (point-min)) (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t) - (error "Packages lacks a file header")) + (error "Package lacks a file header")) (let ((file-name (match-string-no-properties 1)) (desc (match-string-no-properties 2)) (start (line-beginning-position))) ------------------------------------------------------------ revno: 114020 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-08-27 00:57:39 -0700 message: Move source for Emacs on MS Windows FAQ here from Emacs webpages repository * Makefile.in (mostlyclean, clean, distclean, bootstrap-clean) (maintainer-clean, check-declare): Remove pointless subshells. Check cd return value. * configure.ac (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32) (DOCMISC_PDF_W32, DOCMISC_PS_W32): New output variables. * Makefile.in (check-info-dir): Ignore efaq-w32. * admin/admin.el (manual-misc-manuals): Use INFO_COMMON rather than INFO_TARGETS. * doc/misc/efaq-w32.texi: Move here from the web-pages repository. * doc/misc/Makefile.in (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32) (DOCMISC_PDF_W32, DOCMISC_PS_W32): New configure output variables. (INFO_COMMON, INFO_INSTALL): New derivations of INFO_TARGETS. (DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS): Add DOCMISC_*_W32 variables. (echo-info): Use INFO_INSTALL rather than INFO_TARGETS. (efaq_w32_deps): New variable. (efaq-w32, $(buildinfodir)/efaq-w32$(INFO_EXT), efaq-w32.dvi) (efaq-w32.pdf, efaq-w32.html): New rules. (clean): Remove efaq-w32 products. diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-27 06:58:08 +0000 +++ ChangeLog 2013-08-27 07:57:39 +0000 @@ -1,5 +1,9 @@ 2013-08-27 Glenn Morris + * configure.ac (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32) + (DOCMISC_PDF_W32, DOCMISC_PS_W32): New output variables. + * Makefile.in (check-info-dir): Ignore efaq-w32. + * Makefile.in (mostlyclean, clean, distclean, bootstrap-clean) (maintainer-clean, check-declare): Remove pointless subshells. Check cd return value. === modified file 'Makefile.in' --- Makefile.in 2013-08-27 06:58:08 +0000 +++ Makefile.in 2013-08-27 07:57:39 +0000 @@ -1026,13 +1026,15 @@ fi # The info/dir file must be updated by hand when new manuals are added. +# Cannot add an info/dir entry for efaq-w32 since it is not installed +# on all platforms. check-info-dir: info cd info ; \ missing= ; \ for file in *; do \ test -f "$${file}" || continue ; \ case $${file} in \ - *-[0-9]*|COPYING|dir) continue ;; \ + *-[0-9]*|COPYING|dir|efaq-w32*) continue ;; \ esac ; \ file=`echo $${file} | sed 's/\.info//'` ; \ grep -q -F ": ($${file})." dir || missing="$${missing} $${file}" ; \ === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-08-15 06:38:44 +0000 +++ admin/ChangeLog 2013-08-27 07:57:39 +0000 @@ -1,3 +1,8 @@ +2013-08-27 Glenn Morris + + * admin.el (manual-misc-manuals): Use INFO_COMMON rather than + INFO_TARGETS. + 2013-08-15 Glenn Morris * make-tarball.txt: Mention generating pdfs in etc/refcards. === modified file 'admin/admin.el' --- admin/admin.el 2013-07-12 06:45:04 +0000 +++ admin/admin.el 2013-08-27 07:57:39 +0000 @@ -195,19 +195,21 @@ (defun manual-misc-manuals (root) "Return doc/misc manuals as list of strings." - ;; Like `make -C doc/misc echo-info', but works if unconfigured. + ;; Similar to `make -C doc/misc echo-info', but works if unconfigured, + ;; and for INFO_TARGETS rather than INFO_INSTALL. (with-temp-buffer (insert-file-contents (expand-file-name "doc/misc/Makefile.in" root)) - (search-forward "INFO_TARGETS = ") - (let ((start (point)) - res) + ;; Should really use expanded value of INFO_TARGETS. + (search-forward "INFO_COMMON = ") + (let ((start (point))) (end-of-line) (while (and (looking-back "\\\\") (zerop (forward-line 1))) (end-of-line)) - (split-string (replace-regexp-in-string - "\\(\\\\\\|\\.info\\)" "" - (buffer-substring start (point))))))) + (append (split-string (replace-regexp-in-string + "\\(\\\\\\|\\.info\\)" "" + (buffer-substring start (point)))) + '("efaq-w32"))))) (defun make-manuals (root &optional type) "Generate the web manuals for the Emacs webpage. === modified file 'configure.ac' --- configure.ac 2013-08-22 17:35:00 +0000 +++ configure.ac 2013-08-27 07:57:39 +0000 @@ -997,6 +997,27 @@ AC_SUBST(INFO_EXT) AC_SUBST(INFO_OPTS) + +if test $opsys = mingw32; then + DOCMISC_DVI_W32 = efaq-w32.dvi + DOCMISC_HTML_W32 = efaq-w32.html + DOCMISC_INFO_W32 = efaq-w32.info + DOCMISC_PDF_W32 = efaq-w32.pdf + DOCMISC_PS_W32 = efaq-w32.ps +else + DOCMISC_DVI_W32 = + DOCMISC_HTML_W32 = + DOCMISC_INFO_W32 = + DOCMISC_PDF_W32 = + DOCMISC_PS_W32 = +fi +AC_SUBST(DOCMISC_DVI_W32) +AC_SUBST(DOCMISC_HTML_W32) +AC_SUBST(DOCMISC_INFO_W32) +AC_SUBST(DOCMISC_PDF_W32) +AC_SUBST(DOCMISC_PS_W32) + + dnl Add our options to ac_link now, after it is set up. if test x$GCC = xyes; then === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-08-19 05:10:33 +0000 +++ doc/misc/ChangeLog 2013-08-27 07:57:39 +0000 @@ -1,3 +1,17 @@ +2013-08-27 Glenn Morris + + * efaq-w32.texi: Move here from the web-pages repository. + * Makefile.in (DOCMISC_DVI_W32, DOCMISC_HTML_W32, DOCMISC_INFO_W32) + (DOCMISC_PDF_W32, DOCMISC_PS_W32): New configure output variables. + (INFO_COMMON, INFO_INSTALL): New derivations of INFO_TARGETS. + (DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS): + Add DOCMISC_*_W32 variables. + (echo-info): Use INFO_INSTALL rather than INFO_TARGETS. + (efaq_w32_deps): New variable. + (efaq-w32, $(buildinfodir)/efaq-w32$(INFO_EXT), efaq-w32.dvi) + (efaq-w32.pdf, efaq-w32.html): New rules. + (clean): Remove efaq-w32 products. + 2013-08-19 Katsumi Yamaoka * emacs-mime.texi (Encoding Customization): Exclude iso-2022-jp-2 and === modified file 'doc/misc/Makefile.in' --- doc/misc/Makefile.in 2013-08-12 00:41:34 +0000 +++ doc/misc/Makefile.in 2013-08-27 07:57:39 +0000 @@ -59,7 +59,15 @@ MAKEINFO = @MAKEINFO@ MAKEINFO_OPTS = --force -I$(emacsdir) -INFO_TARGETS = ada-mode auth autotype bovine calc ccmode cl \ +## On MS Windows, efaq-w32; otherwise blank. +DOCMISC_DVI_W32 = @DOCMISC_DVI_W32@ +DOCMISC_HTML_W32 = @DOCMISC_HTML_W32@ +DOCMISC_INFO_W32 = @DOCMISC_INFO_W32@ +DOCMISC_PDF_W32 = @DOCMISC_PDF_W32@ +DOCMISC_PS_W32 = @DOCMISC_PS_W32@ + +## Info files to build and install on all platforms. +INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \ dbus dired-x ebrowse ede ediff edt eieio \ emacs-mime epa erc ert eshell eudc efaq \ flymake forms gnus emacs-gnutls htmlfontify idlwave ido info.info \ @@ -68,7 +76,15 @@ sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp \ url vip viper widget wisent woman -DVI_TARGETS = \ +## Info files to install on current platform. +INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_INFO_W32) + +## Info files to build on current platform. +## This is all of them, even though they might not all get installed, +## because the info files are pre-built in release tarfiles. +INFO_TARGETS = $(INFO_COMMON) efaq-w32 + +DVI_TARGETS = $(DOCMISC_DVI_W32) \ ada-mode.dvi \ auth.dvi \ autotype.dvi \ @@ -126,7 +142,7 @@ wisent.dvi \ woman.dvi -HTML_TARGETS = \ +HTML_TARGETS = $(DOCMISC_HTML_W32) \ ada-mode.html \ auth.html \ autotype.html \ @@ -184,7 +200,7 @@ wisent.html \ woman.html -PDF_TARGETS = \ +PDF_TARGETS = $(DOCMISC_PDF_W32) \ ada-mode.pdf \ auth.pdf \ autotype.pdf \ @@ -242,7 +258,7 @@ wisent.pdf \ woman.pdf -PS_TARGETS = \ +PS_TARGETS = $(DOCMISC_PS_W32) \ ada-mode.ps \ auth.ps \ autotype.ps \ @@ -326,7 +342,7 @@ ## Used by top-level Makefile. ## Base file names of output info files. echo-info: - @echo "$(INFO_TARGETS) " | \ + @echo "$(INFO_INSTALL) " | \ sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ */$(INFO_EXT) /g" # please modify this for all the web manual targets @@ -612,6 +628,18 @@ faq.html: $(faq_deps) $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/faq.texi +efaq_w32_deps = ${srcdir}/efaq-w32.texi $(emacsdir)/emacsver.texi +efaq-w32 : $(buildinfodir)/efaq-w32$(INFO_EXT) +$(buildinfodir)/efaq-w32$(INFO_EXT): $(efaq_w32_deps) + $(mkinfodir) + $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/efaq-w32.texi +efaq-w32.dvi: $(efaq_w32_deps) + $(ENVADD) $(TEXI2DVI) ${srcdir}/efaq-w32.texi +efaq-w32.pdf: $(efaq_w32_deps) + $(ENVADD) $(TEXI2PDF) ${srcdir}/efaq-w32.texi +efaq-w32.html: $(efaq_w32_deps) + $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/efaq-w32.texi + flymake_deps = ${srcdir}/flymake.texi ${gfdl} flymake : $(buildinfodir)/flymake$(INFO_EXT) $(buildinfodir)/flymake$(INFO_EXT): $(flymake_deps) @@ -1040,6 +1068,7 @@ clean: mostlyclean rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS) + rm -f efaq-w32.dvi efaq-w32.html efaq-w32.pdf efaq-w32.ps rm -f emacs-misc-${version}.tar* distclean: clean === added file 'doc/misc/efaq-w32.texi' --- doc/misc/efaq-w32.texi 1970-01-01 00:00:00 +0000 +++ doc/misc/efaq-w32.texi 2013-08-27 07:57:39 +0000 @@ -0,0 +1,2364 @@ +\input texinfo @c -*-coding:utf-8 -*- +@setfilename efaq-w32 +@settitle GNU Emacs FAQ For MS Windows +@setchapternewpage odd +@syncodeindex pg cp +@syncodeindex ky cp +@syncodeindex tp cp +@syncodeindex vr fn + +@documentdescription +Answers to Frequently asked Questions about using Emacs on Microsoft Windows. +@end documentdescription + +@set EMACSVER 24.3 + +@documentencoding utf-8 +@documentlanguage en + +@copying +Copyright @copyright{} 2008, 2010-2013 Free Software Foundation, Inc. + +@quotation +This list of frequently asked questions about GNU Emacs on MS Windows +with answers (``FAQ'') may be translated into other languages, +transformed into other formats (e.g. Texinfo, Info, WWW), and updated +with new information. + +The same conditions apply to any derivative of the FAQ as apply to the FAQ +itself. Every copy of the FAQ must include this notice or an approved +translation, information on who is currently maintaining the FAQ and how to +contact them (including their e-mail address), and information on where the +latest version of the FAQ is archived (including FTP information). + +The FAQ may be copied and redistributed under these conditions, except that +the FAQ may not be embedded in a larger literary work unless that work +itself allows free copying and redistribution. +@end quotation +@end copying + +@dircategory Emacs +@direntry +* Emacs W32 FAQ: (efaq-w32). FAQs about Emacs on MS Windows. +@end direntry + +@c The @titlepage stuff only appears in the printed version +@titlepage +@sp 10 +@center @titlefont{GNU Emacs FAQ for MS Windows} + +@c The following two commands start the copyright page. +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@footnotestyle end + +@node Top +@top GNU Emacs FAQ for MS Windows + +This is the GNU Emacs FAQ for MS Windows. + +This FAQ is maintained by the developers and users of Emacs on MS Windows. +If you find any errors, or have any suggestions, please send them to +the @url{http://lists.gnu.org/mailman/listinfo/help-emacs-windows, +help-emacs-windows} mailing list. + +At time of writing, the latest version of GNU Emacs is version @value{EMACSVER}. + +@c Links to ftp.gnu.org are given as http links, since Windows ftp clients +@c are notoriously bad at handling firewalls etc. + +@contents + +@menu +* Introduction:: +* Getting Emacs:: +* Installing Emacs:: +* Display Settings:: +* Fonts and text translation:: +* Printing:: +* Sub-processes:: +* Network access:: +* Text and Utility modes:: +* Developing with Emacs:: +* Other useful ports:: +* Further information:: +* Indexes:: +@end menu + +@c ------------------------------------------------------------ +@node Introduction +@chapter Introduction +@cindex scope of FAQ + +This FAQ covers questions that are specific to running GNU Emacs on Windows. +For more general information, see the other Emacs manuals. +@xref{Further information}. + +@menu +* Why Emacs on Windows:: +* Which versions of Windows:: +* Other versions of Emacs:: +@end menu + +@node Why Emacs on Windows +@section Why support GNU Emacs on Windows? +@cindex Why Windows + +It is not our goal to ``help Windows users'' by making text editing +on Windows more convenient. We aim to replace proprietary software, +not to enhance it. So why support GNU Emacs on Windows? + +We hope that the experience of using GNU Emacs on Windows will give +programmers a taste of freedom, and that this will later inspire them +to move to a free operating system such as GNU/Linux. That is the +main valid reason to support free applications on nonfree operating +systems. + +@node Which versions of Windows +@section Which versions of Windows are supported? +@cindex Windows, versions +@cindex supported versions of Windows + +Emacs @value{EMACSVER} is known to run on all versions of Windows from +@c FIXME does it really still support Windows 98? Does it matter? +Windows 98 and Windows NT 4.0 through to Windows 7. The Windows port is +built using the Win32 API and supports most features of the X version, +including variable width fonts, images and tooltips. + +@node Other versions of Emacs +@section What other versions of Emacs run on Windows? +@cindex other ports of Emacs + +@xref{Cygwin}. + +@cindex DOS port +@cindex Windows 3.11 port +Emacs can also be compiled for MSDOS. When run on recent MS Windows, +it supports long file names, and uses the Windows clipboard. +See the @file{msdos} directory in the Emacs sources for building +instructions (requires DJGPP). + +@c ------------------------------------------------------------ +@node Getting Emacs +@chapter Getting Emacs + +@menu +* Downloading:: +* Compiling:: +* Debugging:: +@end menu + +@node Downloading +@section Where can I download Emacs? + +@cindex precompiled binaries +@cindex where to get Emacs binaries +Pre-compiled versions are distributed from +@uref{http://ftpmirror.gnu.org/emacs/windows/, ftp.gnu.org mirrors}. +Emacs binaries are distributed as zip files, digitally +signed by the developer who built them. Generally most users will +want the file @file{emacs-@value{EMACSVER}-bin-i386.zip}, which +contains everything you need to get started. + +@cindex where to get sources +@cindex Emacs source code +@cindex source for Emacs +The latest source is available from +@uref{http://ftpmirror.gnu.org/emacs/, ftp.gnu.org mirrors}. It is +distributed as a compressed tar file, digitally signed by the maintainer +who made the release. + +@cindex Bzr, getting Emacs +@cindex latest development version of Emacs +@cindex Emacs Development +The development version of Emacs is available from +@uref{http://savannah.gnu.org/projects/emacs, Savannah}, the GNU +development site. + +@node Compiling +@section How can I compile Emacs myself? +@cindex compiling Emacs + +To compile Emacs on Windows, you will need the MingW or Cygwin port of +GCC with MingW make, or a Microsoft C compiler with nmake and the +single threaded C runtime library. Recent versions of Microsoft +Visual Studio no longer come with the single threaded C runtime +library, which is required for certain POSIX compatibility, so MingW +is usually the best choice. Image support requires external +libraries, the headers and import libraries for which will need to be +installed where your compiler can find them. You will also need ports +of GNU @command{rm} and @command{cp}, as the Windows native +equivalents are not consistent between versions. GNU texinfo will be +required to build the manuals. @xref{Other useful ports}. + +After unpacking the source, or checking out of Bzr, be sure to read the +instructions in @file{nt/README} and @file{nt/INSTALL}. + +@node Debugging +@section How do I use a debugger on Emacs? +@cindex debugging Emacs +@cindex bugs in Emacs, how to debug +@cindex Emacs debugging + +By default, Emacs is compiled with debugging on, and optimizations enabled. +The optimizations may interfere with some types of debugging; the debugger +may not show clearly where it is, or may not be able to inspect certain +variables. If this is the case, reconfigure with @option{--no-opt}. + +The file @file{etc/DEBUG} contains general debugging hints, as well as +specific notes about debugging Emacs with both gdb and Microsoft debuggers. + +@menu +* GDB:: +* Microsoft Developer Studio:: +@end menu + +@node GDB +@subsection GDB +@cindex GDB, debugging Emacs with +@cindex debugging Emacs with GDB + +GDB is the GNU debugger, which can be used to debug Emacs when it has +been compiled with GCC. The best results will be obtained if you +start gdb from the @file{src} directory as @samp{gdb oo/i386/emacs.exe}. +This will load the init file @file{.gdbinit} in that directory, to +define some extra commands for working with lisp while debugging, and +set up breakpoints to catch abnormal aborts. + +@node Microsoft Developer Studio +@subsection Microsoft Developer Studio +@cindex MSVC++, debugging Emacs with +@cindex DevStudio, debugging Emacs with +@cindex debugging Emacs with MS DevStudio + +MS DevStudio can be used to debug Emacs when it has been compiled with +a Microsoft compiler. To view lisp variables, you can call the +function @code{debug_print} from the Quickwatch window. Some +@uref{http://www.gnu.org/software/emacs/windows/ntemacs/discuss/debug.txt, +old tips} are probably still valid. + +@c ------------------------------------------------------------ +@node Installing Emacs +@chapter Installing Emacs + +@menu +* Unpacking:: +* Installing:: +* Image support:: +* Init file:: +* Location of init file:: +* Troubleshooting init file:: +* Associate files with Emacs:: +* Find-file and the Desktop:: +* Make Windows more like X:: +* Make Emacs like a Windows app:: +* Window operations:: +* Uninstall:: +* Does not run:: +* Virus:: +* Anti-virus:: +@end menu + +@node Unpacking +@section How do I unpack the distributions? +@cindex unpacking Emacs distribution +@cindex extracting Emacs distribution +@cindex unzipping Emacs distribution +@cindex untarring Emacs distribution +@cindex zip files, how to unpack Emacs binaries +@cindex tar.gz files, how to unpack Emacs sources + +The binary distributions are distributed as zip files, which are handled +natively by Windows XP and later. For earlier versions, there are many +tools that can handle the zip format, from InfoZip's command line unzip +tool, to 7zip's multi-format graphical archive explorer. Although +popular, WinZip has caused problems with line-ends in the past, and is not +Free software, so we do not recommend it. + +Source distributions are distributed as gzipped tar files. 7zip and +similar multi-format graphical tools can handle these, or you can get +Windows ports of the command line gzip and tar tools from multiple sources. +@xref{Other useful ports}. + +The command to unpack a source distribution from the command line is: +@example +tar xzf emacs-@value{EMACSVER}.tar.gz +@end example + +If this does not work with the versions of tar and gzip that you have, +you may need to try a two step process: +@example +gzip -dc emacs-@value{EMACSVER}.tar.gz | tar xvf - +@end example + +You may see many messages from tar complaining about being unable to change +the modification time on directories, and from gzip complaining about a +broken pipe. These messages are usually harmless, caused by incomplete ports +that are not fully aware of the limitations of Windows. + +@node Installing +@section How do I install Emacs after unpacking? +@cindex installing Emacs +@pindex addpm +@cindex Start Menu, creating icons for Emacs + +You can run Emacs without any extra steps, but if you want icons in your +Start Menu, or for Emacs to detect the image libraries that are already +installed on your system as part of GTK, then you should run the program +@file{emacs-@value{EMACSVER}\bin\addpm.exe}. + +@node Image support +@section How do I get image support? +@cindex images, installing libraries for +@cindex jpeg, installing image support in Emacs +@cindex png, installing image support in Emacs +@cindex gif, installing image support in Emacs +@cindex tiff, installing image support in Emacs +@cindex xpm, installing image support in Emacs +@cindex toolbar, installing color icons in +@cindex color images, installing support for images in Emacs +@cindex monochrome images, getting color images in Emacs +@cindex black and white images, getting color images in Emacs + +Emacs has built in support for XBM and PBM/PGM/PPM images. This is +sufficient to see the monochrome splash screen and tool-bar icons. +Since 22.2, the official precompiled binaries for Windows have bundled +libXpm, which is required to display the color versions of those images. + +Emacs is compiled to recognize JPEG, PNG, GIF and TIFF images also, +but displaying these image types require external DLLs which are not +bundled with Emacs. @xref{Other useful ports}. + +@node Init file +@section What is my init file? +@cindex .emacs +@cindex init file + +When Emacs starts up, it attempts to load and execute the contents of +a file commonly called @file{.emacs} (though it may have other names, +@pxref{Installing Emacs,,Where do I put my init file?}) which contains any +customizations you have made. You can manually add lisp code to your +.emacs, or you can use the Customization interface accessible from the +@emph{Options} menu. If the file does not exist, Emacs will start +with the default settings. + +@node Location of init file +@section Where do I put my init file? +@cindex HOME directory +@cindex .emacs.d +@cindex _emacs +@cindex init.el +@cindex registry, setting the HOME directory in + +On Windows, the .emacs file may be called _emacs for backward +compatibility with DOS and FAT filesystems where filenames could not +start with a dot. Some users prefer to continue using such a name, +because Explorer cannot create a file with a name starting with a dot, +even though the filesystem and most other programs can handle it. +In Emacs 22 and later, the init file may also be called +@file{.emacs.d/init.el}. Many of the other files that are created +by lisp packages are now stored in the @file{.emacs.d} directory too, +so this keeps all your Emacs related files in one place. + +All the files mentioned above should go in your @env{HOME} directory. +The @env{HOME} directory is determined by following the steps below: + +@enumerate +@item +If the environment variable @env{HOME} is set, use the directory it indicates. +@item +If the registry entry @code{HKCU\SOFTWARE\GNU\Emacs\HOME} is set, use the +directory it indicates. +@item +If the registry entry @code{HKLM\SOFTWARE\GNU\Emacs\HOME} is set, use the +directory it indicates. Not recommended, as it results in users sharing +the same HOME directory. +@item +If @file{C:\.emacs} exists, then use @file{C:/}. This is for +backward compatibility, as previous versions defaulted to @file{C:/} +if @env{HOME} was not set. +@item +Use the user's AppData directory, usually a directory called +@file{Application Data} under the user's profile directory, the location +of which varies according to Windows version and whether the computer is +part of a domain. +@end enumerate + +Within Emacs, @key{~} at the beginning of a file name is expanded to your +@env{HOME} directory, so you can always find your .emacs file with +@kbd{C-x C-f ~/.emacs}. + +@node Troubleshooting init file +@section Troubleshooting init file problems +@cindex troubleshooting init problems +@cindex debugging init problems +@cindex checking that HOME is set correctly + +If you've set @env{HOME} to a directory using one of the above +methods, and Emacs still doesn't load your init file, the first +thing you should do is check to see what Emacs thinks @env{HOME} is set +to. You can do this by evaluating the following expression in the +@file{*scratch*} buffer using @kbd{C-x C-e}: + +@example +(insert (getenv "HOME")) +@end example + +Look carefully at what is printed and make sure the value is +valid. For example, if the value has trailing whitespace, Emacs won't +be able to find the directory. Also, be sure that the value isn't a +relative drive letter (e.g., @file{d:} without a backslash); if it is, +then @env{HOME} is going to be whatever the current directory on that +drive is, which is likely not what you want to happen. + +@node Associate files with Emacs +@section How do I associate files with Emacs? +@cindex Explorer, associating Emacs with files in +@cindex emacsclient, associating files with +@cindex file associations +@cindex associating files with Emacs +@cindex ALTERNATE_EDITOR +@findex server-start + +The recommended way to associate files is to associate them with +@command{emacsclientw.exe}. In order for this to work when Emacs is +not yet started, you will also need to set the environment variable +@env{ALTERNATE_EDITOR} to @command{runemacs.exe}. To open files +in a running instance of Emacs, you will need to add the following +to your init file: +@example +(server-start) +@end example + +@menu +* Using with Explorer:: +@end menu + +@node Using with Explorer +@subsection For use with Internet Explorer +@cindex Internet Explorer, view source in Emacs +@cindex mailto urls, associating with Emacs +@cindex news urls, associating with Emacs +@cindex URLs, associating mail and news URLs with Emacs + +You can use Emacs as the editor for composing mail for +@indicateurl{mailto:} links, reading usenet for @indicateurl{news:} +links, and viewing source. The following registry entries control +this: + +@itemize @w{} +@item +Mail +@itemize +@item @strong{Key:} HKCR\mailto\shell\open\command\(Default) +@item @strong{Value:} emacsclientw -e "(message-mail (substring \"%1\" 7))" +@end itemize + +@item +News +@itemize +@item @strong{Key:} HKCR\news\shell\open\command\(Default) +@item @strong{Value:} emacsclientw -e "(gnus-fetch-group (substring \"%1\" 5)" +@end itemize + +@item +View Source +@itemize +@item @strong{Key:} HKCR\htmlfile\shell\edit\command\(Default) +@item @strong{Value:} emacsclientw "%1" +@end itemize + +@end itemize + +Thanks to Jason Rumney and Sigbjorn Finne for these tips. + +@node Find-file and the Desktop +@section How do I use find-file to open files that are on the Desktop? +@cindex Desktop, finding where it is +@cindex finding the Desktop +@cindex locating files on the Desktop + +The location of the Desktop varies between different versions of +Windows, and in a corporate environment can be moved around by the +network administrator. On NT derivatives, you can use the value of +the @env{USERPROFILE} environment variable to find where the desktop +might be: + +@example +@kbd{C-x C-f $USERPROFILE/Desktop} +@end example + +If this doesn't work, then you probably have to forgo the keyboard +just this once, and either drag a file onto the Emacs frame from the +desktop, or use the file dialog (displayed when you use the toolbar or +menu by default). Once you have a file from the Desktop inside Emacs, +@kbd{C-x C-f} will quickly reveal where your desktop is kept. + +@node Make Windows more like X +@section How can I modify Windows to act more like X? +@cindex X, making Windows behave like + +@menu +* Focus follows mouse:: +* Swap CapsLock and Control:: +@end menu + +@node Focus follows mouse +@subsection How do it make the active window follow the mouse? +@vindex focus-follows-mouse +@cindex point to focus +@cindex mouse over to focus + +Customize the variables @code{focus-follows-mouse} and +@code{mouse-autoselect-window}. The former can be used to mislead +Emacs into giving focus to other frames when the mouse is over them, +even though Windows has a click to focus policy by default (there is +software available to change that though). The latter can be used to +make Emacs use a focus-follow-mouse policy within its own frames. + +@node Swap CapsLock and Control +@subsection How do I swap CapsLock and Control? +@cindex scan codes, modifying +@cindex key layout, customizing +@cindex caps-lock, swapping with control key +@cindex control key, swapping with caps-lock +@cindex windows key, use as alt +@cindex alt key, using windows keys as additional + +This cannot be done within Emacs, but you can modify the scan code +mappings in the registry or define a new keyboard layout to swap the +keys on a system wide basis. + +@menu +* Swap Caps NT:: +* Swap Caps 98:: +@end menu + +@node Swap Caps NT +@subsubsection Windows NT/2000/XP/Vista? + +@itemize +@item +From Chris McMahon. To make CapsLock a Control key (leaving your +original control keys as they were), use this registry file: +@example +REGEDIT4 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] +"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 +@end example +To swap CapsLock and the left Control key, use: +@example +REGEDIT4 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] +"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00 +@end example +Save these as files with a @file{.reg} extension, and double-click on +them in Explorer, or ``run'' them from a command prompt to have them +update your registry (you may need to reboot). +@item +Shane Holder gives some background on how "Scancode Map" is used +by the system: +@ignore +http://ftp.gnu.org/old-gnu/emacs/windows/docs/ntemacs/contrib/caps-ctrl-registry.txt +From: Shane Holder +To: ntemacs-users@@cs.washington.edu +Date: 04 Dec 1996 14:36:21 -0600 +Message-ID: +Subject: Re: Re[2]: problem with caps/ctrl swap on NT 4.0 +@end ignore +@example +It's a binary value that lets you map keystrokes in the low-level keyboard +drivers in NT. As a result you don't have to worry about applications +bypassing mappings that you've done at a higher level (i.e. it just works). + +Here's the format of the value: + + DWORD: 0x00000000 header + DWORD: 0x00000000 header + DWORD: length (in DWORDs) of remaining data, including terminating DWORD + DWORD: mapping 1 + ... + DWORD: mapping n + DWORD: 0x00000000 terminating null DWORD + +Each mapping DWORD has two parts: the input scancode, and an output +scancode. To map scancode 0x1d (left control) to scancode 0x3a (caps +lock), you want a value of 0x003a001d. Note that this does not swap the +keys. Using just this mapping value, both the left control and the caps +lock key will behave as caps-lock. To swap, you also need to map 0x3a to +0x1d, using 0x001d003a. + +This registry value is system wide, and can't be made user-specific. It +also only takes affect on reboot. +@end example +@item +Ulfar Erlingsson has provided a registry file that sets the CapsLock key +to be a Control key and the Windows key to be an Alt key: +@example +REGEDIT4 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] +"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,38,00,5b,e0,00,00,00,00 +@end example +@end itemize + +@node Swap Caps 98 +@subsubsection Windows 95/98/ME + +Microsoft has a tool called keyremap that is part of their Kernel Toys add ons +for Windows 95. The tool has also been confirmed to work on Windows 98. + +@node Make Emacs like a Windows app +@section How can I modify Emacs to act more like a Windows app? +@cindex Windows, making Emacs act more like +@cindex UI, making Emacs more like other Windows apps + +Many beginning users find Emacs difficult to use because its user +interface is different in many ways. Emacs predates most UI +standards, and experienced Emacs users are used to the way things are, +so changing the defaults is difficult. Most of the ``standard'' +behavior can be approximated in Emacs after some configuring though. + +@menu +* Highlight selection:: +* CUA:: +@end menu + +@node Highlight selection +@subsection Highlighting the selection +@cindex transient-mark-mode +@cindex selection, highlighting +@cindex region, highlighting +@cindex highlighting the selected region +@cindex marked region, highlighting +@cindex point and mark, highlighting the region between +@cindex delete-selection-mode +@cindex overwriting the selected region + +Emacs has a concept of a mark and point that is similar to selections +in other programs. But the mark in Emacs is used for more than just +defining the selected region, it lives on while you continue to edit +and move around the buffer so it can also be a kind of bookmark. The +history of marks is saved so you can pop previous marks back to the +top of the stack to go back to somewhere you were some time ago. +Because of this dual purpose, the region between mark and point is not +highlighted by default unless you select a region by clicking and +dragging the mouse. + +The minor mode @code{transient-mark-mode} changes the behavior of +the mark in two ways. First, it distinguishes between an active mark +that has just been defined or reactivated, and an inactive mark. When +the mark is active, some commands that normally act on lines, words, +buffers etc. will instead act on the region. An inactive mark needs +to be reactivated to operate on it, unless @code{mark-even-if-inactive} +is set. Secondly, @code{transient-mark-mode} also highlights the +region when it is active, providing the same visual clue that you get +in other programs. + +In addition to seeing the highlighting, new Emacs users often expect +editing commands to replace the region when it is active. This behavior +can be obtained with @code{delete-selection-mode}, but see the following +question also. + +@node CUA +@subsection Standard Windows key bindings +@findex cua-mode +@cindex CUA keybindings +@cindex shift key, selecting with +@cindex standard Windows keybindings +@cindex paste with C-v +@cindex cut with C-x +@cindex copy with C-c +@cindex C-c to copy +@cindex C-x to cut +@cindex C-v to paste + +The keybindings of Emacs predate modern GUIs, and the keys that were +chosen by later GUIs for cut and copy were given important functions +as extended keymaps in Emacs. CUA mode attempts to let both bindings +co-exist by defining C-x and C-c as @code{kill-region} and +@code{copy-region-as-kill} when the region is active, and letting +them have their normal Emacs bindings when the region is not active. +Many people find this to be an acceptable compromise. CUA mode also +defines a number of other keys (C-v, Shift selection), and can be turned +on from the @emph{Options} menu. + +@node Window operations +@section Window operations +@cindex maximize frames from lisp +@cindex minimize frames from lisp +@cindex WM_SYSCOMMAND, sending system commands from lisp +@cindex system menu, simulating from lisp + +The function @code{w32-send-sys-command} can be used to simulate +choosing commands from the system menu (in the top left corner of the +Window) and a few other system wide functions. It takes an integer +argument, the value of which should be a valid @code{WM_SYSCOMMAND} +message as documented in Microsoft's API documentation. + +@node Uninstall +@section How do I uninstall Emacs? +@cindex uninstall Emacs +@cindex remove Emacs +@cindex clean Emacs registry settings +@cindex registry, cleaning the Emacs settings +@cindex Start Menu, removing Emacs from +@cindex upgrading Emacs +@cindex delete Emacs directory + +Emacs does not come with an uninstall program. No files are installed +outside of the Emacs base directory, so deleting that directory is +sufficient to clean away the files. If you ran @command{addpm}, +you'll need to delete the Start Menu group too. The registry entries +inserted by @command{addpm} will not cause any problems if you leave +them there, but for the sake of completeness, you can use @command{regedit} +to remove the keys under @code{HKEY_LOCAL_MACHINE} orx +@code{HKEY_CURRENT_USER}: @code{SOFTWARE\GNU\Emacs}, and the key +@code{HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\emacs.exe} if it exists. + +@node Does not run +@section When I run Emacs nothing happens +@cindex troubleshooting installation problems +@cindex window not appearing, Emacs +@cindex failure to run, Emacs +@cindex 8.3 filenames, problems caused + +Emacs could have failed to run for a number of reasons. The most +common symptom is that, when Emacs is started, the cursor changes for +a second but nothing happens. If this happens to you, it is quite +likely that the distribution was unpacked incorrectly. + +Check for the following to see if there was a problem during unpacking: +@enumerate +@item +Be sure to disable the CR/LF translation or the executables will be +unusable. Older versions of WinZipNT would enable this translation by +default. If you are using WinZipNT, disable it. +@item +Check that filenames were not truncated to 8.3. For example, there +should be a file CONTRIBUTE in the top level directory; if this has +been truncated to CONTRIBU or CONTRI~1, your distribution has been +corrupted while unpacking and Emacs will not start. +@end enumerate + +If it is still not working, send mail to the list, describing what +you've done, and what you are seeing. (The more information you send +the more likely it is that you'll receive a helpful response.. + +@node Virus +@section Does Emacs contain a virus? +@cindex virus reported in Emacs +@cindex anti-virus software reporting a virus in Emacs + +There have been reports in the past that some virus scanners claim +that the Emacs distribution has a virus. This is extremely unlikely if +you have downloaded Emacs from the GNU FTP site or one of its mirrors +and the GPG signature for it is valid and listed in the GNU keyring, +unless perhaps it is a new release made in the last few days, in which +case you should exercise more caution and report the problem. Past +problems seem to have been caused by virus checkers running into a +buffer size limit when unpacking large tar.gz files for scanning, and +reporting the failure as an ``unknown virus''. + +@node Anti-virus +@section What known problems are there with anti-virus software? +@cindex anti-virus software, bad interaction with +@cindex virus software, bad interaction with +@cindex firewall, bad interaction with +@cindex scan all files, anti-virus option causing problems +@cindex auto protect, anti-virus option causing problems +@cindex shell, interacting badly with anti-virus +@cindex subprocesses, interacting badly with anti-virus + +Anti-virus and firewall software can block Emacs from starting subprocesses +and opening network connections. Most such products have an Advanced +mode where they will prompt you rather than silently blocking. In some cases +the ``scan all files'' or ``auto protect'' option of anti-virus programs +has caused failures running shell related commands within Emacs. +@xref{Sub-processes,,Why is nothing happening when I enter shell commands?}. + +@c ------------------------------------------------------------ +@node Display Settings +@chapter Display Settings + +@menu +* Console window size:: +* Mouse trouble:: +* Cut and paste NUL:: +* Garbled clipboard:: +* Beep sound:: +@end menu + +@node Console window size +@section Emacs in console mode goes beyond the window size +@cindex console, window size +@cindex telnet, display size problems running emacs over +@cindex -nw, window size +@vindex w32-use-full-screen-buffer + +The variable @code{w32-use-full-screen-buffer} controls whether Emacs uses +the window size or buffer size to determine the number of lines on screen. +Normally the window size is correct, but when running Emacs over some +telnet servers, the buffer size needs to be used. Emacs tries to guess +the correct value at startup, but if it guesses wrong, you can customize +that variable yourself. + +@node Mouse trouble +@section What do I do if I have problems with my mouse buttons? +@cindex mouse buttons, problems with +@cindex 2 button mouse +@cindex two button mouse +@cindex third mouse button, simulating +@cindex middle mouse button, simulating +@cindex simulating three button mouse with two buttons +@cindex swap right and middle mouse buttons +@cindex exchange mouse-2 and mouse-3 buttons +@vindex w32-mouse-button-tolerance +@vindex w32-num-mouse-buttons +@vindex w32-swap-mouse-buttons + +Emacs assigns bindings assuming a three button mouse. On Windows, if +a two button mouse is detected, a hack is enabled which lets you +simulate the third button by pressing both mouse buttons +simultaneously. @code{w32-mouse-button-tolerance} defines the timeout +for what is considered ``simultaneous''. You can check how many +buttons Emacs thinks your mouse has with @kbd{C-h v} +@code{w32-num-mouse-buttons}. + +If you find yourself needing the mouse-3 bindings more often than mouse-2, +you can swap the buttons with the following code in your init file: +@example +(setq w32-swap-mouse-buttons t) +@end example + +@node Cut and paste NUL +@section How do I cut and paste text with NUL characters? +@cindex clipboard, NUL characters + +If you attempt to cut and paste text with NUL characters embedded in it, +then the text will be truncated at the first NUL character. This is a +limitation of the Windows clipboard, and does not affect killing and yanking +from the kill-ring within Emacs. + +@node Garbled clipboard +@section How can I fix garbled text yanked from the clipboard? +@cindex clipboard, corruption of +@cindex garbage on the clipboard +@cindex clipboard encoding +@cindex encoding, clipboard +@findex set-selection-coding-system + +You can try @code{set-selection-coding-system}, but generally such +corruption is a thing of the past, as Emacs uses Unicode for the clipboard +by default now. + +@node Beep sound +@section How do I change the sound of the Emacs beep? +@cindex beep, changing the sound +@cindex sound, changing the beep +@findex set-message-beep + +You can use the function @code{set-message-beep} to change the sound +that Emacs uses for its beep. This affects both console and GUI frames. +The doc string contains a list of the system sounds you can use. + +@c ------------------------------------------------------------ +@node Fonts and text translation +@chapter Fonts and text translation + +@menu +* Font names:: +* Bold and italic:: +* Multilingual fonts:: +* BDF fonts:: +* Font menu:: +* Line ends:: +@end menu + +@node Font names +@section Font names +@cindex XLFD font names +@cindex font XLFD name format +@cindex fontconfig font names in Emacs 23 +@cindex font dialog, using to find font names +@findex w32-select-font +@findex x-list-fonts + +Fonts in Emacs 22 and earlier are named using the X Logical Font +Description (XLFD) format. Emacs on Windows ignores many of the +fields, and populates them with * when listing fonts. Former +maintainer Andrew Innes wrote +@uref{http://www.gnu.org/software/emacs/windows/ntemacs/discuss/x-font-details, +this explanation} of what each field in the font string means and how +Emacs treated them back in 19.34. Since then, multilingual support and +a redisplay overhaul to support variable width fonts have changed things +slightly; more character sets are recognized (and the old pseudo character +sets are deprecated), and the resolution fields are used to calculate the +difference between point and pixel sizes, but normally you should leave +these at the system default. The foundry field is also populated with +an indication of whether the font is outline (.TTF, .ATM) or raster (.FON) +based when fonts are listed, which may let you differentiate between two +fonts with the same name and different technologies. + +From Emacs 23, the preferred font name format will be moving to the simpler +and more flexible fontconfig format. XLFD names will continue to be +supported for backward compatibility. + +@example +XLFD: -*-Courier New-normal-r-*-*-13-*-*-*-c-*-iso8859-1 +Fontconfig: Courier New-13 +@end example + +To find the XFLD name for a font, you can execute the following in the +@file{*scratch*} buffer by pressing C-j at the end of the line: +@example +(w32-select-font nil t) +@end example + +To see a complete list of fonts, execute the following in the +@file{*scratch*} buffer by pressing C-x C-e at the end of the line: +@example +(insert (prin1-to-string (x-list-fonts "*"))) +@end example + +The command line options and frame-parameters for changing the default font +in Emacs are documented in the manual. Fonts can also be used when defining +faces, though family and size are generally specified individually there. +In addition, Emacs on Windows reads the registry to find X Resources. This +is also documented in the manual. + +@node Bold and italic +@section How can I get bold and italic fonts to work? +@cindex italic fonts +@cindex synthesized italic and bold fonts +@cindex bold fonts, synthesized +@findex set-face-font +@vindex w32-enable-synthesized-fonts + +Emacs will only use the italic (and bold) versions of a font automatically +if it has the same width as the normal version. Many fonts have italic +and bold versions that are slightly wider. It will also only use real +bold and italic fonts by default, where other applications may use +synthesized variations that are derived from the normal font. To enable +more italic and bold fonts to be displayed, you can enable synthesized fonts +and manually set the font for italic, bold and bold-italic as follows: + +@example +(setq w32-enable-synthesized-fonts t) +(set-face-font 'italic "-*-Courier New-normal-i-*-*-11-*-*-*-c-*-iso8859-1") +(set-face-font 'bold-italic "-*-Courier New-bold-i-*-*-11-*-*-*-c-*-iso8859-1") +@end example + +@node Multilingual fonts +@section Multilingual font support +@cindex multilingual display, fonts +@cindex MULE, fonts + +@menu +* Language display:: +* Non-latin display:: +* International fonts:: +* Third-party multibyte:: +* Localized fonts:: +@end menu + +@node Language display +@subsection Is it possible to display all the supported languages? +@cindex HELLO file, displaying all +@cindex language support, fonts +@cindex GNU intlfonts, for displaying all languages +@cindex intlfonts, for displaying all languages + +To display all the languages that Emacs is capable of displaying, you will +require the BDF fonts from the GNU intlfonts package. +@xref{Fonts and text translation,,How do I use bdf fonts with Emacs?}. + +For many languages, native truetype fonts are sufficient, and in Emacs +23 the need for BDF fonts will disappear for almost all languages. At +the time of writing, some Arabic characters in the HELLO file still do +not display with native fonts, because they are pre-composed characters +from MULE character sets rather than standard Unicode Arabic, but all +other characters are able to be displayed with appropriate truetype or +opentype fonts. + +@node Non-latin display +@subsection How do I get Emacs to display non-latin characters? +@cindex fontsets, defining +@cindex language support, forcing Emacs to use specific fonts +@cindex MULE, fontsets +@cindex multilingual display, fontsets +@findex create-fontset-from-ascii-font +@findex create-fontset-from-fontset-spec + +Recent versions of Emacs display a large range of characters out of +the box, but if you are having problems with a particular character +set which you know you have fonts for, you can try defining a +new fontset with @code{create-fontset-from-ascii-font} or +@code{create-fontset-from-fontset-spec}. + +@example +(create-fontset-from-fontset-spec + "-*-Courier New-normal-r-*-*-12-*-*-*-c-*-fontset-most, + latin-iso8859-2:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-2, + latin-iso8859-3:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-3, + latin-iso8859-4:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-4, + cyrillic-iso8859-5:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-5, + greek-iso8859-7:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-7, + latin-iso8859-9:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-9, + japanese-jisx0208:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis, + katakana-jisx0201:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis, + latin-jisx0201:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis, + japanese-jisx0208-1978:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis, + korean-ksc5601:-*-Gulim-normal-r-*-*-12-*-*-*-c-*-ksc5601-*, + chinese-gb2312:-*-MS Song-normal-r-*-*-12-*-*-*-c-*-gb2312-*, + chinese-big5-1:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5-*, + chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5-*" t) +@end example + +@node International fonts +@subsection Where can I find fonts for other languages? +@cindex language support, finding fonts +@cindex fonts, where to find +@cindex MULE, finding fonts +@cindex multilingual display, finding fonts +@cindex GNU intlfonts, where to get +@cindex intlfonts, where to get + +In addition to the wide range of fonts that come with the language +support packages of various components of Windows itself, GNU/Linux +distributions these days come with a number of Free truetype fonts +that cover a wide range of languages. The GNU intlfonts source +distribution contains BDF fonts covering all of the languages that can +be displayed by Emacs 22, and can be downloaded from +@uref{http://ftpmirror.gnu.org/intlfonts, ftp.gnu.org mirrors}. + +@node Third-party multibyte +@subsection How do I use third party programs to display multibyte characters? +@cindex multilingual display, third party programs on Windows 9x/ME +@cindex language support, third party programs on Windows 9x/ME +@vindex w32-enable-unicode-output + +You probably only need to do this on the non-Unicode versions of Windows +(95, 98 and ME), and even then, various Windows and Internet Explorer +updates have made third party software unnecessary in most cases. +If you are having trouble displaying text, try defining a fontset +with the font for the languages that the third party software handles +set to what that software expects (which may not be an appropriate font +for that language, but the third party software is intercepting it +and using a different font behind the scenes). +@xref{Non-latin display}. + +In addition to defining a fontset with the expected font, you may also need +to disable unicode output with: +@example +(setq w32-enable-unicode-output nil) +@end example + +@node Localized fonts +@subsection Can I use a font with a name in my language? +@cindex fonts, localized font names +@vindex locale-coding-system + +Normally Emacs should initialize @code{locale-coding-system} appropriately +based on your locale, which will let Emacs use font names in your local +language successfully. + +@node BDF fonts +@section How do I use bdf fonts with Emacs? +@cindex BDF fonts, using +@cindex GNU intlfonts, using +@cindex intlfonts, using +@vindex w32-bdf-filename-alist +@vindex bdf-directory-alist +@vindex font-encoding-alist +@findex w32-find-bdf-fonts +@findex set-frame-font + +To use bdf fonts with Emacs, you need to tell Emacs where the fonts +are located, create fontsets for them, and then use them. We'll use +the 16 dot international fonts from @uref{http://ftpmirror.gnu.org/intlfonts, +ftp.gnu.org/gnu/intlfonts} as an +example put together by Jason Rumney. + +Download @file{16dots.tar.gz} and unpack it; I'll assume that they are in +@file{c:\intlfonts}. Then set @code{w32-bdf-filename-alist} to the list of +fonts returned by using @code{w32-find-bdf-fonts} to enumerate all of +the font files. It is a good idea to set the variable +@code{bdf-directory-list} at the same time so @code{ps-print} knows where +to find the fonts: +@example +(setq bdf-directory-list + '("c:/intlfonts/Asian" "c:/intlfonts/Chinese" + "c:/intlfonts/Chinese-X" "c:/intlfonts/Ethiopic" + "c:/intlfonts/European" "c:/intlfonts/Japanese" + "c:/intlfonts/Japanese-X" "c:/intlfonts/Korean-X" + "c:/intlfonts/Misc/")) + +(setq w32-bdf-filename-alist (w32-find-bdf-fonts bdf-directory-list)) +@end example + +Then create fontsets for the BDF fonts: + +@example +(create-fontset-from-fontset-spec + "-*-fixed-medium-r-normal-*-16-*-*-*-c-*-fontset-bdf, +japanese-jisx0208:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1983-*, +katakana-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*, +latin-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*, +japanese-jisx0208-1978:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1978-*, +thai-tis620:-misc-fixed-medium-r-normal--16-160-72-72-m-80-tis620.2529-1, +lao:-misc-fixed-medium-r-normal--16-160-72-72-m-80-MuleLao-1, +tibetan-1-column:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-80-MuleTibetan-1, +ethiopic:-Admas-Ethiomx16f-Medium-R-Normal--16-150-100-100-M-160-Ethiopic-Unicode, +tibetan:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-160-MuleTibetan-0") +@end example + +Many of the international bdf fonts from gnu.org are type 0, and therefore +need to be added to font-encoding-alist: + +@example +;; Need to add some fonts to font-encoding-alist since the bdf fonts +;; are type 0 not the default type 1. +(setq font-encoding-alist + (append '(("MuleTibetan-0" (tibetan . 0)) + ("GB2312" (chinese-gb2312 . 0)) + ("JISX0208" (japanese-jisx0208 . 0)) + ("JISX0212" (japanese-jisx0212 . 0)) + ("VISCII" (vietnamese-viscii-lower . 0)) + ("KSC5601" (korean-ksc5601 . 0)) + ("MuleArabic-0" (arabic-digit . 0)) + ("MuleArabic-1" (arabic-1-column . 0)) + ("MuleArabic-2" (arabic-2-column . 0))) font-encoding-alist)) +@end example + +You can now use the Emacs font menu (@pxref{Fonts and text +translation,,How can I have Emacs use a font menu like on X?}) to +select the @emph{bdf: 16-dot medium} fontset, or you can select it by +setting the default font: + +@example + (set-frame-font "fontset-bdf") +@end example + +Try loading the file @file{etc/HELLO}, and you should be able to see the +various international fonts displayed (except for Hindi, which is not +included in the 16-dot font distribution). + +@node Font menu +@section How can I have Emacs use a font menu like on X? +@cindex fonts, displaying a menu +@cindex fontsets, displaying a menu +@cindex font dialog, using a menu instead +@vindex w32-use-w32-font-dialog + +Place the following in your init file: + +@example +(setq w32-use-w32-font-dialog nil) +@end example + +@menu +* Add fonts to menu:: +@end menu + +@node Add fonts to menu +@subsection How can I add my font to the font menu? +@cindex font menu, adding fonts +@vindex w32-fixed-font-alist + +If you have set w32-use-w32-font-dialog to nil, you can add fonts to +the font menu by changing `w32-fixed-font-alist'. For example: + +@example +(setq w32-fixed-font-alist + (append w32-fixed-font-alist + '(("Monotype.com" + ("8" "-*-Monotype.com-normal-r-*-*-11-*-*-*-c-iso8859-1") + ("9" "-*-Monotype.com-normal-r-*-*-12-*-*-*-c-iso8859-1") + ("10" "-*-Monotype.com-normal-r-*-*-13-*-*-*-c-iso8859-1") + ("11" "-*-Monotype.com-normal-r-*-*-15-*-*-*-c-iso8859-1"))))) +@end example + +@node Line ends +@section How can I control CR/LF translation? +@cindex DOS line ends +@cindex Unix line ends +@cindex Mac line ends + +There are a number of methods by which you can control automatic CR/LF +translation in Emacs, a situation that reflects the fact that the +default support was not very robust in the past. For a discussion of +this issue, take a look at +@uref{http://www.gnu.org/software/emacs/windows/ntemacs/todo/translate, +this collection of email messages} on the topic. + +@menu +* Automatic line ends:: +* Line ends by filename:: +* Line ends by file system:: +@end menu + +@node Automatic line ends +@subsection Automatic CR/LF translation +@cindex line ends, automatic detection + +For existing files, Emacs scans the file to determine the line ending +convention as part of the same scan it does to determine the file +encoding. Embedded Ctrl-M (ASCII 13) characters and inconsistent line +ends can confuse the automatic scanning, and Emacs will present the +file in Unix (LF) mode with the Ctrl-M characters displayed as @samp{^M}. +It does this to be safe, as no data loss will occur if the file is really +binary and the Ctrl-M characters are significant. + +@node Line ends by filename +@subsection CR/LF translation by file extension +@cindex line ends, determining by filename +@cindex binary files, determining by file name +@vindex file-name-buffer-file-type-alist + +The variable @code{file-name-buffer-file-type-alist} holds a list of +filename patterns and their associated type; binary or text. Files marked +as binary will not have line-end detection performed on them, and instead +will always be displayed as is. With auto-detection in recent versions of +Emacs, this is seldom useful for existing files, but can still be used +to influence the choice of line ends for newly created files. + +@node Line ends by file system +@subsection CR/LF translation by file system +@cindex line ends, determining by filesystem +@cindex binary files, determining by filesystem +@vindex untranslated-filesystem-list +@findex add-untranslated-filesystem +@findex remove-untranslated-filesystem + +The variable @code{untranslated-filesystem-list} defines whole +directory trees that should not have CR/LF autodetection performed on +them. The list can be manipulated with the functions +@code{add-untranslated-filesystem} and +@code{remove-untranslated-filesystem}. With auto-detection in +recent versions of Emacs, this is seldom useful for existing files, +but can still be used to influence the choice of line ends for newly +created files. + +@c ------------------------------------------------------------ +@node Printing +@chapter Printing +@cindex printing + +A lot of effort has gone into making it easier to print from Emacs on +MS Windows, but this has still been insufficient to keep up with +changes in printing technology from text and postscript based printers +connected via ports that can be accessed directly, to graphical +printers that are only accessible via USB. For details, see +@uref{http://www.emacswiki.org/cgi-bin/wiki/PrintingFromEmacs, Emacs +Wiki}. + +@c ------------------------------------------------------------ +@node Sub-processes +@chapter Subprocesses +@cindex subprocesses + +@menu +* Quoting issues:: +* Subprocess hang:: +* Subprocess buffering:: +* Subprocesses and floppy drive:: +* Killing subprocesses:: +* Subprocess EOF:: +* Using shell:: +* Cygwin paths:: +* Dired ls:: +* Shell echo:: +* Shell completion forward slash:: +* Incorrect DOS version:: +* Shell commands do nothing:: +@end menu + +@node Quoting issues +@section Quoting issues +@cindex quoting arguments to subprocesses +@cindex sub-processes, quoting arguments to +@cindex cygwin, quoting arguments + +The quoting rules for native Windows shells and Cygwin shells have +some subtle differences. When Emacs spawns subprocesses, it tries to +determine whether the process is a Cygwin program and changes its +quoting mechanism appropriately. See this +@uref{http://www.gnu.org/software/emacs/windows/ntemacs/discuss/shell-quoting, +previous discussion} for details. + +@node Subprocess hang +@section Programs reading input hang +@cindex subprocesses, hanging when reading input +@cindex full-screen console programs, as subprocesses +@cindex ftp, client hanging +@findex ftp + +Programs that explicitly use a handle to the console (@file{CON} or +@file{CON:}) instead of stdin and stdout cannot be used as +subprocesses to Emacs, and they will also not work in shell-mode. The +default ftp client on Windows is an example of such a program - this +ftp program is mostly fine for use with @code{ange-ftp} or +@code{tramp}, but not for @kbd{M-x ftp} (@pxref{Network access,,How do +I use FTP within Emacs}). There is no convenient way for either Emacs +or any shell used in @code{shell-mode} to redirect the input and +output of such processes from the console to input and output pipes. +The only workaround is to use a different implementation of the +program that does not use the console directly. Microsoft's new +PowerShell appears to be another such program, so that cannot be used +as a replacement shell for Emacs. + +@node Subprocess buffering +@section Buffering in shells and subprocesses +@cindex subprocesses, buffering output +@cindex output not displaying, subprocesses +@cindex SQL subprocess hanging +@cindex cvs hanging when login needed +@cindex ssh, password prompt not appearing when using with cvs +@findex sql-mode +@findex shell-mode +@cindex setbuf, using in subprocesses to prevent buffering +@cindex setvbuf, using in subprocesses to prevent buffering + +You may notice that some programs, when run in a shell in +@code{shell-mode}, +have their output buffered (e.g., people have found this happening to +them with @code{sql-mode}). When the program has a lot of output, it +overflows the buffering and gets printed to the shell buffer; however, +if the program only outputs a small amount of text, it will remain +buffered and won't appear in the shell buffer. The same can happen +in other subprocesses that themselves run other programs as +subprocesses, for example when using @command{cvs} from Emacs, which +is itself configured to use @command{ssh}, password prompts fail to +appear when expected, and @command{cvs} appears to hang. + +Although it may at first seem like the shell is buffering the output +from the program, it is actually the program that is buffering +output. The C runtime typically decides how to buffer output based +upon whether stdout is bound to a handle to a console window or +not. If bound to a console window, output is buffered line by line; if +bound to a block device, such as a file, output is buffered block by +block. + +In a shell buffer, stdout is a pipe handle and so is buffered in +blocks. If you would like the buffering behavior of your program to +behave differently, the program itself is going to have to be changed; +you can use @code{setbuf} and @code{setvbuf} to manipulate +the buffering semantics. + +Some programs handle this by having an explicit flag to control their +buffering behaviour, typically @option{-i} for interactive. Other +programs manage to detect that they are running under Emacs, by +using @samp{getenv("emacs")} internally. + +@menu +* Perl script buffering:: +@end menu + +@node Perl script buffering +@subsection Perl script buffering +@cindex perl, avoiding buffering when used as a subprocess of Emacs + +A handy solution for Perl scripts to the above problem is to use: + +@example +# Turn all buffering off. +select((select(STDOUT), $| = 1)[0]); +select((select(STDERR), $| = 1)[0]); +select((select(STDIN), $| = 1)[0]); +@end example + +@node Subprocesses and floppy drive +@section 16-bit subprocesses accessing the floppy drive +@cindex floppy drive, access when subprocesses started +@cindex subprocess starting causes floppy drive access + +If you are finding the 16 bit DOS subprocesses cause your A: drive to +be accessed, hanging Emacs until the read times out if there is no +floppy in the drive, check to see if your virus software is causing +the problem. + +@node Killing subprocesses +@section Killing subprocesses on Windows 95/98/Me +@cindex subprocess, killing on Windows 95/98/ME +@cindex killing subprocesses, Windows 95/98/ME +@cindex shutdown, complaints about cmdproxy.exe running + +Emacs cannot guarantee that a subprocess gets killed on Windows 95 and +its descendants, and it is a difficult limitation to work around. To +avoid problems on these systems, you should let subprocesses run to +completion including explicitly exiting shells before killing the +associated buffer. + +If you find that while shutting down, Windows complains that there is +a running @command{cmdproxy.exe} even though you carefully exited all +shells and none were showing in Task Manager before the shutdown, this +could be due to buggy interaction with your virus scanner. + +@node Subprocess EOF +@section Sending EOF to subprocesses +@cindex EOF, sending to subprocesses +@cindex shell terminates when EOF sent to subprocess +@findex process-send-eof + +When an EOF is sent to a subprocess running in an interactive shell +with @code{process-send-eof}, the shell terminates unexpectedly as +if its input was closed. This affects the use of @kbd{C-c C-d} in +shell buffers. See +@uref{http://www.gnu.org/software/emacs/windows/ntemacs/todo/shell-ctrl-d, +this discussion} for more details. + +@node Using shell +@section How do I use a shell in Emacs? +@cindex interactive shell, using +@cindex shell within emacs, using +@findex shell +@findex shell-command +@vindex shell-file-name +@vindex explicit-shell-file-name + +You can start an interactive shell in Emacs by typing @kbd{M-x shell}. +Emacs uses the @env{SHELL} environment variable to determine which +program to use as the shell. To instruct Emacs to use a non-default +shell, you can either set this environment variable, or customize +@code{explicit-shell-file-name}. You can also customize +@code{shell-file-name} to change the shell that will be used by +subprocesses that are started with @code{shell-command} and +related non-interactive shell commands. + +@menu +* Bash:: +@end menu + +@node Bash +@subsection bash +@cindex cygwin bash as shell within Emacs +@cindex shell, using cygwin bash within Emacs +@cindex bash, using cygwin shell within Emacs +@vindex comint-scroll-show-maximum-output +@vindex comint-completion-addsuffix +@vindex comint-eol-on-send +@vindex w32-quote-process-args +@vindex shell-mode-hook + +Cygwin bash is a popular shell for use with Emacs. To use bash as the +default shell in Emacs, you can place the following in your init file: + +@example +(defun my-shell-setup () + "For Cygwin bash under Emacs 20" + (setq comint-scroll-show-maximum-output 'this) + (make-variable-buffer-local 'comint-completion-addsuffix)) + (setq comint-completion-addsuffix t) + ;; (setq comint-process-echoes t) ;; reported that this is no longer needed + (setq comint-eol-on-send t) + (setq w32-quote-process-args ?\") + +(setq shell-mode-hook 'my-shell-setup) +@end example + +If you find that you are having trouble with Emacs tracking drive +changes with bash, see Mike Fabian's +@uref{http://www.gnu.org/software/emacs/windows/ntemacs/discuss/drive-tracking, +note}. + +WARNING: Some versions of bash set and use the environment variable +PID. For some as yet unknown reason, if @env{PID} is set and Emacs +passes it on to bash subshells, bash dies (Emacs can inherit the +@env{PID} variable if it's started from a bash shell). If you clear +the @env{PID} variable in your init file, you should be able to +continue to use bash as your subshell: +@example + (setenv "PID" nil) +@end example + +@node Cygwin paths +@section How do I use Cygwin style paths in Emacs? +@cindex cygwin paths, using within Emacs +@cindex mount points, cygwin +@cindex cygwin mount points, using within Emacs + +The package +@uref{http://www.emacswiki.org/cgi-bin/wiki/cygwin-mount.el, +cygwin-mount.el} teaches Emacs about Cygwin mount points. + +@node Dired ls +@section How do I make dired use my ls program? +@cindex dired, using an external ls program +@cindex dired, interpreting symlinks the same way as cygwin +@cindex symlinks in dired, interpreting the same way as cygwin +@cindex cygwin symlinks in dired +@vindex ls-lisp-use-insert-directory-program +@vindex insert-directory-program + +Dired uses an internal lisp implementation of @command{ls} by default +on Windows. For consistent display of symbolic links and other +information with other programs (eg Cygwin) and performance reasons, +you may want to use a Windows port of @command{ls} instead. + +@example +(setq ls-lisp-use-insert-directory-program t) ;; use external ls +(setq insert-directory-program "c:/cygwin/bin/ls") ;; ls program name +@end example + +@node Shell echo +@section How do I prevent shell commands from being echoed? +@cindex echo, suppressing for shell input +@cindex shell commands, suppressing echo +@vindex comint-process-echoes +@vindex comint-mode-hook +@vindex explicit-cmd.exe-args +@vindex explicit-cmdproxy.exe-args +@vindex explicit-bash.exe-args +@vindex explicit-bash-args +@cindex shell specific arguments + +Some shells echo the commands that you send to them, and the echoed +commands appear in the output buffer. In particular, the default +shells, @command{command.com} and @command{cmd.exe}, have this behavior. + +To prevent echoed commands from being printed, you can place the +following in your init file: + +@example + (defun my-comint-init () + (setq comint-process-echoes t)) + (add-hook 'comint-mode-hook 'my-comint-init) +@end example + +If @code{shell-mode} still is not stripping echoed commands, then +you'll have to explicitly tell the shell to not echo commands. You can +do this by setting the @code{explicit-@var{SHELL}-args} variable +appropriately; where @var{SHELL} is the value of your @env{SHELL} +environment variable (do a @kbd{M-: (getenv "SHELL")} to see what it +is currently set to). Assuming that you are on NT and that your +@env{SHELL} environment variable is set to @command{cmd.exe}, +then placing the following in your init file will tell +@command{cmd.exe} to not echo commands: + +@example + (setq explicit-cmd.exe-args '("/q")) +@end example + +The comint package will use the value of this variable as an argument +to @command{cmd.exe} every time it starts up a new shell; the +@option{/q} is the argument to @command{cmd.exe} that stops the +echoing (invoking @samp{cmd /?} in a shell will show you all of the +command line arguments to @command{cmd.exe}). + +Note that this variable is case sensitive; if the value of your +@env{SHELL} environment variable is @command{CMD.EXE} instead, then +this variable needs to be named @code{explicit-CMD.EXE-args} instead. + +@node Shell completion forward slash +@section How can I make shell completion use forward slashes? +@cindex completion, using forward slashes in shell buffers +@cindex forward slashes for completion in shell buffers +@vindex comint-completion-addsuffix + +The character appended to directory names when completing in a shell +buffer is controlled by the variable @code{comint-completion-addsuffix}. +See its documentation (with @kbd{C-h v}) for details. + +@node Incorrect DOS version +@section Why do I get incorrect DOS version messages? +@cindex nmake, Incorrect DOS version messages +@cindex shell, Incorrect DOS version messages +@cindex COMSPEC, effect on subprocesses of subprocesses + +This might happen if, for example, you invoke @command{nmake} in a +shell and it tries to create sub-shells. The problem happens because +when the shell is initially created, the first argument to the shell +is not the directory in which the shell program resides. When this +happens, @command{command.com} fabricates a value for its +@env{COMSPEC} environment variable that is incorrect. Then, when +other programs go to use @env{COMSPEC} to find the shell, they are +given the wrong value. + +The fix for this is to either prevent any arguments from being sent to +the shell when it starts up (in which case @command{command.com} will +use a default, and correct, value for @env{COMSPEC}), or to have the +first argument be the directory in which the shell executable resides. + +@node Shell commands do nothing +@section Why is nothing happening when I enter shell commands? +@cindex shell commands not working +@cindex anti-virus software, bad interaction with +@cindex virus software, bad interaction with +@cindex firewall, bad interaction with +@cindex scan all files, anti-virus option causing problems +@cindex auto protect, anti-virus option causing problems +@cindex shell, interacting badly with anti-virus + +Some anti-virus software has been reported to cause problems with +shells in the past. Try turning off options such as ``Scan all +files''. @xref{Installing Emacs,,What known problems are there with anti-virus software?}. + +@c ------------------------------------------------------------ +@node Network access +@chapter Network access + +@menu +* Mail:: +* Attachments with Gnus:: +* Using FTP:: +* Tramp ssh:: +* telnet:: +@end menu + +@node Mail +@section How do I use mail in Emacs? + +Emacs comes with several options for reading and writing mail. These +are documented in the manual, and the choice of which method to use +depends on personal taste. There are some issues specific to Windows +however, related to the fact that Windows machines do not have the +mail infrastructure that is commonly installed on other platforms, so +mail will not work without some configuration. + +@menu +* Outgoing mail:: +* Incoming mail with Rmail:: +* Incoming mail with Gnus:: +* Incoming mail other:: +@end menu + +@node Outgoing mail +@subsection Outgoing mail +@cindex mail, outgoing +@cindex smtp server +@vindex user-full-name +@vindex user-mail-address +@vindex smtpmail-default-smtp-server +@vindex smtpmail-smtp-server +@vindex send-mail-command +@vindex message-send-mail-function +@findex smtpmail-send-it +@vindex smtpmail-debug-info + +For outgoing mail, you will need to use @file{smtpmail.el} which +allows Emacs to talk directly to SMTP mail servers. This is included +with Emacs, and can be set up as follows: + +@example +(setq user-full-name "@var{Your full name}") +(setq user-mail-address "@var{Your@@email.address}") +(setq smtpmail-default-smtp-server "@var{domain.name.of.your.smtp.server}") + +(setq send-mail-command 'smtpmail-send-it) ; For mail-mode (Rmail) +(setq message-send-mail-function 'smtpmail-send-it) ; For message-mode (Gnus) +@end example + +Note that if you want to change the name of the SMTP server after +smtpmail is loaded, then you'll need to change +@code{smtpmail-smtp-server}. + +If you are experiencing problems with sending large messages, check +the value of the variable @code{smtpmail-debug-info}. If it is non-nil, you +should set it to @code{nil}: + +@node Incoming mail with Rmail +@subsection Incoming mail with Rmail and POP3 +@cindex mail, incoming with rmail +@cindex pop3, using rmail +@cindex rmail, mail client +@cindex movemail, using pop3 +@cindex MAILHOST +@vindex rmail-primary-inbox-list +@vindex rmail-pop-password-required + +For incoming mail using the Rmail package and a POP3 server, you will +need the following configuration: + +@example +(setenv "MAILHOST" "@var{domain.name.of.your.pop3.server}") +(setq rmail-primary-inbox-list '("po:@var{your logon id}")) +(setq rmail-pop-password-required t) +@end example + +@node Incoming mail with Gnus +@subsection Incoming mail with Gnus +@cindex mail, incoming with Gnus +@cindex pop3, using Gnus +@cindex imap, using Gnus +@cindex gnus, mail and news client + +Although Gnus started life as a Usenet news reader, it also makes a +good mail reader, particularly if you subscribe to a lot of mailing +lists, or you want to use IMAP rather than POP3, which is not +supported by Rmail. @xref{Top,The Gnus manual,,gnus, The Gnus manual}. + +@node Incoming mail other +@subsection Other incoming mail options +@cindex mail, other options +@cindex wanderlust, mail and news client +@cindex vm, mail client +@cindex mh-e, mail client + +Other options for reading mail in Emacs include VM, MH-E and Wanderlust. +MH-E is included with Emacs. The others require lisp or executable code +that does not come with Emacs, so you should seek help where you +obtained the packages from if you want to use them. + +@node Attachments with Gnus +@section How do I open attachments in Gnus? +@cindex gnus, attachments +@cindex attachments, in gnus +@cindex mail, attachments in gnus +@cindex .mailcap +@cindex MIME, configuration for Gnus + +In your @env{HOME} directory create a file called @file{.mailcap}, +with contents like the following: +@example +application/zip "C:/Program Files/7-Zip/7zFM.exe" +video/* "C:/Program Files/VideoLAN/VLC/vlc.exe" +@end example + +@strong{Warning:} Associating MIME types with @command{start} or other +generic Windows commands to open arbitrary files might seem like a +good idea, but it leaves your system as open to attack as Outlook +Express was at its worst. Especially dangerous is associating +application/* or */* in this way. + +@node Using FTP +@section How do I use FTP within Emacs? +@cindex ftp, using within Emacs +@cindex ange-ftp +@cindex tramp, ftp +@cindex remote hosts via ftp +@vindex ange-ftp-ftp-program-name + +Windows built in FTP client can be used with ange-ftp. Ange-ftp is +the Emacs package that provides FTP connectivity to tramp, a +multi-protocol remote file access package for Emacs that is enabled by +default. + +The Windows FTP client does have problems with some firewalls, due to +lack of passive mode support, so you may want to try an alternative +ftp client instead. Make sure that the client you are trying is in +your @env{PATH} before the default Windows client, or rename the +default Windows client to avoid it getting in the way. Alternatively +you can customize @code{ange-ftp-ftp-program-name} to the full path to +the version you are trying. @xref{Other useful ports}. + +@node Tramp ssh +@section How do I use Tramp to work in Emacs via SSH? +@cindex tramp, ssh +@cindex ssh, accessing remote hosts within Emacs +@cindex remote hosts via ssh +@cindex openssh +@cindex PuTTY +@cindex plink +@vindex tramp-default-method +@vindex tramp-default-method-alist + +Tramp can use a number of protocols to connect to remote machines to +read files and even run commands on those files remotely. A popular +one is ssh. As well as Cygwin versions of openssh, you can use +PuTTY's command line plink program as the ssh client. The relevant +methods to use in @code{tramp-default-method} or +@code{tramp-default-method-alist} for these options are: +@itemize @w{} +@item +openssh +@itemize +@item @code{scp} Uses scp for copying, ssh for shell operations. +@item @code{scp1} scp with forced SSH protocol version 1 +@item @code{scp2} scp with forced SSH protocol version 2 +@item @code{ssh} Uses ssh with encoding on stdin/stdout for file transfer. +@item @code{ssh1} ssh with forced SSH protocol version 1 +@item @code{ssh2} ssh with forced SSH protocol version 2 +@end itemize + +@item +PuTTY +@itemize +@item @code{pscp} Uses pscp for copying, plink for shell operations. +@item @code{pscp1} pscp, with forced SSH protocol version 1 +@item @code{pscp2} pscp, with forced SSH protocol version 2 +@item @code{plink} Uses plink with encoding on stdin/stdout for file transfer. +@item @code{plink1} plink with forced SSH protocol version 1 +@item @code{plink2} plink with forced SSH protocol version 2 +@end itemize +@end itemize + +@node telnet +@section How do I use telnet with Emacs? +@cindex telnet, in Emacs +@findex telnet +@cindex telnet client, that works with Emacs + +To use telnet-mode on Windows, you need a telnet client that uses +stdin and stdout for input and output. The default Windows client is +a Windows application, and will not work as a subprocess. Several +options exist, but information that was formerly in this FAQ is out of +date now, so no concrete pointers are available. + +@c ------------------------------------------------------------ +@node Text and Utility modes +@chapter Text and Utility modes + +@menu +* TeX:: +* Spell check:: +* Encryption:: +* Mouse wheel:: +* Grep:: +@end menu + +@node TeX +@section How do I use TeX with Emacs? +@cindex tex +@cindex typesetting + +You will need an implementation of TeX for Windows. +A number of implementations are listed on the +@uref{http://www.tug.org/interest.html#free, TeX Users Group} website. + +@menu +* AUCTeX:: +@end menu + +@node AUCTeX +@subsection AUCTeX +@cindex auctex, precompiled for Windows +@cindex latex +@cindex preview-latex + +AUCTeX is an Emacs package for writing LaTeX files, which also +includes preview-latex, an Emacs mode for previewing the formatted +contents of LaTeX documents. Pre-compiled versions for Windows are +available from +@uref{http://www.gnu.org/software/auctex/download-for-windows.html, the +AUCTeX site}. + +@node Spell check +@section How do I perform spell checks? +@cindex spell checking +@cindex ispell +@cindex aspell +@cindex flyspell +@vindex ispell-program-name +@findex flyspell-mode + +Emacs has support for spell checking on demand (@code{ispell}) and as +your type (@code{flyspell}). Both packages depend on a copy of +@command{ispell} 3.2 or a compatible spell-checking program. +GNU Aspell is a popular choice these days, Windows installers are +available from the @uref{http://aspell.net/win32/, official site}. + +Once installed, you will need to configure @code{ispell-program-name} +to tell ispell and flyspell to use @command{aspell} as a replacement for +ispell. You can include the full path to the @file{aspell} binary, which +means you do not need to add its installation directory to the @env{PATH}. + +@node Encryption +@section Emacs and encryption +@cindex encryption +@cindex gpg, Windows binaries +@cindex pgp encryption, with GNU Privacy Guard +@cindex signatures on Emacs distribution, checking +@cindex Emacs distribution, checking digital signatures + +GNU Privacy Guard is a Free replacement for PGP, with Windows binaries +available. See @uref{http://www.gnupg.org/}. + +@node Mouse wheel +@section Why doesn't my wheel mouse work in Emacs? +@cindex mouse wheel +@cindex wheel mouse +@cindex middle button, on wheel mouse +@cindex scrolling, with mouse wheel + +Some wheel mice ship with default settings that do not send the +standard wheel events to programs, but instead try to simulate scroll +bar events. Usually this is configurable from the hardware specific +pages on the mouse control panel. The middle button is often mapped +in the same settings to have some functionality other than sending +middle mouse button events. In some cases, uninstalling the +manufacturer's drivers and telling Windows to use the generic USB or +PS/2 drivers is the only way to make the mouse work properly. + +@node Grep +@section How do I use grep with Emacs? +@cindex searching through files with grep +@cindex grep +@cindex findstr +@findex grep + +The best way to use @kbd{M-x grep} with Emacs is to download a port of +GNU @command{grep}. @xref{Other useful ports}. + +If you want a quick solution without installing extra tools, a poor +substitute that works for simple text searches is to specify the built +in Windows command @command{findstr} as the command to run at the +@kbd{M-x grep} prompt. Normally you will want to use the @option{/n} +argument to @command{findstr}. + +@menu +* Recursive grep:: +@end menu + +@node Recursive grep +@subsection How do I do a recursive grep? +@cindex recursive searching with grep +@cindex grep, recursive through subdirectories +@cindex findstr, recursive +@cindex find, using with grep +@cindex find, the POSIX command +@findex rgrep +@findex grep-find +@findex find-grep-dired +@vindex find-program +@vindex grep-find-command + +The Emacs commands @code{rgrep}, @code{grep-find} +and @code{find-grep-dired} are all different interfaces for +grepping recursively into subdirectories. By default, they use the +command @command{find} to determine which files to work on, and either +run @command{grep} directly from find, or use @command{xargs} to batch +up files and reduce the number of invocations of @command{grep}. + +Windows also comes with a @command{find} command, but it is not in any +way compatible with the POSIX @command{find} that Emacs tries to use. +Emacs expects a @command{find} compatible with GNU findutils. +@xref{Other useful ports}. After you have installed it, you will need +to make sure that Emacs finds this version, not the standard Windows +@command{find} command. You can do this by either renaming the +Windows command, changing your @env{PATH} to ensure that the directory +containing the findutils @file{bin} directory comes before the Windows +system directory, or set the variable @code{find-program} to the full +path to the findutils @command{find} command. + +An alternative if you have a recent version of grep is to customize +@code{grep-find-command} to use @samp{grep -r} instead of both find +and grep. Another alternative if you don't need the full capabilities +of grep is to use @samp{findstr /n /r}. + +@c ------------------------------------------------------------ +@node Developing with Emacs +@chapter Developing with Emacs + +@menu +* MSVC:: +* Borland C++ Builder:: +* Version control:: +* Perldb:: +@end menu + +@node MSVC +@section How do I use Emacs with Microsoft Visual C++ + +There are two ways you can use Emacs in conjunction with MSVC. You +can use Emacs as the editor, and do everything else in the DevStudio +IDE. Or you can use Emacs as an IDE, calling the MSVC command line +tools to build your project. + +@menu +* DevStudio:: +* MSVC command line:: +@end menu + +@node DevStudio +@subsection Emacs as the text editor for DevStudio +@cindex DevStudio, using Emacs as editor in +@cindex MSVC++, using Emacs as editor with +@cindex Visual Studio, using Emacs as editor in +@cindex VisEmacs, add in for MS Developer Studio + +Christopher Payne wrote a Visual Studio add-in that makes Emacs the +default text editor, this has now been taken over by Jeff Paquette. +See the following two URLS for details: +@itemize +@item @uref{http://sourceforge.net/projects/visemacs/} for the latest version. +@item @uref{http://www.smathers.net/VisEmacs.htm} for notes on usage. +@end itemize + +@node MSVC command line +@subsection Using MSVC command line tools from Emacs +@cindex MSVC++, compiling within Emacs +@findex compile + +This is an app note on how to use Microsoft Visual C++ with Emacs. The +experiments done below were done with Emacs 19.34.1 on Windows 95, +using Visual C++ 4.0 Standard Edition. Your mileage may vary. + +This writeup assumes minimal knowledge of Emacs hacking on the part of +the reader. + +@menu +* VC++ environment:: +* Default compile command:: +* Reverting buffers:: +* Edit MSVC:: +@end menu + +@node VC++ environment +@subsubsection VC++ Environment Variables +@cindex vcvars32.bat +@cindex MSVC++, environment variables + +There is a batch file in your VC++ installation's bin directory called +@file{vcvars32.bat}, which sets up the environment variables needed to +run the VC++ command line tools. Arrange for those same environment +variables to be set in your Emacs session. You can do this on Windows +9x by calling the @file{vcvars32.bat} script from @file{autoexec.bat}. +On other versions of Windows you can set the environment variables +globally using the System control panel. + +For all versions of Windows you can alternatively set the variables +just inside Emacs by using @code{setenv} calls in your init file. +@xref{Installing Emacs,,Where do I put my init file?}. + +You should now be able to compile from Emacs. Load a source file from +a VC++ project. Type @kbd{M-x compile}. Replace the proposed command line +with: +@example +nmake -f @var{ProjectName}.mak +@end example + +You will find that this defaults to a debug build. You can change it +to a release build with: +@example +nmake -f @var{ProjectName}.mak CFG="@var{ProjectName} - Win32 Release" +@end example + +@node Default compile command +@subsubsection Setting the default compile command +@cindex compile, setting default command +@cindex nmake, as default compile command +@vindex compile-command + +Now set the default value for the compile command line. Add the +following to your init file: + +@example +;; Set up for Visual C++ compiling +(setq compile-command "nmake -f ") +@end example + +If you work on the same project long term, you can add the project +makefile to the string. + +David Biesack suggests that perhaps it's +easy to write a @file{Makefile} in the project directory which does + +@example +PROJECT=MyProject +all: debug +debug: FORCE + nmake /f $(PROJECT).mak CFG="$(PROJECT) - Win32 Debug" +release: FORCE + nmake /f $(PROJECT).mak CFG="$(PROJECT) - Win32 Release" +FORCE: +@end example + +and then you can simply change compile-command to @command{nmake}. + +Caleb T. Deupree reports that on VC++ +5.0 and up, "You can also set an option in Options/Build to export a +makefile every time the project is saved, which you can then use to +compile with @samp{nmake -f project.mak}." VC++ 4.0 builds the make file +every time, and there is no option. + +@node Reverting buffers +@subsubsection Reverting Buffers +@cindex DevStudio, keeping source in sync +@cindex Visual Studio, keeping source in sync +@cindex MSVC++, keeping source in sync +@findex auto-revert-mode +@findex global-auto-revert-mode + +It is recommended that you use @code{auto-revert-mode} in buffers +that you have open in both Emacs and MSVC++ at the same time. Then if +you mistakenly edit the file in MSVC++, Emacs will pick up your +changes immediately, rather than after you have written lots more code +and attempt to save. + +@node Edit MSVC +@subsubsection Edit with Emacs function for MSVC +@cindex DevStudio, load in Emacs command +@cindex Visual Studio, load in Emacs command +@cindex MSVC++, load in Emacs command +@cindex emacsclient, calling from Visual Studio + +You can also set up VC++ to import a file into Emacs for you, all +ready for editing. In VC++, go to the @code{Tools} pull-down menu, and +click on @code{Customize...}. In the @code{Tools} tab, click on +@code{Add}. Use @code{Browse} to locate the +@file{emacsclientw.exe} file in your Emacs bin directory, and +select it. For arguments, use @option{+$(CurLine)} +@option{"$(FilePath)"} and for the directory use the @code{$(WkspDir)} +(the quotes around FilePath handle paths with spaces in them). Set the +Menu Text to say "Em&acs". The @option{+$(CurLine)} will set point in +Emacs to the same line as the cursor position in VC++. The ampersand +in the word @code{Em&acs} allows you to select emacs from the keyboard. (E +is already used for the OLE control test container.) + +You should now be able to go to any source file in your project. Then, +use the pull-down menu @code{Tools->Emacs}. The active file in your +VC++ IDE should now be front and center in Emacs, all ready to edit as +you wish. If you use keystrokes to work the menus, try @kbd{Alt-T A} to +move the file into Emacs. Binding this tool to a keystroke will be +left as an exercise for the student. + +If you have the option of saving files before running tools, make sure +this option is set. (I don't see it on VC++ 4.0.) + +@node Borland C++ Builder +@section Emacs and Borland C++ Builder +@cindex Borland C++, integration with Emacs + +Jonathan Arnold has written an +@uref{http://www.buddydog.org/C++Builder/c++builder.html, EmacsEdit +``expert''} for interfacing C++ Builder and Emacs. + +@node Version control +@section Is there a version of my VC software I can use with Emacs? +@cindex version control, integration with Emacs +@cindex revision control, integration with Emacs +@cindex source control, integration with Emacs +@cindex cvs, version control integration with Emacs +@cindex rcs, version control integration with Emacs +@cindex svn, version control integration with Emacs +@cindex git, version control integration with Emacs +@cindex bzr, version control integration with Emacs +@cindex arch, version control integration with Emacs +@cindex mercurial, version control integration with Emacs +@cindex hg, version control integration with Emacs +@cindex monotone, version control integration with Emacs +@cindex mcvs, version control integration with Emacs + +If you are using a graphical revision control tool already, check if +it comes with command-line tools. Many such GUI tools are just +wrappers for the same command line tools that Emacs requires for its +VC integration. Most of the supported VC systems have well supported +Free native Windows binaries. For those that don't Cygwin may be an option. +@xref{Other useful ports}. + +@node Perldb +@section How do I use the Perl debugger with Emacs? +@cindex perl, debugging within Emacs +@cindex perldb, using with Emacs + +From Jay Rogers: + +Some versions of the perl debugger itself need to be patched to work +with emacs. They are perl versions 5.001 and less, and version +5.004_01. To fix, locate and change the code similar to the following +code in lib/perl5db.pl +@example + if (-e "/dev/tty") @{ + $console = "/dev/tty"; + $rcfile=".perldb"; + @} + elsif (-e "con") @{ + $console = ""; <---- change "con" to "" + $rcfile="perldb.ini"; + @} + else @{ + $console = "sys\$command"; + $rcfile="perldb.ini"; + @} +@end example + +Doug Campbell also has some +@uref{http://www.gnu.org/software/emacs/windows/ntemacs/discuss/perldb, +suggestions} for improving the interaction of perldb and Emacs. + +@c ------------------------------------------------------------ +@node Other useful ports +@chapter Other useful ports +@cindex useful tools +@cindex subprocesses, useful tools + +@menu +* Cygwin:: +* MinGW:: +* UWIN:: +* GnuWin32:: +* GTK:: +* Read man pages:: +@end menu + +@node Cygwin +@section Cygwin +@cindex cygwin environment +@cindex cygwin, library conflicts +@cindex library conflicts with cygwin +@cindex interoperability with cygwin +@cindex subprocesses, cygwin tools +@vindex exec-path + +@uref{http://www.cygwin.com/}. + +Cygwin is a popular complete POSIX emulation environment for Windows. +Most of its tools can be used with Emacs, and it covers a wide range +of ported software. The main shell used by Cygwin is GNU +@command{bash}, but other shells are also available. Some Cygwin +tools may not interoperate well with Emacs or other native Windows +tools, due to the total immersion aspect of Cygwin, including its +non-native filesystem mapping. + +If you choose to use Cygwin, then its tools will probably be all that +you need, but you will need to get image libraries from elsewhere, as +the Cygwin ones are not compatible with non-Cygwin software. In fact, +if Cygwin is on your PATH when you run Emacs, and Emacs does not find +other versions of the image libraries first, then the Cygwin ones can +cause problems. Cygwin developers recommend that you do not put +Cygwin on your system @env{PATH} for this reason. Instead you can +make the Cygwin tools available within Emacs by setting @code{exec-path} +in your init file. + +@node MinGW +@section MinGW and MSYS +@cindex mingw tools +@cindex msys environment +@cindex subprocesses, mingw and msys + +@uref{http://www.mingw.org/} + +MinGW is a set of development tools that produce native Windows +executables, not dependent on Cygwin's POSIX emulation DLLs. + +MSYS is a POSIX shell and minimal set of tools that are commonly used in +configure scripts. Like Cygwin, this environment uses a non-native +filesystem mapping to appear more POSIX like to the scripts that it +runs. This is intended to complement the MinGW tools to make it easier +to port software to Windows. + +@node UWIN +@section UWIN +@cindex uwin environment +@cindex subprocesses, uwin + +@uref{http://www.research.att.com/sw/tools/uwin/} + +UWIN is another POSIX emulation environment, like Cygwin and MSYS, +that provides a large number of ported tools. The shell used by UWIN +is @command{ksh}, the Korn shell. + +@node GnuWin32 +@section GnuWin32 +@cindex gnuwin32 tools +@cindex subprocesses, gnuwin32 +@cindex image libraries, gnuwin32 +@cindex image libraries, development + +@uref{http://gnuwin32.sourceforge.net/} + +GnuWin32 provides precompiled native Windows ports of a wide selection +of Free software and libraries. Tools available here that are useful +for Emacs include: + +@itemize +@item Arc - used by @code{archive-mode} to edit .arc files. +@item Bzip2 - used by Emacs to automatically decompress .bz2 files. +@item CompFace - used by @code{gnus} to display XFace headers in messages. +@item CoreUtils - GNU file, shell and text utilities (also in MSYS) +@item DiffUtils - for @code{ediff} and producing patches +@item FindUtils - for @code{grep-find} and other file searches. +@item GifLib - library to support GIF images. +@item Grep - for searching through files with @code{grep}. +@item Gzip - used by Emacs to automatically decompress .gz files. +@item Jpeg - library to support JPEG images (also in GTK). +@item Lha - used by @code{archive-mode} to edit .lzh files. +@item LibPng - library to support PNG images (also in GTK). +@item LibTiff - library to support TIFF images (also in GTK). +@item Make - used by @code{compile} for building projects (also in MinGW) +@item OpenSSL - used by @code{gnus} to talk to servers over SSL. +@item Patch - used by @code{ediff-patch-file} and others to apply patches. +@item Tar - used by @code{tar-mode} to edit tar files. +@item TexInfo - used to build Emacs' manuals. +@item Unzip - used by @code{archive-mode} for extracting zip files. +@item Xpm - library to support XPM images (bundled with Emacs binaries) +@item Zip - used by @code{archive-mode} for editing zip files. +@item Zlib - required by LibPng (also in GTK). +@end itemize + +@node GTK +@section GTK +@cindex GTK image libraries +@cindex image libraries, GTK +@cindex addpm, using GTK image libraries + +GTK is a potential source for some of the image libraries that Emacs +requires. GTK is installed along with other ports of GUI software, +such as the GIMP image editor, and Pidgin instant messenger client. +If GTK is installed when you run @command{addpm}, Emacs will use the +image libraries that it provides, even if they are not on the +@env{PATH}. GTK ships with JPEG, PNG and TIFF support. + +@node Read man pages +@section How do I read man pages? +@cindex man pages +@findex woman +@findex man + +Man pages for Emacs and other ported programs that you have can be +read using Emacs' built-in manual reader @code{woman}. This +requires no external programs, but if you do have a port of +@command{man}, there is also an Emacs wrapper @code{man} that +which may be slightly faster. + +@c ------------------------------------------------------------ +@node Further information +@chapter Further information + +@menu +* More information:: +* Mailing lists:: +@end menu + +@node More information +@section Where can I get more information about Emacs? +@cindex other sources of information +@cindex faqs, general +@cindex faqs, old +@cindex help, manuals and other sources +@cindex manuals +@cindex wiki + +If you have general questions about Emacs, the best places to start +looking are @ref{Top,,, emacs, The GNU Emacs Manual}, and +@ref{Top,,, efaq, the standard Emacs FAQ}. +In Emacs, you can browse the manual using Info by typing @kbd{C-h r}, +and you can view the FAQ by typing @kbd{C-h C-f}. Other resources include: + +@itemize +@item @uref{http://www.gnu.org/software/emacs/, The Emacs homepage} +@item @uref{http://www.gnu.org/software/emacs/manual/, Other Emacs manuals} +@item @uref{http://www.emacswiki.org/, Emacs Wiki} +@end itemize + +@node Mailing lists +@section What mailing lists are there for discussing Emacs on Windows? +@cindex mailing lists +@cindex help, mailing lists + +The official mailing list for Windows specific help and discussion is +@url{http://lists.gnu.org/mailman/listinfo/help-emacs-windows, +help-emacs-windows}. See that link for information on how to subscribe +or unsubscribe. The +@uref{http://lists.gnu.org/archive/html/help-emacs-windows/, list archives} +are available online. + +@c ------------------------------------------------------------ +@node Indexes +@unnumbered Indexes + +@unnumberedsec Function and Variable Index + +@printindex fn + +@unnumberedsec Concept Index + +@printindex cp + +@bye ------------------------------------------------------------ revno: 114019 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-08-26 23:58:08 -0700 message: * Makefile.in (mostlyclean, clean, distclean, bootstrap-clean) (maintainer-clean, check-declare): Remove pointless subshells. Check cd return value. diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-26 22:17:31 +0000 +++ ChangeLog 2013-08-27 06:58:08 +0000 @@ -1,3 +1,9 @@ +2013-08-27 Glenn Morris + + * Makefile.in (mostlyclean, clean, distclean, bootstrap-clean) + (maintainer-clean, check-declare): Remove pointless subshells. + Check cd return value. + 2013-08-26 Paul Eggert Minor merge from gnulib (mostly just for texinfo.tex). === modified file 'Makefile.in' --- Makefile.in 2013-08-20 08:30:24 +0000 +++ Makefile.in 2013-08-27 06:58:08 +0000 @@ -797,17 +797,17 @@ ### target for GCC does not delete `libgcc.a', because recompiling it ### is rarely necessary and takes a lot of time. mostlyclean: FRC - (cd src; $(MAKE) $(MFLAGS) mostlyclean) - (cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean) - (cd lwlib; $(MAKE) $(MFLAGS) mostlyclean) - (cd lib; $(MAKE) $(MFLAGS) mostlyclean) - (cd lib-src; $(MAKE) $(MFLAGS) mostlyclean) - (cd nt; $(MAKE) $(MFLAGS) mostlyclean) - -(cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean) - -(cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean) - -(cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean) - -(cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean) - (cd leim; $(MAKE) $(MFLAGS) mostlyclean) + cd src && $(MAKE) $(MFLAGS) mostlyclean + cd oldXMenu && $(MAKE) $(MFLAGS) mostlyclean + cd lwlib && $(MAKE) $(MFLAGS) mostlyclean + cd lib && $(MAKE) $(MFLAGS) mostlyclean + cd lib-src && $(MAKE) $(MFLAGS) mostlyclean + cd nt && $(MAKE) $(MFLAGS) mostlyclean + -cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean + -cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean + -cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean + -cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean + cd leim && $(MAKE) $(MFLAGS) mostlyclean ### `clean' ### Delete all files from the current directory that are normally @@ -819,18 +819,18 @@ ### Delete `.dvi' files here if they are not part of the distribution. clean: FRC -rm -f etc/emacs.tmpdesktop - (cd src; $(MAKE) $(MFLAGS) clean) - (cd oldXMenu; $(MAKE) $(MFLAGS) clean) - (cd lwlib; $(MAKE) $(MFLAGS) clean) - (cd lib; $(MAKE) $(MFLAGS) clean) - (cd lib-src; $(MAKE) $(MFLAGS) clean) - (cd nt; $(MAKE) $(MFLAGS) clean) - -(cd doc/emacs && $(MAKE) $(MFLAGS) clean) - -(cd doc/misc && $(MAKE) $(MFLAGS) clean) - -(cd doc/lispref && $(MAKE) $(MFLAGS) clean) - -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean) - (cd leim; $(MAKE) $(MFLAGS) clean) - (cd nextstep && $(MAKE) $(MFLAGS) clean) + cd src && $(MAKE) $(MFLAGS) clean + cd oldXMenu && $(MAKE) $(MFLAGS) clean + cd lwlib && $(MAKE) $(MFLAGS) clean + cd lib && $(MAKE) $(MFLAGS) clean + cd lib-src && $(MAKE) $(MFLAGS) clean + cd nt && $(MAKE) $(MFLAGS) clean + -cd doc/emacs && $(MAKE) $(MFLAGS) clean + -cd doc/misc && $(MAKE) $(MFLAGS) clean + -cd doc/lispref && $(MAKE) $(MFLAGS) clean + -cd doc/lispintro && $(MAKE) $(MFLAGS) clean + cd leim && $(MAKE) $(MFLAGS) clean + cd nextstep && $(MAKE) $(MFLAGS) clean ### `bootclean' ### Delete all files that need to be remade for a clean bootstrap. @@ -846,19 +846,19 @@ ${top_bootclean}; \ rm -f config.status config.log~ Makefile stamp-h1 ${SUBDIR_MAKEFILES} distclean: FRC - (cd src; $(MAKE) $(MFLAGS) distclean) - (cd oldXMenu; $(MAKE) $(MFLAGS) distclean) - (cd lwlib; $(MAKE) $(MFLAGS) distclean) - (cd lib; $(MAKE) $(MFLAGS) distclean) - (cd lib-src; $(MAKE) $(MFLAGS) distclean) - (cd nt; $(MAKE) $(MFLAGS) distclean) - (cd doc/emacs && $(MAKE) $(MFLAGS) distclean) - (cd doc/misc && $(MAKE) $(MFLAGS) distclean) - (cd doc/lispref && $(MAKE) $(MFLAGS) distclean) - (cd doc/lispintro && $(MAKE) $(MFLAGS) distclean) - (cd leim; $(MAKE) $(MFLAGS) distclean) - (cd lisp; $(MAKE) $(MFLAGS) distclean) - (cd nextstep && $(MAKE) $(MFLAGS) distclean) + cd src && $(MAKE) $(MFLAGS) distclean + cd oldXMenu && $(MAKE) $(MFLAGS) distclean + cd lwlib && $(MAKE) $(MFLAGS) distclean + cd lib && $(MAKE) $(MFLAGS) distclean + cd lib-src && $(MAKE) $(MFLAGS) distclean + cd nt && $(MAKE) $(MFLAGS) distclean + cd doc/emacs && $(MAKE) $(MFLAGS) distclean + cd doc/misc && $(MAKE) $(MFLAGS) distclean + cd doc/lispref && $(MAKE) $(MFLAGS) distclean + cd doc/lispintro && $(MAKE) $(MFLAGS) distclean + cd leim && $(MAKE) $(MFLAGS) distclean + cd lisp && $(MAKE) $(MFLAGS) distclean + cd nextstep && $(MAKE) $(MFLAGS) distclean [ ! -d test/automated ] || { \ cd test/automated && $(MAKE) $(MFLAGS) distclean; \ } @@ -868,19 +868,19 @@ ### Delete everything that can be reconstructed by `make' and that ### needs to be deleted in order to force a bootstrap from a clean state. bootstrap-clean: FRC - (cd src; $(MAKE) $(MFLAGS) bootstrap-clean) - (cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lib; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean) - (cd nt; $(MAKE) $(MFLAGS) maintainer-clean) - -(cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean) - -(cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean) - -(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean) - -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean) - (cd leim; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) - (cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean) + cd src && $(MAKE) $(MFLAGS) bootstrap-clean + cd oldXMenu && $(MAKE) $(MFLAGS) maintainer-clean + cd lwlib && $(MAKE) $(MFLAGS) maintainer-clean + cd lib && $(MAKE) $(MFLAGS) maintainer-clean + cd lib-src && $(MAKE) $(MFLAGS) maintainer-clean + cd nt && $(MAKE) $(MFLAGS) maintainer-clean + -cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean + -cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean + -cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean + -cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean + cd leim && $(MAKE) $(MFLAGS) maintainer-clean + cd lisp && $(MAKE) $(MFLAGS) bootstrap-clean + cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean [ ! -d test/automated ] || { \ cd test/automated && $(MAKE) $(MFLAGS) bootstrap-clean; \ } @@ -902,8 +902,8 @@ ${top_distclean}; \ rm -fr autom4te.cache maintainer-clean: bootstrap-clean FRC - (cd src; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lisp; $(MAKE) $(MFLAGS) maintainer-clean) + cd src && $(MAKE) $(MFLAGS) maintainer-clean + cd lisp && $(MAKE) $(MFLAGS) maintainer-clean [ ! -d test/automated ] || { \ cd test/automated && $(MAKE) $(MFLAGS) maintainer-clean; \ } @@ -1067,5 +1067,5 @@ echo "You must build Emacs to use this command"; \ exit 1; \ fi - (cd leim; $(MAKE) $(MFLAGS) $@) - (cd lisp; $(MAKE) $(MFLAGS) $@) + cd leim && $(MAKE) $(MFLAGS) $@ + cd lisp && $(MAKE) $(MFLAGS) $@ ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.