commit 303797134fa05d2e0d156a5bd912f8baab418489 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sat Apr 11 20:45:08 2015 -0700 Use bool for boolean in window.c * src/window.c: Omit unnecessary static function decls. (adjust_window_count, select_window, Fselect_window) (window_body_width, Fwindow_body_height, Fwindow_body_width) (set_window_hscroll, check_window_containing, Fwindow_at) (Fwindow_end, Fset_window_start, Fpos_visible_in_window_p) (unshow_buffer, replace_window, recombine_windows) (add_window_to_list, candidate_window_p, next_window) (Fnext_window, Fprevious_window, window_loop, check_all_windows) (Fget_buffer_window, Fdelete_other_windows_internal) (replace_buffer_in_windows_safely, set_window_buffer) (Fset_window_buffer, Fforce_window_update) (temp_output_buffer_show, make_parent_window) (window_resize_check, window_resize_apply, Fwindow_resize_apply) (resize_frame_windows, Fsplit_window_internal) (Fdelete_window_internal, grow_mini_window, shrink_mini_window) (Fresize_mini_window_internal, mark_window_cursors_off) (window_scroll, window_scroll_pixel_based) (window_scroll_line_based, scroll_command, Fscroll_other_window) (Fscroll_left, Fscroll_right, displayed_window_lines, Frecenter) (Fmove_to_window_line, Fset_window_configuration) (delete_all_child_windows, apply_window_adjustment) (set_window_fringes, set_window_scroll_bars) (Fset_window_vscroll, foreach_window, foreach_window_1) (compare_window_configurations, Fcompare_window_configurations): Prefer 'bool', 'true', and 'false' for booleans. * src/window.h (WINDOW_MODE_LINE_LINES) (WINDOW_HEADER_LINE_LINES): Omit unnecessary "!!" on bool value. diff --git a/src/window.c b/src/window.c index 55fcb8c..eb68672 100644 --- a/src/window.c +++ b/src/window.c @@ -45,28 +45,18 @@ along with GNU Emacs. If not, see . */ #include "msdos.h" #endif -static int displayed_window_lines (struct window *); static int count_windows (struct window *); static int get_leaf_windows (struct window *, struct window **, int); -static void window_scroll (Lisp_Object, EMACS_INT, bool, int); -static void window_scroll_pixel_based (Lisp_Object, int, bool, int); -static void window_scroll_line_based (Lisp_Object, int, bool, int); -static int add_window_to_list (struct window *, void *); -static Lisp_Object next_window (Lisp_Object, Lisp_Object, - Lisp_Object, int); -static void decode_next_window_args (Lisp_Object *, Lisp_Object *, - Lisp_Object *); +static void window_scroll_pixel_based (Lisp_Object, int, bool, bool); +static void window_scroll_line_based (Lisp_Object, int, bool, bool); static void foreach_window (struct frame *, - int (* fn) (struct window *, void *), + bool (* fn) (struct window *, void *), void *); -static int foreach_window_1 (struct window *, - int (* fn) (struct window *, void *), - void *); -static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object); -static int window_resize_check (struct window *, bool); +static bool foreach_window_1 (struct window *, + bool (* fn) (struct window *, void *), + void *); +static bool window_resize_check (struct window *, bool); static void window_resize_apply (struct window *, bool); -static void window_resize_apply_total (struct window *, bool); -static Lisp_Object select_window (Lisp_Object, Lisp_Object, int); static void select_window_1 (Lisp_Object, bool); static struct window *set_window_fringes (struct window *, Lisp_Object, @@ -74,7 +64,8 @@ static struct window *set_window_fringes (struct window *, Lisp_Object, static struct window *set_window_margins (struct window *, Lisp_Object, Lisp_Object); static struct window *set_window_scroll_bars (struct window *, Lisp_Object, - Lisp_Object, Lisp_Object, Lisp_Object); + Lisp_Object, Lisp_Object, + Lisp_Object); static void apply_window_adjustment (struct window *); /* This is the window in which the terminal's cursor should @@ -216,7 +207,7 @@ wset_combination (struct window *w, bool horflag, Lisp_Object val) w->horizontal = horflag; } -/* Nonzero if leaf window W doesn't reflect the actual state +/* True if leaf window W doesn't reflect the actual state of displayed buffer due to its text or overlays change. */ bool @@ -279,7 +270,7 @@ adjust_window_count (struct window *w, int arg) b->window_count += arg; eassert (b->window_count >= 0); /* These should be recalculated by redisplay code. */ - w->window_end_valid = 0; + w->window_end_valid = false; w->base_line_pos = 0; } } @@ -462,15 +453,16 @@ selected windows appears and to which many commands apply. */) int window_select_count; -/* If select_window is called with inhibit_point_swap non-zero it will +/* If select_window is called with inhibit_point_swap true it will not store point of the old selected window's buffer back into that window's pointm slot. This is needed by Fset_window_configuration to avoid that the display routine is called with selected_window set to Qnil causing a subsequent crash. */ static Lisp_Object -select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap) +select_window (Lisp_Object window, Lisp_Object norecord, + bool inhibit_point_swap) { - register struct window *w; + struct window *w; struct frame *sf; CHECK_LIVE_WINDOW (window); @@ -577,9 +569,9 @@ time a window gets selected put it on `buffer-list-update-hook'. Also note that the main editor command loop sets the current buffer to the buffer of the selected window before each command. */) - (register Lisp_Object window, Lisp_Object norecord) + (Lisp_Object window, Lisp_Object norecord) { - return select_window (window, norecord, 0); + return select_window (window, norecord, false); } DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, @@ -930,11 +922,10 @@ window_body_width (struct window *w, bool pixelwise) - WINDOW_RIGHT_DIVIDER_WIDTH (w) - (WINDOW_HAS_VERTICAL_SCROLL_BAR (w) ? WINDOW_SCROLL_BAR_AREA_WIDTH (w) - : ((!FRAME_WINDOW_P (f) - && !WINDOW_RIGHTMOST_P (w) - && !WINDOW_RIGHT_DIVIDER_WIDTH (w)) - /* A vertical bar is either 1 or 0. */ - ? 1 : 0)) + : (/* A vertical bar is either 1 or 0. */ + !FRAME_WINDOW_P (f) + && !WINDOW_RIGHTMOST_P (w) + && !WINDOW_RIGHT_DIVIDER_WIDTH (w))) - WINDOW_MARGINS_WIDTH (w) - (FRAME_WINDOW_P (f) ? WINDOW_FRINGES_WIDTH (w) @@ -961,7 +952,7 @@ visible, that line is not counted. */) (Lisp_Object window, Lisp_Object pixelwise) { return make_number (window_body_height (decode_live_window (window), - NILP (pixelwise) ? 0 : 1)); + !NILP (pixelwise))); } DEFUN ("window-body-width", Fwindow_body_width, Swindow_body_width, 0, 2, 0, @@ -981,7 +972,7 @@ continuation glyph. */) (Lisp_Object window, Lisp_Object pixelwise) { return make_number (window_body_width (decode_live_window (window), - NILP (pixelwise) ? 0 : 1)); + !NILP (pixelwise))); } DEFUN ("window-mode-line-height", Fwindow_mode_line_height, @@ -1062,10 +1053,10 @@ set_window_hscroll (struct window *w, EMACS_INT hscroll) /* Prevent redisplay shortcuts when changing the hscroll. */ if (w->hscroll != new_hscroll) - XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1; + XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true; w->hscroll = new_hscroll; - w->suspend_auto_hscroll = 1; + w->suspend_auto_hscroll = true; return make_number (new_hscroll); } @@ -1583,7 +1574,7 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ Check if window W contains coordinates *CW->x and *CW->y. If it does, return W in *CW->window, as Lisp_Object, and return in *CW->part the part of the window under coordinates *X,*Y. Return - zero from this function to stop iterating over windows. */ + false from this function to stop iterating over windows. */ struct check_window_data { @@ -1592,22 +1583,19 @@ struct check_window_data enum window_part *part; }; -static int +static bool check_window_containing (struct window *w, void *user_data) { struct check_window_data *cw = user_data; - enum window_part found; - int continue_p = 1; - - found = coordinates_in_window (w, cw->x, cw->y); - if (found != ON_NOTHING) + enum window_part found = coordinates_in_window (w, cw->x, cw->y); + if (found == ON_NOTHING) + return true; + else { *cw->part = found; XSETWINDOW (*cw->window, w); - continue_p = 0; + return false; } - - return continue_p; } @@ -1618,7 +1606,7 @@ check_window_containing (struct window *w, void *user_data) set *PART to the id of that element. If there is no window under X, Y return nil and leave *PART - unmodified. TOOL_BAR_P non-zero means detect tool-bar windows. + unmodified. TOOL_BAR_P means detect tool-bar windows. This function was previously implemented with a loop cycling over windows with Fnext_window, and starting with the frame's selected @@ -1680,7 +1668,7 @@ column 0. */) + FRAME_INTERNAL_BORDER_WIDTH (f)), (FRAME_PIXEL_Y_FROM_CANON_Y (f, y) + FRAME_INTERNAL_BORDER_WIDTH (f)), - 0, 0); + 0, false); } DEFUN ("window-point", Fwindow_point, Swindow_point, 0, 1, 0, @@ -1787,7 +1775,7 @@ if it isn't already recorded. */) if (it.current_y < it.last_visible_y) move_it_past_eol (&it); value = make_number (IT_CHARPOS (it)); - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); if (old_buffer) set_buffer_internal (old_buffer); @@ -1845,12 +1833,12 @@ overriding motion of point in order to display at this exact start. */) set_marker_restricted (w->start, pos, w->contents); /* This is not right, but much easier than doing what is right. */ - w->start_at_line_beg = 0; + w->start_at_line_beg = false; if (NILP (noforce)) - w->force_start = 1; - w->update_mode_line = 1; + w->force_start = true; + w->update_mode_line = true; /* Bug#15957. */ - w->window_end_valid = 0; + w->window_end_valid = false; wset_redisplay (w); return pos; @@ -1878,12 +1866,13 @@ POS, ROWH is the visible height of that row, and VPOS is the row number \(zero-based). */) (Lisp_Object pos, Lisp_Object window, Lisp_Object partially) { - register struct window *w; - register EMACS_INT posint; - register struct buffer *buf; + struct window *w; + EMACS_INT posint; + struct buffer *buf; struct text_pos top; Lisp_Object in_window = Qnil; - int rtop, rbot, rowh, vpos, fully_p = 1; + int rtop, rbot, rowh, vpos; + bool fully_p = true; int x, y; w = decode_live_window (window); @@ -1908,9 +1897,12 @@ POS, ROWH is the visible height of that row, and VPOS is the row number || (posint >= CHARPOS (top) && posint <= BUF_ZV (buf))) && CHARPOS (top) >= BUF_BEGV (buf) && CHARPOS (top) <= BUF_ZV (buf) - && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, &rowh, &vpos) - && (fully_p = !rtop && !rbot, (!NILP (partially) || fully_p))) - in_window = Qt; + && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, &rowh, &vpos)) + { + fully_p = !rtop && !rbot; + if (!NILP (partially) || fully_p) + in_window = Qt; + } if (!NILP (in_window) && !NILP (partially)) { @@ -2215,7 +2207,7 @@ unshow_buffer (register struct window *w) eassert (b == XMARKER (w->pointm)->buffer); -#if 0 +#if false if (w == XWINDOW (selected_window) || ! EQ (buf, XWINDOW (selected_window)->contents)) /* Do this except when the selected window's buffer @@ -2254,14 +2246,14 @@ unshow_buffer (register struct window *w) bset_last_selected_window (b, Qnil); } -/* Put NEW into the window structure in place of OLD. SETFLAG zero +/* Put NEW into the window structure in place of OLD. SETFLAG false means change window structure only. Otherwise store geometry and other settings as well. */ static void -replace_window (Lisp_Object old, Lisp_Object new, int setflag) +replace_window (Lisp_Object old, Lisp_Object new, bool setflag) { - register Lisp_Object tem; - register struct window *o = XWINDOW (old), *n = XWINDOW (new); + Lisp_Object tem; + struct window *o = XWINDOW (old), *n = XWINDOW (new); /* If OLD is its frame's root window, then NEW is the new root window for that frame. */ @@ -2291,11 +2283,11 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag) n->phys_cursor_type = NO_CURSOR; n->phys_cursor_width = -1; #endif - n->must_be_updated_p = 0; - n->pseudo_window_p = 0; + n->must_be_updated_p = false; + n->pseudo_window_p = false; n->window_end_vpos = 0; n->window_end_pos = 0; - n->window_end_valid = 0; + n->window_end_valid = false; } tem = o->next; @@ -2380,7 +2372,7 @@ recombine_windows (Lisp_Object window) } /* WINDOW can be deleted now. */ - wset_combination (w, 0, Qnil); + wset_combination (w, false, Qnil); } } } @@ -2401,14 +2393,14 @@ delete_deletable_window (Lisp_Object window) pointer. This is a callback function for foreach_window, used in the window_list function. */ -static int +static bool add_window_to_list (struct window *w, void *user_data) { Lisp_Object *list = user_data; Lisp_Object window; XSETWINDOW (window, w); *list = Fcons (window, *list); - return 1; + return true; } @@ -2441,7 +2433,7 @@ window_list (void) } -/* Value is non-zero if WINDOW satisfies the constraints given by +/* Value is true if WINDOW satisfies the constraints given by OWINDOW, MINIBUF and ALL_FRAMES. MINIBUF t means WINDOW may be minibuffer windows. @@ -2463,20 +2455,20 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow, { struct window *w = XWINDOW (window); struct frame *f = XFRAME (w->frame); - bool candidate_p = 1; + bool candidate_p = true; if (!BUFFERP (w->contents)) - candidate_p = 0; + candidate_p = false; else if (MINI_WINDOW_P (w) && (EQ (minibuf, Qlambda) || (WINDOWP (minibuf) && !EQ (minibuf, window)))) { /* If MINIBUF is `lambda' don't consider any mini-windows. If it is a window, consider only that one. */ - candidate_p = 0; + candidate_p = false; } else if (EQ (all_frames, Qt)) - candidate_p = 1; + candidate_p = true; else if (NILP (all_frames)) { eassert (WINDOWP (owindow)); @@ -2556,12 +2548,13 @@ decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object /* Return the next or previous window of WINDOW in cyclic ordering - of windows. NEXT_P non-zero means return the next window. See the + of windows. NEXT_P means return the next window. See the documentation string of next-window for the meaning of MINIBUF and ALL_FRAMES. */ static Lisp_Object -next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, int next_p) +next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, + bool next_p) { decode_next_window_args (&window, &minibuf, &all_frames); @@ -2659,7 +2652,7 @@ windows, eventually ending up back at the window you started with. `previous-window' traverses the same cycle, in the reverse order. */) (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames) { - return next_window (window, minibuf, all_frames, 1); + return next_window (window, minibuf, all_frames, true); } @@ -2699,7 +2692,7 @@ started with. `next-window' traverses the same cycle, in the reverse order. */) (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames) { - return next_window (window, minibuf, all_frames, 0); + return next_window (window, minibuf, all_frames, false); } @@ -2797,7 +2790,7 @@ be listed first but no error is signaled. */) Qnil, look at just the selected frame; Qvisible, look at visible frames; a frame, just look at windows on that frame. - If MINI is non-zero, perform the operation on minibuffer windows too. */ + If MINI, perform the operation on minibuffer windows too. */ enum window_loop { @@ -2809,10 +2802,11 @@ enum window_loop }; static Lisp_Object -window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frames) +window_loop (enum window_loop type, Lisp_Object obj, bool mini, + Lisp_Object frames) { Lisp_Object window, windows, best_window, frame_arg; - int frame_best_window_flag = 0; + bool frame_best_window_flag = false; struct frame *f; struct gcpro gcpro1; @@ -2872,7 +2866,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame if (EQ (w->contents, obj) /* Don't find any minibuffer window except the one that is currently in use. */ - && (MINI_WINDOW_P (w) ? EQ (window, minibuf_window) : 1)) + && (!MINI_WINDOW_P (w) || EQ (window, minibuf_window))) { if (EQ (window, selected_window)) /* Preferably return the selected window. */ @@ -2883,7 +2877,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame choose another one if we have one already). */ { best_window = window; - frame_best_window_flag = 1; + frame_best_window_flag = true; } else if (NILP (best_window)) best_window = window; @@ -2900,7 +2894,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame /* Make WINDOW show the buffer returned by other_buffer_safely, don't run any hooks. */ set_window_buffer - (window, other_buffer_safely (w->contents), 0, 0); + (window, other_buffer_safely (w->contents), false, false); /* If WINDOW is the selected window, make its buffer current. But do so only if the window shows the current buffer (Bug#6454). */ @@ -2913,9 +2907,9 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame case REDISPLAY_BUFFER_WINDOWS: if (EQ (w->contents, obj)) { - mark_window_display_accurate (window, 0); - w->update_mode_line = 1; - XBUFFER (obj)->prevent_redisplay_optimizations_p = 1; + mark_window_display_accurate (window, false); + w->update_mode_line = true; + XBUFFER (obj)->prevent_redisplay_optimizations_p = true; update_mode_lines = 27; best_window = window; } @@ -2952,7 +2946,7 @@ extern void check_all_windows (void) EXTERNALLY_VISIBLE; void check_all_windows (void) { - window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt); + window_loop (CHECK_ALL_WINDOWS, Qnil, true, Qt); } DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 0, 2, 0, @@ -2983,7 +2977,7 @@ selected frame and no others. */) buffer = Fget_buffer (buffer_or_name); if (BUFFERP (buffer)) - return window_loop (GET_BUFFER_WINDOW, buffer, 1, all_frames); + return window_loop (GET_BUFFER_WINDOW, buffer, true, all_frames); else return Qnil; } @@ -3040,7 +3034,7 @@ window-start value is reasonable when this function is called. */) struct frame *f; Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; ptrdiff_t startpos IF_LINT (= 0), startbyte IF_LINT (= 0); - int top IF_LINT (= 0), new_top, resize_failed; + int top IF_LINT (= 0), new_top; w = decode_valid_window (window); XSETWINDOW (window, w); @@ -3097,7 +3091,7 @@ window-start value is reasonable when this function is called. */) parents and comparing each one with WINDOW. If it isn't we need a new selected window for this frame. */ swindow = FRAME_SELECTED_WINDOW (f); - while (1) + while (true) { pwindow = swindow; while (!NILP (pwindow) && !EQ (window, pwindow)) @@ -3129,7 +3123,7 @@ window-start value is reasonable when this function is called. */) /* We are going to free the glyph matrices of WINDOW, and with that we might lose any information about glyph rows that have some of their glyphs highlighted in mouse face. (These rows - are marked with a non-zero mouse_face_p flag.) If WINDOW + are marked with a mouse_face_p flag.) If WINDOW indeed has some glyphs highlighted in mouse face, signal to frame's up-to-date hook that mouse highlight was overwritten, so that it will arrange for redisplaying the highlight. */ @@ -3140,8 +3134,8 @@ window-start value is reasonable when this function is called. */) fset_redisplay (f); Vwindow_list = Qnil; - FRAME_WINDOW_SIZES_CHANGED (f) = 1; - resize_failed = 0; + FRAME_WINDOW_SIZES_CHANGED (f) = true; + bool resize_failed = false; if (!WINDOW_LEAF_P (w)) { @@ -3150,21 +3144,21 @@ window-start value is reasonable when this function is called. */) w->pixel_top = r->pixel_top; w->top_line = r->top_line; resize_root_window (window, delta, Qnil, Qnil, Qt); - if (window_resize_check (w, 0)) + if (window_resize_check (w, false)) { - window_resize_apply (w, 0); + window_resize_apply (w, false); window_pixel_to_total (w->frame, Qnil); } else { resize_root_window (window, delta, Qnil, Qt, Qt); - if (window_resize_check (w, 0)) + if (window_resize_check (w, false)) { - window_resize_apply (w, 0); + window_resize_apply (w, false); window_pixel_to_total (w->frame, Qnil); } else - resize_failed = 1; + resize_failed = true; } /* Resize child windows horizontally. */ @@ -3174,21 +3168,21 @@ window-start value is reasonable when this function is called. */) w->pixel_left = r->pixel_left; XSETINT (delta, r->pixel_width - w->pixel_width); resize_root_window (window, delta, Qt, Qnil, Qt); - if (window_resize_check (w, 1)) + if (window_resize_check (w, true)) { - window_resize_apply (w, 1); + window_resize_apply (w, true); window_pixel_to_total (w->frame, Qt); } else { resize_root_window (window, delta, Qt, Qt, Qt); - if (window_resize_check (w, 1)) + if (window_resize_check (w, true)) { - window_resize_apply (w, 1); + window_resize_apply (w, true); window_pixel_to_total (w->frame, Qt); } else - resize_failed = 1; + resize_failed = true; } } @@ -3224,10 +3218,10 @@ window-start value is reasonable when this function is called. */) if (WINDOWP (r->contents)) { delete_all_child_windows (r->contents); - wset_combination (r, 0, Qnil); + wset_combination (r, false, Qnil); } - replace_window (root, window, 1); + replace_window (root, window, true); /* This must become SWINDOW anyway ....... */ if (BUFFERP (w->contents) && !resize_failed) @@ -3251,12 +3245,12 @@ window-start value is reasonable when this function is called. */) pos = *vmotion (startpos, startbyte, -top, w); set_marker_both (w->start, w->contents, pos.bufpos, pos.bytepos); - w->window_end_valid = 0; + w->window_end_valid = false; w->start_at_line_beg = (pos.bytepos == BEGV_BYTE || FETCH_BYTE (pos.bytepos - 1) == '\n'); /* We need to do this, so that the window-scroll-functions get called. */ - w->optional_new_start = 1; + w->optional_new_start = true; set_buffer_internal (obuf); } @@ -3291,7 +3285,7 @@ replace_buffer_in_windows_safely (Lisp_Object buffer) considers frames on the current keyboard. So loop manually over frames, and handle each one. */ FOR_EACH_FRAME (tail, frame) - window_loop (REPLACE_BUFFER_IN_WINDOWS_SAFELY, buffer, 1, frame); + window_loop (REPLACE_BUFFER_IN_WINDOWS_SAFELY, buffer, true, frame); } } @@ -3391,9 +3385,9 @@ If WINDOW is omitted or nil, it defaults to the selected window. */) return Qnil; } -/* Make WINDOW display BUFFER. RUN_HOOKS_P non-zero means it's allowed +/* Make WINDOW display BUFFER. RUN_HOOKS_P means it's allowed to run hooks. See make_frame for a case where it's not allowed. - KEEP_MARGINS_P non-zero means that the current margins, fringes, and + KEEP_MARGINS_P means that the current margins, fringes, and scroll-bar settings of the window are not reset from the buffer's local settings. */ @@ -3435,15 +3429,15 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, doc-view-mode since it resets the image's position whenever we resize the frame. */ w->hscroll = w->min_hscroll = w->hscroll_whole = 0; - w->suspend_auto_hscroll = 0; + w->suspend_auto_hscroll = false; w->vscroll = 0; set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b)); set_marker_both (w->old_pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b)); set_marker_restricted (w->start, make_number (b->last_window_start), buffer); - w->start_at_line_beg = 0; - w->force_start = 0; + w->start_at_line_beg = false; + w->force_start = false; } /* Maybe we could move this into the `if' but it's not obviously safe and I doubt it's worth the trouble. */ @@ -3534,7 +3528,7 @@ This function runs `window-scroll-functions' before running unshow_buffer (w); } - set_window_buffer (window, buffer, 1, !NILP (keep_margins)); + set_window_buffer (window, buffer, true, !NILP (keep_margins)); return Qnil; } @@ -3563,10 +3557,10 @@ displaying that buffer. */) if (WINDOWP (object)) { struct window *w = XWINDOW (object); - mark_window_display_accurate (object, 0); - w->update_mode_line = 1; + mark_window_display_accurate (object, false); + w->update_mode_line = true; if (BUFFERP (w->contents)) - XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1; + XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true; update_mode_lines = 29; return Qt; } @@ -3578,7 +3572,7 @@ displaying that buffer. */) { /* If buffer is live and shown in at least one window, find all windows showing this buffer and force update of them. */ - object = window_loop (REDISPLAY_BUFFER_WINDOWS, object, 0, Qvisible); + object = window_loop (REDISPLAY_BUFFER_WINDOWS, object, false, Qvisible); return NILP (object) ? Qnil : Qt; } @@ -3614,7 +3608,7 @@ temp_output_buffer_show (register Lisp_Object buf) Vminibuf_scroll_window = window; w = XWINDOW (window); w->hscroll = w->min_hscroll = w->hscroll_whole = 0; - w->suspend_auto_hscroll = 0; + w->suspend_auto_hscroll = false; set_marker_restricted_both (w->start, buf, BEG, BEG); set_marker_restricted_both (w->pointm, buf, BEG, BEG); set_marker_restricted_both (w->old_pointm, buf, BEG, BEG); @@ -3651,7 +3645,7 @@ allocate_window (void) } /* Make new window, have it replace WINDOW in window-tree, and make - WINDOW its only vertical child (HORFLAG 1 means make WINDOW its only + WINDOW its only vertical child (HORFLAG means make WINDOW its only horizontal child). */ static void make_parent_window (Lisp_Object window, bool horflag) @@ -3670,7 +3664,7 @@ make_parent_window (Lisp_Object window, bool horflag) p->sequence_number = ++sequence_number; - replace_window (window, parent, 1); + replace_window (window, parent, true); wset_next (o, Qnil); wset_prev (o, Qnil); @@ -3799,14 +3793,14 @@ Note: This function does not operate on any child windows of WINDOW. */) return size; } -/* Return 1 if setting w->pixel_height (w->pixel_width if HORFLAG is - non-zero) to w->new_pixel would result in correct heights (widths) +/* Return true if setting w->pixel_height (w->pixel_width if HORFLAG) + to w->new_pixel would result in correct heights (widths) for window W and recursively all child windows of W. Note: This function does not check any of `window-fixed-size-p', `window-min-height' or `window-min-width'. It does check that window sizes do not drop below one line (two columns). */ -static int +static bool window_resize_check (struct window *w, bool horflag) { struct frame *f = XFRAME (w->frame); @@ -3823,12 +3817,12 @@ window_resize_check (struct window *w, bool horflag) { if (XINT (c->new_pixel) != XINT (w->new_pixel) || !window_resize_check (c, horflag)) - return 0; + return false; c = NILP (c->next) ? 0 : XWINDOW (c->next); } - return 1; + return true; } else /* The sum of the heights of the child windows of W must equal @@ -3839,11 +3833,11 @@ window_resize_check (struct window *w, bool horflag) while (c) { if (!window_resize_check (c, horflag)) - return 0; + return false; remaining_pixels -= XINT (c->new_pixel); if (remaining_pixels < 0) - return 0; + return false; c = NILP (c->next) ? 0 : XWINDOW (c->next); } @@ -3863,11 +3857,11 @@ window_resize_check (struct window *w, bool horflag) while (c) { if (!window_resize_check (c, horflag)) - return 0; + return false; remaining_pixels -= XINT (c->new_pixel); if (remaining_pixels < 0) - return 0; + return false; c = NILP (c->next) ? 0 : XWINDOW (c->next); } @@ -3880,12 +3874,12 @@ window_resize_check (struct window *w, bool horflag) { if (XINT (c->new_pixel) != XINT (w->new_pixel) || !window_resize_check (c, horflag)) - return 0; + return false; c = NILP (c->next) ? 0 : XWINDOW (c->next); } - return 1; + return true; } } else @@ -3898,7 +3892,7 @@ window_resize_check (struct window *w, bool horflag) } -/* Set w->pixel_height (w->pixel_width if HORFLAG is non-zero) to +/* Set w->pixel_height (w->pixel_width if HORFLAG) to w->new_pixel for window W and recursively all child windows of W. Also calculate and assign the new vertical (horizontal) pixel start positions of each of these windows. @@ -3984,11 +3978,11 @@ window_resize_apply (struct window *w, bool horflag) } else /* Bug#15957. */ - w->window_end_valid = 0; + w->window_end_valid = false; } -/* Set w->total_lines (w->total_cols if HORFLAG is non-zero) to +/* Set w->total_lines (w->total_cols if HORFLAG) to w->new_total for window W and recursively all child windows of W. Also calculate and assign the new vertical (horizontal) start positions of each of these windows. */ @@ -4083,7 +4077,7 @@ be applied on the Elisp level. */) window_resize_apply (r, horflag); fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = 1; + FRAME_WINDOW_SIZES_CHANGED (f) = true; adjust_frame_glyphs (f); unblock_input (); @@ -4133,8 +4127,8 @@ values. */) /* Resize frame F's windows when number of lines of F is set to SIZE. - HORFLAG 1 means resize windows when number of columns of F is set to - SIZE. PIXELWISE 1 means to interpret SIZE as pixels. */ + HORFLAG means resize windows when number of columns of F is set to + SIZE. PIXELWISE means to interpret SIZE as pixels. */ void resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) { @@ -4168,12 +4162,9 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) } else { - new_size = max (horflag - ? size - : (size - - ((FRAME_HAS_MINIBUF_P (f) - && !FRAME_MINIBUF_ONLY_P (f)) - ? 1 : 0)), + new_size = max (size - (!horflag + && FRAME_HAS_MINIBUF_P (f) + && !FRAME_MINIBUF_ONLY_P (f)), 1); new_pixel_size = new_size * unit; } @@ -4224,7 +4215,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) { window_resize_apply (r, horflag); window_pixel_to_total (r->frame, horflag ? Qt : Qnil); -#if 0 /* Let's try without safe sizes and/or killing other windows. */ +#if false /* Let's try without safe sizes and/or killing other windows. */ } else { @@ -4254,7 +4245,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) XWINDOW (root)->pixel_height = new_pixel_size; } } -#endif /* 0 */ +#endif /* false */ } } } @@ -4311,14 +4302,12 @@ set correctly. See the code of `split-window' for how this is done. */) provided OLD is a leaf window, or to the frame's selected window. NEW (*n) is the new window created with some parameters taken from REFERENCE (*r). */ - register Lisp_Object new, frame, reference; - register struct window *o, *p, *n, *r, *c; + Lisp_Object new, frame, reference; + struct window *o, *p, *n, *r, *c; struct frame *f; bool horflag - /* HORFLAG is 1 when we split side-by-side, 0 otherwise. */ + /* HORFLAG is true when we split side-by-side, false otherwise. */ = EQ (side, Qt) || EQ (side, Qleft) || EQ (side, Qright); - int combination_limit = 0, sum = 0; - int total_size; CHECK_WINDOW (old); o = XWINDOW (old); @@ -4326,20 +4315,20 @@ set correctly. See the code of `split-window' for how this is done. */) f = XFRAME (frame); CHECK_NUMBER (pixel_size); - total_size + int total_size = XINT (pixel_size) / (horflag ? FRAME_COLUMN_WIDTH (f) : FRAME_LINE_HEIGHT (f)); - /* Set combination_limit to 1 if we have to make a new parent window. + /* Set combination_limit if we have to make a new parent window. We do that if either `window-combination-limit' is t, or OLD has no parent, or OLD is ortho-combined. */ - combination_limit = - EQ (Vwindow_combination_limit, Qt) - || NILP (o->parent) - || (horflag - ? WINDOW_VERTICAL_COMBINATION_P (XWINDOW (o->parent)) - : WINDOW_HORIZONTAL_COMBINATION_P (XWINDOW (o->parent))); + bool combination_limit + = (EQ (Vwindow_combination_limit, Qt) + || NILP (o->parent) + || (horflag + ? WINDOW_VERTICAL_COMBINATION_P (XWINDOW (o->parent)) + : WINDOW_HORIZONTAL_COMBINATION_P (XWINDOW (o->parent)))); /* We need a live reference window to initialize some parameters. */ if (WINDOW_LIVE_P (old)) @@ -4405,7 +4394,7 @@ set correctly. See the code of `split-window' for how this is done. */) p = XWINDOW (o->parent); fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = 1; + FRAME_WINDOW_SIZES_CHANGED (f) = true; new = make_window (); n = XWINDOW (new); wset_frame (n, frame); @@ -4430,7 +4419,7 @@ set correctly. See the code of `split-window' for how this is done. */) wset_next (o, new); } - n->window_end_valid = 0; + n->window_end_valid = false; n->last_cursor_vpos = 0; /* Get special geometry settings from reference window. */ @@ -4463,6 +4452,7 @@ set correctly. See the code of `split-window' for how this is done. */) /* Iso-coordinates and sizes are assigned by window_resize_apply, get them ready here. */ wset_new_pixel (n, pixel_size); + int sum = 0; c = XWINDOW (p->contents); while (c) { @@ -4481,7 +4471,7 @@ set correctly. See the code of `split-window' for how this is done. */) adjust_frame_glyphs (f); /* Set buffer of NEW to buffer of reference window. Don't run any hooks. */ - set_window_buffer (new, r->contents, 0, 1); + set_window_buffer (new, r->contents, false, true); unblock_input (); /* Maybe we should run the scroll functions in Elisp (which already @@ -4498,12 +4488,12 @@ DEFUN ("delete-window-internal", Fdelete_window_internal, Sdelete_window_interna doc: /* Remove WINDOW from its frame. WINDOW defaults to the selected window. Return nil. Signal an error when WINDOW is the only window on its frame. */) - (register Lisp_Object window) + (Lisp_Object window) { - register Lisp_Object parent, sibling, frame, root; + Lisp_Object parent, sibling, frame, root; struct window *w, *p, *s, *r; struct frame *f; - bool horflag, before_sibling = 0; + bool horflag, before_sibling = false; w = decode_any_window (window); XSETWINDOW (window, w); @@ -4533,9 +4523,9 @@ Signal an error when WINDOW is the only window on its frame. */) if (NILP (w->prev)) /* Get SIBLING below (on the right of) WINDOW. */ { - /* before_sibling 1 means WINDOW is the first child of its + /* before_sibling means WINDOW is the first child of its parent and thus before the sibling. */ - before_sibling = 1; + before_sibling = true; sibling = w->next; s = XWINDOW (sibling); wset_prev (s, Qnil); @@ -4572,7 +4562,7 @@ Signal an error when WINDOW is the only window on its frame. */) fset_redisplay (f); Vwindow_list = Qnil; - FRAME_WINDOW_SIZES_CHANGED (f) = 1; + FRAME_WINDOW_SIZES_CHANGED (f) = true; wset_next (w, Qnil); /* Don't delete w->next too. */ free_window_matrices (w); @@ -4580,7 +4570,7 @@ Signal an error when WINDOW is the only window on its frame. */) if (WINDOWP (w->contents)) { delete_all_child_windows (w->contents); - wset_combination (w, 0, Qnil); + wset_combination (w, false, Qnil); } else { @@ -4596,13 +4586,13 @@ Signal an error when WINDOW is the only window on its frame. */) PARENT. */ { /* Put SIBLING into PARENT's place. */ - replace_window (parent, sibling, 0); + replace_window (parent, sibling, false); /* Have SIBLING inherit the following three slot values from PARENT (the combination_limit slot is not inherited). */ wset_normal_cols (s, p->normal_cols); wset_normal_lines (s, p->normal_lines); /* Mark PARENT as deleted. */ - wset_combination (p, 0, Qnil); + wset_combination (p, false, Qnil); /* Try to merge SIBLING into its new parent. */ recombine_windows (sibling); } @@ -4687,10 +4677,10 @@ grow_mini_window (struct window *w, int delta, bool pixelwise) r = XWINDOW (root); height = call3 (Qwindow_resize_root_window_vertically, root, make_number (- delta), pixelwise ? Qt : Qnil); - if (INTEGERP (height) && window_resize_check (r, 0)) + if (INTEGERP (height) && window_resize_check (r, false)) { block_input (); - window_resize_apply (r, 0); + window_resize_apply (r, false); if (pixelwise) { @@ -4742,10 +4732,10 @@ shrink_mini_window (struct window *w, bool pixelwise) delta = call3 (Qwindow_resize_root_window_vertically, root, make_number (height - unit), pixelwise ? Qt : Qnil); - if (INTEGERP (delta) && window_resize_check (r, 0)) + if (INTEGERP (delta) && window_resize_check (r, false)) { block_input (); - window_resize_apply (r, 0); + window_resize_apply (r, false); /* Shrink the mini-window. */ w->top_line = r->top_line + r->total_lines; @@ -4784,12 +4774,12 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini r = XWINDOW (FRAME_ROOT_WINDOW (f)); height = r->pixel_height + w->pixel_height; - if (window_resize_check (r, 0) + if (window_resize_check (r, false) && XINT (w->new_pixel) > 0 && height == XINT (r->new_pixel) + XINT (w->new_pixel)) { block_input (); - window_resize_apply (r, 0); + window_resize_apply (r, false); w->pixel_height = XFASTINT (w->new_pixel); w->total_lines = w->pixel_height / FRAME_LINE_HEIGHT (f); @@ -4797,7 +4787,7 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini w->top_line = r->top_line + r->total_lines; fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = 1; + FRAME_WINDOW_SIZES_CHANGED (f) = true; adjust_frame_glyphs (f); unblock_input (); return Qt; @@ -4819,7 +4809,7 @@ mark_window_cursors_off (struct window *w) if (WINDOWP (w->contents)) mark_window_cursors_off (XWINDOW (w->contents)); else - w->phys_cursor_on_p = 0; + w->phys_cursor_on_p = false; w = NILP (w->next) ? 0 : XWINDOW (w->next); } @@ -4854,19 +4844,19 @@ window_internal_height (struct window *w) Window Scrolling ***********************************************************************/ -/* Scroll contents of window WINDOW up. If WHOLE is non-zero, scroll +/* Scroll contents of window WINDOW up. If WHOLE, scroll N screen-fulls, which is defined as the height of the window minus next_screen_context_lines. If WHOLE is zero, scroll up N lines - instead. Negative values of N mean scroll down. NOERROR non-zero + instead. Negative values of N mean scroll down. NOERROR means don't signal an error if we try to move over BEGV or ZV, respectively. */ static void -window_scroll (Lisp_Object window, EMACS_INT n, bool whole, int noerror) +window_scroll (Lisp_Object window, EMACS_INT n, bool whole, bool noerror) { ptrdiff_t count = SPECPDL_INDEX (); - immediate_quit = 1; + immediate_quit = true; n = clip_to_bounds (INT_MIN, n, INT_MAX); wset_redisplay (XWINDOW (window)); @@ -4884,8 +4874,8 @@ window_scroll (Lisp_Object window, EMACS_INT n, bool whole, int noerror) unbind_to (count, Qnil); /* Bug#15957. */ - XWINDOW (window)->window_end_valid = 0; - immediate_quit = 0; + XWINDOW (window)->window_end_valid = false; + immediate_quit = false; } @@ -4894,14 +4884,14 @@ window_scroll (Lisp_Object window, EMACS_INT n, bool whole, int noerror) descriptions. */ static void -window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) +window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) { struct it it; struct window *w = XWINDOW (window); struct text_pos start; int this_scroll_margin; /* True if we fiddled the window vscroll field without really scrolling. */ - int vscrolled = 0; + bool vscrolled = false; int x, y, rtop, rbot, rowh, vpos; void *itdata = NULL; int window_total_lines; @@ -4944,7 +4934,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) } start = it.current.pos; - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); } else if (auto_window_vscroll_p) { @@ -4997,11 +4987,11 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV); set_marker_restricted (w->start, make_number (spos), w->contents); - w->start_at_line_beg = 1; - w->update_mode_line = 1; + w->start_at_line_beg = true; + w->update_mode_line = true; /* Set force_start so that redisplay_window will run the window-scroll-functions. */ - w->force_start = 1; + w->force_start = true; return; } } @@ -5095,7 +5085,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) } else { - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); if (noerror) return; else if (n < 0) /* could happen with empty buffers */ @@ -5112,7 +5102,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) w->vscroll = 0; else { - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); if (noerror) return; else @@ -5122,10 +5112,10 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) /* If control gets here, then we vscrolled. */ - XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1; + XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true; /* Don't try to change the window start below. */ - vscrolled = 1; + vscrolled = true; } if (! vscrolled) @@ -5146,10 +5136,10 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) IT_BYTEPOS (it)); bytepos = marker_byte_position (w->start); w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n'); - w->update_mode_line = 1; + w->update_mode_line = true; /* Set force_start so that redisplay_window will run the window-scroll-functions. */ - w->force_start = 1; + w->force_start = true; } /* The rest of this function uses current_y in a nonstandard way, @@ -5182,8 +5172,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) This is necessary because we set it.current_y to 0, above. */ move_it_to (&it, -1, window_scroll_pixel_based_preserve_x, - window_scroll_pixel_based_preserve_y - - (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0 ), + (window_scroll_pixel_based_preserve_y + - WINDOW_WANTS_HEADER_LINE_P (w)), -1, MOVE_TO_Y | MOVE_TO_X); SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); } @@ -5202,7 +5192,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) else if (n < 0) { ptrdiff_t charpos, bytepos; - int partial_p; + bool partial_p; /* Save our position, for the window_scroll_pixel_based_preserve_y case. */ @@ -5238,12 +5228,12 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) { charpos = IT_CHARPOS (it); bytepos = IT_BYTEPOS (it); - bidi_unshelve_cache (it_data, 1); + bidi_unshelve_cache (it_data, true); } else { it = it2; - bidi_unshelve_cache (it_data, 0); + bidi_unshelve_cache (it_data, false); } } @@ -5287,7 +5277,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) SET_PT_BOTH (charpos, bytepos); } } - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); if (adjust_old_pointm) Fset_marker (w->old_pointm, @@ -5302,9 +5292,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror) See the comment of window_scroll for parameter descriptions. */ static void -window_scroll_line_based (Lisp_Object window, int n, bool whole, int noerror) +window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) { - register struct window *w = XWINDOW (window); + struct window *w = XWINDOW (window); /* Fvertical_motion enters redisplay, which can trigger fontification, which in turn can modify buffer text (e.g., if the fontification functions replace escape sequences with faces, as @@ -5334,7 +5324,7 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, int noerror) || NILP (Fget (KVAR (current_kboard, Vlast_command), Qscroll_command))) { struct position posit - = *compute_motion (startpos, startbyte, 0, 0, 0, + = *compute_motion (startpos, startbyte, 0, 0, false, PT, ht, 0, -1, w->hscroll, 0, w); window_scroll_preserve_vpos = posit.vpos; @@ -5380,10 +5370,10 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, int noerror) set_marker_restricted_both (w->start, w->contents, pos, pos_byte); w->start_at_line_beg = !NILP (bolp); - w->update_mode_line = 1; + w->update_mode_line = true; /* Set force_start so that redisplay_window will run the window-scroll-functions. */ - w->force_start = 1; + w->force_start = true; if (!NILP (Vscroll_preserve_screen_position) && (whole || !EQ (Vscroll_preserve_screen_position, Qt))) @@ -5485,13 +5475,13 @@ scroll_command (Lisp_Object n, int direction) } if (NILP (n)) - window_scroll (selected_window, direction, 1, 0); + window_scroll (selected_window, direction, true, false); else if (EQ (n, Qminus)) - window_scroll (selected_window, -direction, 1, 0); + window_scroll (selected_window, -direction, true, false); else { n = Fprefix_numeric_value (n); - window_scroll (selected_window, XINT (n) * direction, 0, 0); + window_scroll (selected_window, XINT (n) * direction, false, false); } unbind_to (count, Qnil); @@ -5599,15 +5589,15 @@ specifies the window to scroll. This takes precedence over SET_PT_BOTH (marker_position (w->old_pointm), marker_byte_position (w->old_pointm)); if (NILP (arg)) - window_scroll (window, 1, 1, 1); + window_scroll (window, 1, true, true); else if (EQ (arg, Qminus)) - window_scroll (window, -1, 1, 1); + window_scroll (window, -1, true, true); else { if (CONSP (arg)) arg = XCAR (arg); CHECK_NUMBER (arg); - window_scroll (window, XINT (arg), 0, 1); + window_scroll (window, XINT (arg), false, true); } set_marker_both (w->pointm, Qnil, PT, PT_BYTE); @@ -5637,7 +5627,7 @@ by this function. This happens in an interactive call. */) if (!NILP (set_minimum)) w->min_hscroll = w->hscroll; - w->suspend_auto_hscroll = 1; + w->suspend_auto_hscroll = true; return result; } @@ -5662,7 +5652,7 @@ by this function. This happens in an interactive call. */) if (!NILP (set_minimum)) w->min_hscroll = w->hscroll; - w->suspend_auto_hscroll = 1; + w->suspend_auto_hscroll = true; return result; } @@ -5710,7 +5700,7 @@ displayed_window_lines (struct window *w) start_display (&it, w, start); move_it_vertically (&it, height); bottom_y = line_bottom_y (&it); - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); /* rms: On a non-window display, the value of it.vpos at the bottom of the screen @@ -5754,7 +5744,7 @@ and redisplay normally--don't erase and redraw the frame. */) { struct window *w = XWINDOW (selected_window); struct buffer *buf = XBUFFER (w->contents); - bool center_p = 0; + bool center_p = false; ptrdiff_t charpos, bytepos; EMACS_INT iarg IF_LINT (= 0); int this_scroll_margin; @@ -5783,10 +5773,10 @@ and redisplay normally--don't erase and redraw the frame. */) SET_FRAME_GARBAGED (WINDOW_XFRAME (w)); } - center_p = 1; + center_p = true; } else if (CONSP (arg)) /* Just C-u. */ - center_p = 1; + center_p = true; else { arg = Fprefix_numeric_value (arg); @@ -5814,7 +5804,7 @@ and redisplay normally--don't erase and redraw the frame. */) move_it_vertically_backward (&it, window_box_height (w) / 2); charpos = IT_CHARPOS (it); bytepos = IT_BYTEPOS (it); - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); } else if (iarg < 0) { @@ -5864,7 +5854,7 @@ and redisplay normally--don't erase and redraw the frame. */) } if (h <= 0) { - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); return Qnil; } @@ -5887,7 +5877,7 @@ and redisplay normally--don't erase and redraw the frame. */) charpos = IT_CHARPOS (it); bytepos = IT_BYTEPOS (it); - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); } else { @@ -5917,7 +5907,7 @@ and redisplay normally--don't erase and redraw the frame. */) charpos = IT_CHARPOS (it); bytepos = IT_BYTEPOS (it); - bidi_unshelve_cache (itdata, 0); + bidi_unshelve_cache (itdata, false); } } else @@ -5941,9 +5931,9 @@ and redisplay normally--don't erase and redraw the frame. */) /* Set the new window start. */ set_marker_both (w->start, w->contents, charpos, bytepos); - w->window_end_valid = 0; + w->window_end_valid = false; - w->optional_new_start = 1; + w->optional_new_start = true; w->start_at_line_beg = (bytepos == BEGV_BYTE || FETCH_BYTE (bytepos - 1) == '\n'); @@ -6007,7 +5997,7 @@ zero means top of window, negative means relative to bottom of window. */) struct window *w = XWINDOW (selected_window); int lines, start; Lisp_Object window; -#if 0 +#if false int this_scroll_margin; #endif @@ -6024,14 +6014,14 @@ zero means top of window, negative means relative to bottom of window. */) Fvertical_motion (make_number (- (height / 2)), window, Qnil); set_marker_both (w->start, w->contents, PT, PT_BYTE); w->start_at_line_beg = !NILP (Fbolp ()); - w->force_start = 1; + w->force_start = true; } else Fgoto_char (w->start); lines = displayed_window_lines (w); -#if 0 +#if false this_scroll_margin = max (0, min (scroll_margin, lines / 4)); #endif @@ -6044,11 +6034,11 @@ zero means top of window, negative means relative to bottom of window. */) if (iarg < 0) iarg = iarg + lines; -#if 0 /* This code would prevent move-to-window-line from moving point - to a place inside the scroll margins (which would cause the - next redisplay to scroll). I wrote this code, but then concluded - it is probably better not to install it. However, it is here - inside #if 0 so as not to lose it. -- rms. */ +#if false /* This code would prevent move-to-window-line from moving point + to a place inside the scroll margins (which would cause the + next redisplay to scroll). I wrote this code, but then concluded + it is probably better not to install it. However, it is here + inside #if false so as not to lose it. -- rms. */ /* Don't let it get into the margin at either top or bottom. */ iarg = max (iarg, this_scroll_margin); @@ -6259,7 +6249,7 @@ the return value is nil. Otherwise the value is t. */) } fset_redisplay (f); - FRAME_WINDOW_SIZES_CHANGED (f) = 1; + FRAME_WINDOW_SIZES_CHANGED (f) = true; /* Problem: Freeing all matrices and later allocating them again is a serious redisplay flickering problem. What we would @@ -6390,7 +6380,7 @@ the return value is nil. Otherwise the value is t. */) (w->old_pointm, w->contents, BUF_PT (XBUFFER (w->contents)), BUF_PT_BYTE (XBUFFER (w->contents))); - w->start_at_line_beg = 1; + w->start_at_line_beg = true; } else if (!NILP (w->start)) /* Leaf window has no live buffer, get one. */ @@ -6405,7 +6395,7 @@ the return value is nil. Otherwise the value is t. */) set_marker_restricted_both (w->start, w->contents, 0, 0); set_marker_restricted_both (w->pointm, w->contents, 0, 0); set_marker_restricted_both (w->old_pointm, w->contents, 0, 0); - w->start_at_line_beg = 1; + w->start_at_line_beg = true; if (!NILP (w->dedicated)) /* Record this window as dead. */ dead_windows = Fcons (window, dead_windows); @@ -6429,7 +6419,7 @@ the return value is nil. Otherwise the value is t. */) Do not record the buffer here. We do that in a separate call to select_window below. See also Bug#16207. */ - select_window (data->current_window, Qt, 1); + select_window (data->current_window, Qt, true); BVAR (XBUFFER (XWINDOW (selected_window)->contents), last_selected_window) = selected_window; @@ -6451,7 +6441,7 @@ the return value is nil. Otherwise the value is t. */) /* Allow x_set_window_size again and apply frame size changes if needed. */ f->can_x_set_window_size = true; - adjust_frame_size (f, -1, -1, 1, 0, Qset_window_configuration); + adjust_frame_size (f, -1, -1, 1, false, Qset_window_configuration); adjust_frame_glyphs (f); unblock_input (); @@ -6466,7 +6456,7 @@ the return value is nil. Otherwise the value is t. */) /* Record the selected window's buffer here. The window should already be the selected one from the call above. */ - select_window (data->current_window, Qnil, 0); + select_window (data->current_window, Qnil, false); /* Fselect_window will have made f the selected frame, so we reselect the proper frame here. Fhandle_switch_frame will change the @@ -6521,7 +6511,7 @@ delete_all_child_windows (Lisp_Object window) if (WINDOWP (w->contents)) { delete_all_child_windows (w->contents); - wset_combination (w, 0, Qnil); + wset_combination (w, false, Qnil); } else if (BUFFERP (w->contents)) { @@ -6793,7 +6783,7 @@ apply_window_adjustment (struct window *w) { eassert (w); clear_glyph_matrix (w->current_matrix); - w->window_end_valid = 0; + w->window_end_valid = false; windows_or_buffers_changed = 30; wset_redisplay (w); adjust_frame_glyphs (XFRAME (WINDOW_FRAME (w))); @@ -6883,7 +6873,8 @@ static struct window * set_window_fringes (struct window *w, Lisp_Object left_width, Lisp_Object right_width, Lisp_Object outside_margins) { - int left, right, outside = !NILP (outside_margins); + int left, right; + bool outside = !NILP (outside_margins); left = (NILP (left_width) ? -1 : (CHECK_NATNUM (left_width), XINT (left_width))); @@ -6969,7 +6960,7 @@ set_window_scroll_bars (struct window *w, Lisp_Object width, Lisp_Object horizontal_type) { int iwidth = (NILP (width) ? -1 : (CHECK_NATNUM (width), XINT (width))); - bool changed = 0; + bool changed = false; if (iwidth == 0) vertical_type = Qnil; @@ -6992,7 +6983,7 @@ set_window_scroll_bars (struct window *w, Lisp_Object width, { w->scroll_bar_width = iwidth; wset_vertical_scroll_bar_type (w, vertical_type); - changed = 1; + changed = true; } } @@ -7020,7 +7011,7 @@ set_window_scroll_bars (struct window *w, Lisp_Object width, { w->scroll_bar_height = iheight; wset_horizontal_scroll_bar_type (w, horizontal_type); - changed = 1; + changed = true; } } } @@ -7143,7 +7134,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */) adjust_frame_glyphs (f); /* Prevent redisplay shortcuts. */ - XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1; + XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true; } } @@ -7156,7 +7147,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */) additional argument USER_DATA. Stops when FN returns 0. */ static void -foreach_window (struct frame *f, int (*fn) (struct window *, void *), +foreach_window (struct frame *f, bool (*fn) (struct window *, void *), void *user_data) { /* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil. */ @@ -7168,14 +7159,15 @@ foreach_window (struct frame *f, int (*fn) (struct window *, void *), /* Helper function for foreach_window. Call FN for all leaf windows reachable from W. FN is called with the first argument being a pointer to the leaf window, and with additional argument USER_DATA. - Stop when FN returns 0. Value is 0 if stopped by FN. */ + Stop when FN returns false. Value is false if stopped by FN. */ -static int -foreach_window_1 (struct window *w, int (*fn) (struct window *, void *), void *user_data) +static bool +foreach_window_1 (struct window *w, bool (*fn) (struct window *, void *), + void *user_data) { - int cont; + bool cont; - for (cont = 1; w && cont;) + for (cont = true; w && cont;) { if (WINDOWP (w->contents)) cont = foreach_window_1 (XWINDOW (w->contents), fn, user_data); @@ -7192,7 +7184,7 @@ foreach_window_1 (struct window *w, int (*fn) (struct window *, void *), void *u Initialization ***********************************************************************/ -/* Return 1 if window configurations CONFIGURATION1 and CONFIGURATION2 +/* Return true if window configurations CONFIGURATION1 and CONFIGURATION2 describe the same state of affairs. This is used by Fequal. IGNORE_POSITIONS means ignore non-matching scroll positions @@ -7231,7 +7223,7 @@ compare_window_configurations (Lisp_Object configuration1, || !EQ (d1->focus_frame, d2->focus_frame) /* Verify that the two configurations have the same number of windows. */ || sws1->header.size != sws2->header.size) - return 0; + return false; for (i = 0; i < sws1->header.size; i++) { @@ -7275,10 +7267,10 @@ compare_window_configurations (Lisp_Object configuration1, || !EQ (sw1->scroll_bar_height, sw2->scroll_bar_height) || !EQ (sw1->vertical_scroll_bar_type, sw2->vertical_scroll_bar_type) || !EQ (sw1->horizontal_scroll_bar_type, sw2->horizontal_scroll_bar_type)) - return 0; + return false; } - return 1; + return true; } DEFUN ("compare-window-configurations", Fcompare_window_configurations, @@ -7288,7 +7280,7 @@ This function ignores details such as the values of point and scrolling positions. */) (Lisp_Object x, Lisp_Object y) { - if (compare_window_configurations (x, y, 1)) + if (compare_window_configurations (x, y, true)) return Qt; return Qnil; } diff --git a/src/window.h b/src/window.h index 2ec28ab..96e7438 100644 --- a/src/window.h +++ b/src/window.h @@ -256,7 +256,7 @@ struct window /* Scaling factor for the glyph_matrix size calculation in this window. Used if window contains many small images or uses proportional fonts, - as the normal may yield a matrix which is too small. */ + as the normal may yield a matrix which is too small. */ int nrows_scale_factor, ncols_scale_factor; /* Intended cursor position. This is a position within the @@ -323,7 +323,7 @@ struct window /* True if this window is a minibuffer window. */ bool_bf mini : 1; - /* Meaningful only if contents is a window, non-zero if this + /* Meaningful only if contents is a window, true if this internal window is used in horizontal combination. */ bool_bf horizontal : 1; @@ -921,7 +921,7 @@ wset_next_buffers (struct window *w, Lisp_Object val) : 0) #define WINDOW_MODE_LINE_LINES(W) \ - (!! WINDOW_WANTS_MODELINE_P (W)) + WINDOW_WANTS_MODELINE_P (W) /* Height in pixels, and in lines, of the header line. Zero if W doesn't have a header line. */ @@ -931,7 +931,7 @@ wset_next_buffers (struct window *w, Lisp_Object val) : 0) #define WINDOW_HEADER_LINE_LINES(W) \ - (!! WINDOW_WANTS_HEADER_LINE_P (W)) + WINDOW_WANTS_HEADER_LINE_P (W) /* Pixel height of window W without mode line, bottom scroll bar and bottom divider. */ @@ -1015,7 +1015,7 @@ extern int window_relative_x_coord (struct window *, enum window_part, int); void run_window_configuration_change_hook (struct frame *f); -/* Make WINDOW display BUFFER. RUN_HOOKS_P non-zero means it's allowed +/* Make WINDOW display BUFFER. RUN_HOOKS_P means it's allowed to run hooks. See make_frame for a case where it's not allowed. */ void set_window_buffer (Lisp_Object window, Lisp_Object buffer, @@ -1067,7 +1067,7 @@ extern void redisplay_other_windows (void); struct glyph *get_phys_cursor_glyph (struct window *w); -/* Value is non-zero if WINDOW is a valid window. */ +/* True if WINDOW is a valid window. */ #define WINDOW_VALID_P(WINDOW) \ (WINDOWP (WINDOW) && !NILP (XWINDOW (WINDOW)->contents)) \ @@ -1076,7 +1076,7 @@ struct glyph *get_phys_cursor_glyph (struct window *w); #define CHECK_VALID_WINDOW(WINDOW) \ CHECK_TYPE (WINDOW_VALID_P (WINDOW), Qwindow_valid_p, WINDOW) -/* Value is non-zero if WINDOW is a live window. */ +/* True if WINDOW is a live window. */ #define WINDOW_LIVE_P(WINDOW) \ (WINDOWP (WINDOW) && BUFFERP (XWINDOW (WINDOW)->contents)) commit 3ba6b3a9c1e0565ee5f45f11a9c09702a24f8453 Author: Artur Malabarba Date: Sun Apr 12 03:23:35 2015 +0100 Speed up byte-compilation and autoload generation by avoiding mode-hooks This prevents emacs-lisp-mode-hook from being run everytime an autoload file is generated, which can account for a fraction of package installation time depending on the hooks the user has configured. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Use delay-mode-hooks. * lisp/emacs-lisp/autoload.el (autoload-find-file) (autoload-find-generated-file): Use delay-mode-hooks. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 073d923..206d5bb 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -235,8 +235,9 @@ If a buffer is visiting the desired autoload file, return it." (enable-local-eval nil)) ;; We used to use `raw-text' to read this file, but this causes ;; problems when the file contains non-ASCII characters. - (find-file-noselect - (autoload-ensure-default-file (autoload-generated-file))))) + (let ((delay-mode-hooks t)) + (find-file-noselect + (autoload-ensure-default-file (autoload-generated-file)))))) (defun autoload-generated-file () (expand-file-name generated-autoload-file @@ -400,7 +401,7 @@ which lists the file name and which functions are in it, etc." (erase-buffer) (setq buffer-undo-list t buffer-read-only nil) - (emacs-lisp-mode) + (delay-mode-hooks (emacs-lisp-mode)) (setq default-directory (file-name-directory file)) (insert-file-contents file nil) (let ((enable-local-variables :safe) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e929c02..f0d2ee4 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1799,7 +1799,7 @@ The value is non-nil if there were no errors, nil if errors." (progn (setq-default major-mode 'emacs-lisp-mode) ;; Arg of t means don't alter enable-local-variables. - (normal-mode t)) + (delay-mode-hooks (normal-mode t))) (setq-default major-mode dmm)) ;; There may be a file local variable setting (bug#10419). (setq buffer-read-only nil commit 50ddc67739d14c4371e11ba52b91308efe21b3db Author: Artur Malabarba Date: Sun Apr 12 03:55:21 2015 +0100 * lisp/emacs-lisp/package.el: Improve `package-menu-refresh' (package-menu-refresh): Respect async and do new package checking. (list-packages): Use `package-menu-refresh' instead of repeating code. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 745c5bf..ad482e5 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2589,8 +2589,9 @@ This fetches the contents of each archive specified in (interactive) (unless (derived-mode-p 'package-menu-mode) (user-error "The current buffer is not a Package Menu")) - (package-refresh-contents) - (package-menu--generate t t)) + (setq package-menu--old-archive-contents package-archive-contents) + (setq package-menu--new-package-list nil) + (package-refresh-contents package-menu-async)) (defun package-menu-describe-package (&optional button) "Describe the current package. @@ -2942,11 +2943,8 @@ The list is displayed in a buffer named `*Packages*'." (add-hook 'package--post-download-archives-hook #'package-menu--post-refresh) - (unless no-fetch - (setq package-menu--old-archive-contents package-archive-contents) - (setq package-menu--new-package-list nil) - ;; Fetch the remote list of packages. - (package-refresh-contents package-menu-async)) + ;; Fetch the remote list of packages. + (unless no-fetch (package-menu-refresh)) ;; Generate the Package Menu. (let ((buf (get-buffer-create "*Packages*"))) commit 6f87b180dd947da509a0737afee97531df107bb7 Author: Artur Malabarba Date: Sun Apr 12 03:08:21 2015 +0100 * lisp/emacs-lisp/package.el: Improve package-menu-quick-help (package--quick-help-keys): New variable. (package--prettify-quick-help-key): New function. (package-menu-quick-help): Use it. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 8920bf6..745c5bf 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2639,10 +2639,31 @@ If optional arg BUTTON is non-nil, describe its associated package." (tabulated-list-put-tag "D" t) (forward-line 1))))) +(defvar package--quick-help-keys + '(("install," "delete," "unmark," ("execute" . 1)) + ("next," "previous") + ("refresh-contents," "g-redisplay," "filter," "help"))) + +(defun package--prettify-quick-help-key (desc) + "Prettify DESC to be displayed as a help menu." + (if (listp desc) + (if (listp (cdr desc)) + (mapconcat #'package--prettify-quick-help-key desc " ") + (let ((place (cdr desc)) + (out (car desc))) + ;; (setq out (propertize out 'face 'paradox-comment-face)) + (add-text-properties place (1+ place) + '(face (bold font-lock-function-name-face)) + out) + out)) + (package--prettify-quick-help-key (cons desc 0)))) + (defun package-menu-quick-help () - "Show short key binding help for package-menu-mode." + "Show short key binding help for `package-menu-mode'. +The full list of keys can be viewed with \\[describe-mode]." (interactive) - (message "n-ext, i-nstall, d-elete, u-nmark, x-ecute, r-efresh, h-elp")) + (message (mapconcat #'package--prettify-quick-help-key + package--quick-help-keys "\n"))) (define-obsolete-function-alias 'package-menu-view-commentary 'package-menu-describe-package "24.1") commit 357edb4e89e9a6a9a436f88d83cd2bc7c9da29eb Author: Artur Malabarba Date: Sun Apr 12 02:33:29 2015 +0100 * lisp/emacs-lisp/package.el: Fix initially wrong compat table (package--build-compatibility-table): require finder diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 22575ca..8920bf6 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1199,6 +1199,8 @@ version higher than the one being used. To check for package (defun package--build-compatibility-table () "Build `package--compatibility-table' with `package--mapc'." + ;; Initialize the list of built-ins. + (require 'finder-inf nil t) ;; Build compat table. (setq package--compatibility-table (make-hash-table :test 'eq)) (package--mapc #'package--add-to-compatibility-table)) commit f80027b37ac4d41dcc4ad7ce1e486dd194307b5d Author: Artur Malabarba Date: Sun Apr 12 02:14:03 2015 +0100 * test/automated/package-test.el: Fix new test diff --git a/test/automated/package-test.el b/test/automated/package-test.el index b343ed7..2fbcfd0 100644 --- a/test/automated/package-test.el +++ b/test/automated/package-test.el @@ -353,7 +353,6 @@ Must called from within a `tar-mode' buffer." (list-packages) (should package--downloads-in-progress) (should mode-line-process) - (should-not (string= (format-mode-line mode-line-process) "")) (should-not (with-timeout (10 'timeout) (while package--downloads-in-progress commit ba273b6185169958df4ce7035e214863d539d48c Author: Artur Malabarba Date: Sun Apr 12 01:52:43 2015 +0100 * lisp/emacs-lisp/package.el: Silence async operations (package--silence): New variable. (package--message): New function. (package-import-keyring, package-refresh-contents) (package-compute-transaction, package-install, package-delete) (package-menu--perform-transaction, package-menu-execute): Use it. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 40d02f8..22575ca 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1343,6 +1343,16 @@ it to the file." (declare-function epg-configuration "epg-config" ()) (declare-function epg-import-keys-from-file "epg" (context keys)) +(defvar package--silence nil) + +(defun package--message (format &rest args) + "Like `message', except sometimes don't print to minibuffer. +If the variable `package--silence' is non-nil, the message is not +displayed on the minibuffer." + (apply #'message format args) + (when package--silence + (message nil))) + ;;;###autoload (defun package-import-keyring (&optional file) "Import keys from FILE." @@ -1353,9 +1363,9 @@ it to the file." (with-file-modes 448 (make-directory homedir t)) (setf (epg-context-home-directory context) homedir) - (message "Importing %s..." (file-name-nondirectory file)) + (package--message "Importing %s..." (file-name-nondirectory file)) (epg-import-keys-from-file context file) - (message "Importing %s...done" (file-name-nondirectory file)))) + (package--message "Importing %s...done" (file-name-nondirectory file)))) (defvar package--post-download-archives-hook nil "Hook run after the archive contents are downloaded. @@ -1447,14 +1457,15 @@ downloads in the background." (unless (file-exists-p package-user-dir) (make-directory package-user-dir t)) (let ((default-keyring (expand-file-name "package-keyring.gpg" - data-directory))) + data-directory)) + (package--silence async)) (when (and package-check-signature (file-exists-p default-keyring)) (condition-case-unless-debug error (progn (epg-check-configuration (epg-configuration)) (package-import-keyring default-keyring)) - (error (message "Cannot import default keyring: %S" (cdr error)))))) - (package--download-and-read-archives async)) + (error (message "Cannot import default keyring: %S" (cdr error))))) + (package--download-and-read-archives async))) ;;; Dependency Management @@ -1496,7 +1507,7 @@ SEEN is used internally to detect infinite recursion." ;; we re-add it (along with its dependencies) at an earlier place ;; below (bug#16994). (if (memq already seen) ;Avoid inf-loop on dependency cycles. - (message "Dependency cycle going through %S" + (package--message "Dependency cycle going through %S" (package-desc-full-name already)) (setq packages (delq already packages)) (setq already nil)) @@ -1827,7 +1838,7 @@ to install it but still mark it as selected." (package-desc-reqs pkg))) (package-compute-transaction () (list (list pkg)))))) (package-download-transaction transaction async callback) - (message "`%s' is already installed" (package-desc-full-name pkg)))) + (package--message "`%s' is already installed" (package-desc-full-name pkg)))) (defun package-strip-rcs-id (str) "Strip RCS version ID from the version string STR. @@ -1970,7 +1981,7 @@ If NOSAVE is non-nil, the package is not removed from (delete pkg-desc pkgs) (unless (cdr pkgs) (setq package-alist (delq pkgs package-alist)))) - (message "Package `%s' deleted." (package-desc-full-name pkg-desc)))))) + (package--message "Package `%s' deleted." (package-desc-full-name pkg-desc)))))) ;;;###autoload (defun package-reinstall (pkg) @@ -2771,7 +2782,7 @@ asynchronously." (error (message (cadr err))))) (when package-selected-packages (when-let ((removable (package--removable-packages))) - (message "These %d packages are no longer needed, type `M-x package-autoremove' to remove them (%s)" + (package--message "These %d packages are no longer needed, type `M-x package-autoremove' to remove them (%s)" (length removable) (mapconcat #'symbol-name removable ", ")))) (package-menu--post-refresh))) @@ -2801,9 +2812,10 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." (user-error "No operations specified")) (when (or noquery (package-menu--prompt-transaction-p install-list delete-list)) - ;; This calls `package-menu--generate' after everything's done. - (package-menu--perform-transaction - install-list delete-list package-menu-async)))) + (let ((package--silence package-menu-async)) + ;; This calls `package-menu--generate' after everything's done. + (package-menu--perform-transaction + install-list delete-list package-menu-async))))) (defun package-menu--version-predicate (A B) (let ((vA (or (aref (cadr A) 1) '(0))) commit 7cae5c3cb6bcbee49e56c8d607d64071f9196952 Author: Artur Malabarba Date: Sun Apr 12 01:10:35 2015 +0100 * test/automated/package-test.el: Test async functionality (package-test-update-archives-async): New test diff --git a/test/automated/data/package/package-test-server.py b/test/automated/data/package/package-test-server.py new file mode 100644 index 0000000..35ca820 --- /dev/null +++ b/test/automated/data/package/package-test-server.py @@ -0,0 +1,21 @@ +import sys +import BaseHTTPServer +from SimpleHTTPServer import SimpleHTTPRequestHandler + + +HandlerClass = SimpleHTTPRequestHandler +ServerClass = BaseHTTPServer.HTTPServer +Protocol = "HTTP/1.0" + +if sys.argv[1:]: + port = int(sys.argv[1]) +else: + port = 8000 + server_address = ('127.0.0.1', port) + +HandlerClass.protocol_version = Protocol +httpd = ServerClass(server_address, HandlerClass) + +sa = httpd.socket.getsockname() +print "Serving HTTP on", sa[0], "port", sa[1], "..." +httpd.serve_forever() diff --git a/test/automated/package-test.el b/test/automated/package-test.el index 5fae216..b343ed7 100644 --- a/test/automated/package-test.el +++ b/test/automated/package-test.el @@ -103,6 +103,7 @@ (cl-defmacro with-package-test ((&optional &key file basedir install + location update-news upload-base) &rest body) @@ -112,7 +113,7 @@ (process-environment (cons (format "HOME=%s" package-test-user-dir) process-environment)) (package-user-dir package-test-user-dir) - (package-archives `(("gnu" . ,package-test-data-dir))) + (package-archives `(("gnu" . ,(or ,location package-test-data-dir)))) (default-directory package-test-file-dir) abbreviated-home-dir package--initialized @@ -336,6 +337,33 @@ Must called from within a `tar-mode' buffer." (package-menu-refresh) (should (package-installed-p 'simple-single '(1 4))))))) +(ert-deftest package-test-update-archives-async () + "Test updating package archives asynchronously." + (skip-unless (executable-find "python2")) + (with-package-test (:basedir + package-test-data-dir + :location "http://0.0.0.0:8000/") + (let* ((package-menu-async t) + (process (start-process + "package-server" "package-server-buffer" + (executable-find "python2") + (expand-file-name "package-test-server.py")))) + (unwind-protect + (progn + (list-packages) + (should package--downloads-in-progress) + (should mode-line-process) + (should-not (string= (format-mode-line mode-line-process) "")) + (should-not + (with-timeout (10 'timeout) + (while package--downloads-in-progress + (accept-process-output nil 1)) + nil)) + (goto-char (point-min)) + (should + (search-forward-regexp "^ +simple-single" nil t))) + (kill-process process))))) + (ert-deftest package-test-describe-package () "Test displaying help for a package." commit ccade56fbee75dfebc6e1826738550a1c131d933 Author: Daiki Ueno Date: Sat Apr 11 16:31:59 2015 +0900 Utilize `make-process' in epg.el * lisp/epg.el (epg-error-output): Abolish. (epg-context): New slot `error-buffer'. (epg--start): Use `make-process' and `make-pipe-process'. (epg--process-filter): Remove code separating stderr from stdout. (epg-wait-for-completion): Simplify `error-output' handling. (epg-reset): Dispose error buffer. diff --git a/lisp/epg.el b/lisp/epg.el index 1b75b50..6015048 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -40,7 +40,6 @@ (defvar epg-debug-buffer nil) (defvar epg-agent-file nil) (defvar epg-agent-mtime nil) -(defvar epg-error-output nil) ;; from gnupg/include/cipher.h (defconst epg-cipher-algorithm-alist @@ -213,7 +212,8 @@ result operation pinentry-mode - (error-output "")) + (error-output "") + error-buffer) ;; This is not an alias, just so we can mark it as autoloaded. ;;;###autoload @@ -581,11 +581,9 @@ callback data (if any)." (symbol-name (epg-context-pinentry-mode context)))) args)) - (coding-system-for-write 'binary) - (coding-system-for-read 'binary) - process-connection-type (process-environment process-environment) (buffer (generate-new-buffer " *epg*")) + error-process process terminal-name agent-file @@ -642,13 +640,24 @@ callback data (if any)." (make-local-variable 'epg-agent-file) (setq epg-agent-file agent-file) (make-local-variable 'epg-agent-mtime) - (setq epg-agent-mtime agent-mtime) - (make-local-variable 'epg-error-output) - (setq epg-error-output nil)) + (setq epg-agent-mtime agent-mtime)) + (setq error-process + (make-pipe-process :name "epg-error" + :buffer (generate-new-buffer " *epg-error*") + ;; Suppress "XXX finished" line. + :sentinel #'ignore + :noquery t)) + (setf (epg-context-error-buffer context) (process-buffer error-process)) (with-file-modes 448 - (setq process (apply #'start-process "epg" buffer - (epg-context-program context) args))) - (set-process-filter process #'epg--process-filter) + (setq process (make-process :name "epg" + :buffer buffer + :command (cons (epg-context-program context) + args) + :connection-type 'pipe + :coding '(binary . binary) + :filter #'epg--process-filter + :stderr error-process + :noquery t))) (setf (epg-context-process context) process))) (defun epg--process-filter (process input) @@ -690,14 +699,7 @@ callback data (if any)." (if (and symbol (fboundp symbol)) (funcall symbol epg-context string))) - (setq epg-last-status (cons status string))) - ;; Record other lines sent to stderr. This assumes - ;; that the process-filter receives output only from - ;; stderr and the FD specified with --status-fd. - (setq epg-error-output - (cons (buffer-substring (point) - (line-end-position)) - epg-error-output))) + (setq epg-last-status (cons status string)))) (forward-line) (setq epg-read-point (point))))))))) @@ -740,15 +742,17 @@ callback data (if any)." (epg-context-set-result-for context 'error (nreverse (epg-context-result-for context 'error))) - (with-current-buffer (process-buffer (epg-context-process context)) - (setf (epg-context-error-output context) - (mapconcat #'identity (nreverse epg-error-output) "\n")))) + (setf (epg-context-error-output context) + (with-current-buffer (epg-context-error-buffer context) + (buffer-string)))) (defun epg-reset (context) "Reset the CONTEXT." (if (and (epg-context-process context) (buffer-live-p (process-buffer (epg-context-process context)))) (kill-buffer (process-buffer (epg-context-process context)))) + (if (buffer-live-p (epg-context-error-buffer context)) + (kill-buffer (epg-context-error-buffer context))) (setf (epg-context-process context) nil) (setf (epg-context-edit-callback context) nil)) commit 24ecbc008f13c9fb18eac6e1895ea83bb70c4139 Author: Paul Eggert Date: Sat Apr 11 13:49:08 2015 -0700 * .gitignore: Ignore doc temps and outputs. diff --git a/.gitignore b/.gitignore index 67d28653..9d32e6b 100644 --- a/.gitignore +++ b/.gitignore @@ -217,6 +217,7 @@ lisp/international/uni-*.el *.ps *.sc *.scs +*.t2d/ *.tg *.tgs *.toc @@ -229,7 +230,8 @@ doc/man/emacs.1 doc/misc/cc-mode.ss etc/DOC etc/refcards/emacsver.tex -info/dir +gnustmp* +/info/ # Version control and locks. *.orig commit fc530e56cf17494be840933fd56534be42fbac45 Author: Paul Eggert Date: Sat Apr 11 13:04:37 2015 -0700 Port commit-msg to MSYS Bash+Gawk See Eli Zaretskii in: http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00610.html * build-aux/git-hooks/commit-msg (cent_sign_utf8_format) (cent_sign, print_at_sign, at_sign): Revert previous change. (print_at_sign): Prepend "BEGIN". (at_sign): Redirect from /dev/null to be safer with pre-POSIX awk. diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 3fc6e19..6e31dbc 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg @@ -29,11 +29,12 @@ fi # Use a UTF-8 locale if available, so that the UTF-8 check works. # Use U+00A2 CENT SIGN to test whether the locale works. -cent_sign='¢' -print_at_sign='{print substr("'$cent_sign'@", 2)}' -at_sign=`$awk "$print_at_sign" 2>/dev/null` +cent_sign_utf8_format='\302\242\n' +cent_sign=`printf "$cent_sign_utf8_format"` +print_at_sign='BEGIN {print substr("'$cent_sign'@", 2)}' +at_sign=`$awk "$print_at_sign" /dev/null` if test "$at_sign" != @; then - at_sign=`LC_ALL=en_US.UTF-8 $awk "$print_at_sign" 2>/dev/null` + at_sign=`LC_ALL=en_US.UTF-8 $awk "$print_at_sign" /dev/null` if test "$at_sign" = @; then LC_ALL=en_US.UTF-8; export LC_ALL fi commit fadf0205ef3e8adfd4ca72e9d1b2f2ab30005bd5 Author: Paul Eggert Date: Sat Apr 11 08:19:13 2015 -0700 Port commit-msg to broken MS-Windows shell * build-aux/git-hooks/commit-msg (cent_sign): Just use UTF-8 here rather than ASCII + printf, as the latter fails on a broken MS-Windows shell. Reported by Eli Zaretskii in: http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00592.html diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index ea8d909..3fc6e19 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg @@ -29,8 +29,7 @@ fi # Use a UTF-8 locale if available, so that the UTF-8 check works. # Use U+00A2 CENT SIGN to test whether the locale works. -cent_sign_utf8_format='\302\242\n' -cent_sign=`printf "$cent_sign_utf8_format"` +cent_sign='¢' print_at_sign='{print substr("'$cent_sign'@", 2)}' at_sign=`$awk "$print_at_sign" 2>/dev/null` if test "$at_sign" != @; then @@ -45,7 +44,7 @@ exec $awk -v at_sign="$at_sign" -v cent_sign="$cent_sign" ' BEGIN { # These regular expressions assume traditional Unix unibyte behavior. # They are needed for old or broken versions of awk, e.g., - # mawk 1.3.3 (1996), Gawk 3.0.4 (1999). + # mawk 1.3.3 (1996), or gawk on MSYS (2015). space = "[ \f\n\r\t\v]" non_space = "[^ \f\n\r\t\v]" non_print = "[\1-\37\177]" commit dc79845aac339db1cdcbbfc48d8f1569ed9a5aa2 Author: Chris Zheng Date: Sat Apr 11 18:06:52 2015 +0300 Support GnuTLS v3.4 and later on MS-Windows * src/gnutls.c (syms_of_gnutls) : New DEFSYM. * lisp/term/w32-win.el (dynamic-library-alist): Determine which GnuTLS DLL to load according to value of libgnutls-version. Fixes: bug#20294 Copyright-paperwork-exempt: yes diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index b5e6ff3..b0667e6 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -214,6 +214,8 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") (defvar libgif-version) (defvar libjpeg-version) +(defvar libgnutls-version) ; gnutls.c + ;;; Set default known names for external libraries (setq dynamic-library-alist (list @@ -266,7 +268,9 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") '(gdk-pixbuf "libgdk_pixbuf-2.0-0.dll") '(glib "libglib-2.0-0.dll") '(gobject "libgobject-2.0-0.dll") - '(gnutls "libgnutls-28.dll" "libgnutls-26.dll") + (if (>= libgnutls-version 30400) + '(gnutls "libgnutls-30.dll") + '(gnutls "libgnutls-28.dll" "libgnutls-26.dll")) '(libxml2 "libxml2-2.dll" "libxml2.dll") '(zlib "zlib1.dll" "libz-1.dll"))) diff --git a/src/gnutls.c b/src/gnutls.c index 35f0eb4..ddd36a9 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -1645,6 +1645,16 @@ DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0, void syms_of_gnutls (void) { + DEFSYM (Qlibgnutls_version, "libgnutls-version"); + Fset (Qlibgnutls_version, +#ifdef HAVE_GNUTLS + make_number (GNUTLS_VERSION_MAJOR * 10000 + + GNUTLS_VERSION_MINOR * 100 + + GNUTLS_VERSION_PATCH) +#else + make_number (-1) +#endif + ); #ifdef HAVE_GNUTLS gnutls_global_initialized = 0; commit 279558f472246dd19864f4175cb1d6061bc1ed92 Author: Paul Eggert Date: Sat Apr 11 07:47:25 2015 -0700 Minor quoting etc. fixes to misc manuals Fix some minor quoting and spacing issues. Distinguish more clearly among grave accent and apostrophe (which are ASCII) and single quote (which is not). Prefer the standard terms "apostrophe" and "grave accent" to alternative names that can be confusing. Use apostrophes to single-quote ASCII text. * doc/misc/remember.texi: Spell the mystic's pseudonym in UTF-8 rather than approximating it in ASCII with grave accent. diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index e2de06d..1f21f82 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -20,7 +20,7 @@ SHELL = @SHELL@ # Where to find the source code. $(srcdir) will be the doc/misc subdirectory -# of the source tree. This is set by configure's `--srcdir' option. +# of the source tree. This is set by configure's '--srcdir' option. srcdir=@srcdir@ ## Where the output files go. diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index 7a2fd9b..177f7cc 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi @@ -110,11 +110,11 @@ The @code{user} is the user name. It's known as @var{:user} in You can use spaces inside a password or other token by surrounding the token with either single or double quotes. -You can use single quotes inside a password or other token by +You can use apostrophes inside a password or other token by surrounding it with double quotes, e.g., @code{"he'llo"}. Similarly you can use double quotes inside a password or other token by surrounding -it with single quotes, e.g., @code{'he"llo'}. You can't mix both (so a -password or other token can't have both single and double quotes). +it with apostrophes, e.g., @code{'he"llo'}. You can't mix both (so a +password or other token can't have both apostrophes and double quotes). All this is optional. You could just say (but we don't recommend it, we're just showing that it's possible) diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 65cbae5..51880d8 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi @@ -331,8 +331,9 @@ character is part of a word. If you want pairing to occur even then, set @vindex skeleton-pair-alist Pairing is possible for all visible characters. By default the parenthesis @samp{(}, the square bracket @samp{[}, the brace -@samp{@{}, the pointed bracket @samp{<} and the backquote @samp{`} all -pair with the symmetrical character. All other characters pair +@samp{@{} and the pointed bracket @samp{<} all +pair with the symmetrical character, and the grave accent @samp{`} +pairs with the apostrophe @samp{'}. All other characters pair themselves. This behavior can be modified by the variable @code{skeleton-pair-alist}. This is in fact an alist of skeletons (@pxref{Skeleton Language}), with the first part of each sublist @@ -341,8 +342,8 @@ but since pairs don't need the @code{str} element, this is ignored. Some modes have bound the command @code{skeleton-pair-insert-maybe} to relevant keys. These modes also configure the pairs as -appropriate. For example, when typing english prose, you'd expect the -backquote (@samp{`}) to pair with the quote (@samp{'}), while in Shell +appropriate. For example, when typing @TeX{} input, you'd expect the +grave accent (@samp{`}) to pair with the apostrophe (@samp{'}), while in Shell script mode it must pair to itself. They can also inhibit pairing in certain contexts. For example an escaped character stands for itself. @@ -626,7 +627,7 @@ See the commentary in @file{tempo.el} for more information on using the Tempo package. @node Hippie Expand -@chapter `Hippie' Expansion +@chapter ``Hippie'' Expansion @findex hippie-expand @kindex M-/ diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 74fb50f..84eb274 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -12,9 +12,9 @@ @c The following macros are used for conditional output for single lines. @c @texline foo -@c `foo' will appear only in TeX output +@c 'foo' will appear only in TeX output @c @infoline foo -@c `foo' will appear only in non-TeX output +@c 'foo' will appear only in non-TeX output @c @expr{expr} will typeset an expression; @c $x$ in TeX, @samp{x} otherwise. @@ -431,7 +431,7 @@ Type @kbd{2 @key{RET} 3 + Q} to compute @noindent Type @kbd{P 2 ^} to compute @texline @math{\pi^2 = 9.86960440109}. -@infoline the value of `pi' squared, 9.86960440109. +@infoline the value of @cpi{} squared, 9.86960440109. @noindent Type @key{TAB} to exchange the order of these two results. @@ -455,7 +455,7 @@ Type @kbd{' sqrt(2+3) @key{RET}} to compute @noindent Type @kbd{' pi^2 @key{RET}} to enter @texline @math{\pi^2}. -@infoline `pi' squared. +@infoline @cpi{} squared. To evaluate this symbolic formula as a number, type @kbd{=}. @noindent @@ -1241,7 +1241,7 @@ finished in two weeks. @c [tutorial] @ifinfo -@c This node is accessed by the `C-x * t' command. +@c This node is accessed by the 'C-x * t' command. @node Interactive Tutorial, Tutorial, Getting Started, Top @chapter Tutorial @@ -2164,7 +2164,7 @@ the prefix. One more way to correct an error is by editing the stack entries. The actual Stack buffer is marked read-only and must not be edited -directly, but you can press @kbd{`} (the backquote or accent grave) +directly, but you can press @kbd{`} (grave accent) to edit a stack entry. Try entering @samp{3.141439} now. If this is supposed to represent @@ -2471,7 +2471,7 @@ We don't have enough space here to show all the zeros! They won't fit on a typical screen, either, so you will have to use horizontal scrolling to see them all. Press @kbd{<} and @kbd{>} to scroll the stack window left and right by half its width. Another way to view -something large is to press @kbd{`} (back-quote) to edit the top of +something large is to press @kbd{`} (grave accent) to edit the top of stack in a separate window. (Press @kbd{C-c C-c} when you are done.) You can enter non-decimal numbers using the @kbd{#} symbol, too. @@ -3658,7 +3658,7 @@ fast! (But of course if you use @kbd{t .} you will lose the ability to get old vectors back using the @kbd{t y} command.) An easy way to view a full vector when @kbd{v .} mode is active is -to press @kbd{`} (back-quote) to edit the vector; editing always works +to press @kbd{`} (grave accent) to edit the vector; editing always works with the full, unabbreviated value. @cindex Least-squares for fitting a straight line @@ -6012,7 +6012,7 @@ fix, though: @end smallexample @noindent -When we type @kbd{Z `} (that's a back-quote character), Calc saves +When we type @kbd{Z `} (that's a grave accent), Calc saves its mode settings and the contents of the ten ``quick variables'' for later reference. When we type @kbd{Z '} (that's an apostrophe now), Calc restores those saved values. Thus the @kbd{p 4} and @@ -9042,7 +9042,7 @@ matrix (or other value) to the power @expr{n} in only @texline @math{\log_2 n} @infoline @expr{log(n,2)} steps. For example, this program can compute the 1000th Fibonacci -number (a 209-digit integer!) in about 10 steps; even though the +number (a 209-digit integer!)@: in about 10 steps; even though the @kbd{Z < ... Z >} solution had much simpler steps, it would have required so many steps that it would not have been practical. @@ -10029,7 +10029,7 @@ this would be to fix a typo, as the full Emacs cursor motion and editing keys are available during algebraic entry but not during numeric entry. In the same vein, during either numeric or algebraic entry you can -press @kbd{`} (backquote) to switch to @code{calc-edit} mode, where +press @kbd{`} (grave accent) to switch to @code{calc-edit} mode, where you complete your half-finished entry in a separate buffer. @xref{Editing Stack Entries}. @@ -10174,7 +10174,7 @@ an ASCII character. For example, the quoted character @samp{"x"} produces the vector result @samp{[120]} (because 120 is the ASCII code of the lower-case -`x'; @pxref{Strings}). Since this is a vector, not an integer, it +``x''; @pxref{Strings}). Since this is a vector, not an integer, it is displayed only according to the current mode settings. But running Quick Calc again and entering @samp{120} will produce the result @samp{120 (16#78, 8#170, x)} which shows the number in its @@ -11871,10 +11871,10 @@ the stack objects at the levels determined by the point and the mark. @cindex Editing the stack with Emacs The @kbd{`} (@code{calc-edit}) command creates a temporary buffer (@file{*Calc Edit*}) for editing the top-of-stack value using regular -Emacs commands. Note that @kbd{`} is a backquote, not a quote. With a -numeric prefix argument, it edits the specified number of stack entries -at once. (An argument of zero edits the entire stack; a negative -argument edits one specific stack entry.) +Emacs commands. Note that @kbd{`} is a grave accent, not an apostrophe. +With a numeric prefix argument, it edits the specified number of stack +entries at once. (An argument of zero edits the entire stack; a +negative argument edits one specific stack entry.) When you are done editing, press @kbd{C-c C-c} to finish and return to Calc. The @key{RET} and @key{LFD} keys also work to finish most @@ -13609,11 +13609,11 @@ Weekday: ``Sunday'' for Sunday. @item Iww Week number: ISO 8601 week number, ``W01'' for week 1. @item d -Day of year: ``34'' for Feb. 3. +Day of year: ``34'' for Feb.@: 3. @item ddd -Day of year: ``034'' for Feb. 3. +Day of year: ``034'' for Feb.@: 3. @item bdd -Day of year: `` 34'' for Feb. 3. +Day of year: `` 34'' for Feb.@: 3. @item T Letter: Literal ``T''. @item h @@ -19228,7 +19228,7 @@ non-empty sets, respectively. The @kbd{k p} (@code{calc-prime-test}) command checks if the integer on the top of the stack is prime. For integers less than eight million, the answer is always exact and reasonably fast. For larger integers, a -probabilistic method is used (see Knuth vol. II, section 4.5.4, algorithm P). +probabilistic method is used (see Knuth vol.@: II, section 4.5.4, algorithm P). The number is first checked against small prime factors (up to 13). Then, any number of iterations of the algorithm are performed. Each step either discovers that the number is non-prime, or substantially increases the @@ -31848,7 +31848,7 @@ local variables inside the macro should not affect any variables outside the macro. The @kbd{Z `} (@code{calc-kbd-push}) and @kbd{Z '} (@code{calc-kbd-pop}) commands give you both of these capabilities. -When you type @kbd{Z `} (with a backquote or accent grave character), +When you type @kbd{Z `} (with a grave accent), the values of various mode settings are saved away. The ten ``quick'' variables @code{q0} through @code{q9} are also saved. When you type @w{@kbd{Z '}} (with an apostrophe), these values are restored. @@ -34284,7 +34284,7 @@ you can call it again with the same @var{n} to get a greater certainty; @defun to-simple-fraction f If @var{f} is a floating-point number which can be represented exactly -as a small rational number. return that number, else return @var{f}. +as a small rational number, return that number, else return @var{f}. For example, 0.75 would be converted to 3:4. This function is very fast. @end defun diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 068706a..b86df18 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -88,7 +88,7 @@ the second with them pointing to the XEmacs manuals. @c The following four macros generate the filenames and titles of the @c main (X)Emacs manual and the Elisp/Lispref manual. Leave the -@c Texinfo variable `XEMACS' unset to generate a GNU Emacs version, set it +@c Texinfo variable 'XEMACS' unset to generate a GNU Emacs version, set it @c to generate an XEmacs version, e.g., with @c "makeinfo -DXEMACS cc-mode.texi". @ifset XEMACS @@ -1156,7 +1156,7 @@ When this is enabled (which it normally is), indentation commands such as @kbd{C-j} indent lines of code according to their syntactic structure. Otherwise, a line is simply indented to the same level as the previous one and @kbd{@key{TAB}} adjusts the indentation in steps -of `c-basic-offset'. +of @code{c-basic-offset}. @end table Full details on how these minor modes work are at @ref{Electric Keys}, @@ -2045,7 +2045,7 @@ conflict). The value may also be an association list to specify different comment styles for different languages. The symbol for the major mode is then looked up in the alist, and the value of that element is interpreted as -above if found. If it isn't found then the symbol `other' is looked up +above if found. If it isn't found then the symbol @code{other} is looked up and its value is used instead. The default value for @code{c-doc-comment-style} is @@ -3299,7 +3299,7 @@ only the symbol @code{after}, then the brace hangs on the right side of the line, as in: @example -// here, open braces always `hang' +// here, open braces always 'hang' void spam( int i ) @{ if( i == 7 ) @{ dosomething(i); @@ -3992,7 +3992,7 @@ Hitting @kbd{C-c C-s} on line 4 gives us: @cindex substatement block @noindent which tells us that this is a brace that @emph{opens} a substatement -block. @footnote{A @dfn{substatement} is the line after a +block.@footnote{A @dfn{substatement} is the line after a conditional statement, such as @code{if}, @code{else}, @code{while}, @code{do}, @code{switch}, etc. A @dfn{substatement block} is a brace block following one of these conditional statements.} @@ -4765,10 +4765,10 @@ covered are illustrated by this C++ example: 2: const 3: @{ 4: /* this line starts a multiline - 5: * comment. This line should get `c' syntax */ + 5: * comment. This line should get 'c' syntax */ 6: 7: char* a_multiline_string = "This line starts a multiline \ - 8: string. This line should get `string' syntax."; + 8: string. This line should get 'string' syntax."; 9: 10: note: 11: @{ @@ -7174,7 +7174,7 @@ Emacs Lisp code that triggers the bug and include it in your report. @cindex bug report mailing list Bug reports should be sent to @email{bug-cc-mode@@gnu.org}. You can -also send other questions and suggestions (kudos? @t{;-)} to that +also send other questions and suggestions (kudos?@: @t{;-)} to that address. It's a mailing list which you can join or browse an archive of; see the web site at @uref{http://cc-mode.sourceforge.net/} for further details. diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index c6076ba..00e47b9 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -570,20 +570,20 @@ When @file{foo.el} is compiled, these variables will be set during the compilation itself: @example -foo1 foo3 foo5 foo7 ; `compile' +foo1 foo3 foo5 foo7 ; 'compile' @end example When @file{foo.elc} is loaded, these variables will be set: @example -foo2 foo3 foo6 foo7 ; `load' +foo2 foo3 foo6 foo7 ; 'load' @end example And if @file{foo.el} is loaded uncompiled, these variables will be set: @example -foo4 foo5 foo6 foo7 ; `eval' +foo4 foo5 foo6 foo7 ; 'eval' @end example If these seven @code{cl-eval-when}s had been, say, inside a @code{defun}, @@ -978,7 +978,7 @@ a The generalized variable @code{buffer-substring}, listed above, also works in this way by replacing a portion of the current buffer. -@c FIXME? Also `eq'? (see cl-lib.el) +@c FIXME? Also 'eq'? (see cl-lib.el) @c Currently commented out in cl.el. @ignore diff --git a/doc/misc/ebrowse.texi b/doc/misc/ebrowse.texi index 943b98d..1b24007 100644 --- a/doc/misc/ebrowse.texi +++ b/doc/misc/ebrowse.texi @@ -973,7 +973,7 @@ displayed in the member buffer. @cindex @code{public} members @item F a u This command toggles the display of @code{public} members. The -@samp{a} stands for `access'. +@samp{a} stands for ``access''. @cindex @code{protected} members @item F a o diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi index ecf1d03..dfe22b7 100644 --- a/doc/misc/ede.texi +++ b/doc/misc/ede.texi @@ -868,7 +868,7 @@ It would look like this: (defun MY-ROOT-FCN () "Return the root fcn for `default-directory'" - ;; You might be able to use `ede-cpp-root-project-root' + ;; You might be able to use 'ede-cpp-root-project-root' ;; and not write this at all. ) @@ -1856,7 +1856,7 @@ Preprocessor symbols will be used while parsing your files. These macros might be passed in through the command line compiler, or are critical symbols derived from header files. Providing header files macro values through this slot improves accuracy and performance. -Use `:spp-files' to use these files directly. +Use @code{:spp-files} to use these files directly. @item :spp-files Type: @code{list} @* @@ -2799,7 +2799,7 @@ Default Value: @code{t} Non @code{nil} means the rule created is part of the all target. Setting this to @code{nil} creates the rule to build this item, but does not -include it in the ALL`all:' rule. +include it in the @code{all:} rule. @item :configuration-variables Type: @code{list} @* @@ -3457,7 +3457,7 @@ Return the variable name for @var{THIS}'s sources. @deffn Method ede-proj-makefile-insert-dist-dependencies :AFTER this Insert any symbols that the DIST rule should depend on. -Texinfo files want to insert generated `.info' files. +Texinfo files want to insert generated @file{.info} files. Argument @var{THIS} is the target which needs to insert an info file. @end deffn @@ -3473,7 +3473,7 @@ files in the project. @deffn Method ede-proj-makefile-insert-dist-filepatterns :AFTER this Insert any symbols that the DIST rule should depend on. -Texinfo files want to insert generated `.info' files. +Texinfo files want to insert generated @file{.info} files. Argument @var{THIS} is the target which needs to insert an info file. @end deffn diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index 36c6ae2..de54f28 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -556,9 +556,9 @@ Makes the next difference region current. @kindex j Makes the very first difference region current. -@kbd{-j} makes the last region current. Typing a number, N, and then `j' +@kbd{-j} makes the last region current. Typing a number, N, and then @kbd{j} makes the difference region N current. Typing @minus{}N (a negative number) then -`j' makes current the region Last @minus{} N. +@kbd{j} makes current the region Last @minus{} N. @item ga @kindex ga @@ -615,8 +615,8 @@ no longer current, due to user editing. @item m @kindex m Displays the current Ediff session in a frame as wide as the physical -display. This is useful when comparing files side-by-side. Typing `m' again -restores the original size of the frame. +display. This is useful when comparing files side-by-side. +Typing @kbd{m} again restores the original size of the frame. @item | @kindex | @@ -675,7 +675,7 @@ Tell Ediff to skip over regions that disagree among themselves only in the amount of white space and line breaks. Even though such regions will be skipped over, you can still jump to any -one of them by typing the region number and then `j'. Typing @kbd{##} +one of them by typing the region number and then @kbd{j}. Typing @kbd{##} again puts Ediff back in the original state. @item #c @@ -695,7 +695,8 @@ and @code{ediff-ignore-case}, which are explained elsewhere. Ediff works hard to ameliorate the effects of boredom in the workplace... Quite often differences are due to identical replacements (e.g., the word -`foo' is replaced with the word `bar' everywhere). If the number of regions +``foo'' is replaced with the word ``bar'' everywhere). If the number +of regions with such boring differences exceeds your tolerance threshold, you may be tempted to tell Ediff to skip these regions altogether (you will still be able to jump to them via the command @kbd{j}). The above commands, @kbd{#h} @@ -750,7 +751,7 @@ You can then restart any of these sessions by either clicking on a session record or by putting the cursor over it and then typing the return key. (Some poor souls leave so many active Ediff sessions around that they lose -track of them completely... The `R' command is designed to save these +track of them completely... The @kbd{R} command is designed to save these people from the recently discovered Ediff Proficiency Syndrome.) Typing @kbd{R} brings up Ediff Registry only if it is typed into an Ediff @@ -800,8 +801,8 @@ is that this difference region in buffer A is as old as that in the ancestor buffer, so the contents of that region in buffer B represents real change. -You may want to ignore such `obvious' merges and concentrate on difference -regions where both files `clash' with the ancestor, since this means that +You may want to ignore such ``obvious'' merges and concentrate on difference +regions where both files ``clash'' with the ancestor, since this means that two different people have been changing this region independently and they had different ideas on how to do this. @@ -818,10 +819,10 @@ precisely this. To be more precise, this toggles the check for whether the current merge is identical to its default setting, as originally decided by Ediff. For -instance, if Ediff is merging according to the `combined' policy, then the +instance, if Ediff is merging according to the ``combined'' policy, then the merge region is skipped over if it is different from the combination of the regions in buffers A and B@. (Warning: swapping buffers A and B will confuse -things in this respect.) If the merge region is marked as `prefer-A' then +things in this respect.) If the merge region is marked as ``prefer-A'' then this region will be skipped if it differs from the current difference region in buffer A, etc. @@ -851,7 +852,7 @@ corresponding region from buffer B. @item s @kindex s Causes the merge window shrink to its minimum size, thereby exposing as much -of the variant buffers as possible. Typing `s' again restores +of the variant buffers as possible. Typing @kbd{s} again restores the original size of that window. With a positive prefix argument, this command enlarges the merge window. @@ -1164,7 +1165,7 @@ customization and faces) can be done by putting appropriate lines in @file{.Xdefaults}, @file{.xrdb}, or whatever X resource file is in use. With respect to the latter, please note that the X resource -for Ediff customization is `Ediff', @emph{not} `emacs'. +for Ediff customization is ``Ediff'', @emph{not} ``emacs''. @xref{Window and Frame Configuration}, @xref{Highlighting Difference Regions}, for further details. Please also refer to Emacs manual for the information on how to set Emacs X resources. @@ -1510,7 +1511,7 @@ We shall call these regular expressions @var{regexp-A}, @var{regexp-B} and @var{regexp-C}. Ediff will then start stepping through only those difference regions where the region in buffer A matches @var{regexp-A} and/or the region in -buffer B matches @var{regexp-B}, etc. Whether `and' or `or' will be used +buffer B matches @var{regexp-B}, etc. Whether ``and'' or ``or'' will be used depends on how you respond to a question. When scanning difference regions for the aforesaid regular expressions, @@ -1888,10 +1889,11 @@ Otherwise, you may have to tune the values of the variables @item ediff-patch-options Options to pass to @code{ediff-patch-program}. -Note: the `-b' and `-z' options should be specified in -`ediff-backup-specs', not in @code{ediff-patch-options}. +Note: the @option{-b} and @option{-z} options should be specified in +@code{ediff-backup-specs}, not in @code{ediff-patch-options}. -It is recommended to pass the `-f' option to the patch program, so it won't +It is recommended to pass the @option{-f} option to the patch program, +so it won't ask questions. However, some implementations don't accept this option, in which case the default value of this variable should be changed. @@ -1901,19 +1903,23 @@ Backup extension used by the patch program. Must be specified, even if @item ediff-backup-specs Backup directives to pass to the patch program. Ediff requires that the old version of the file (before applying the patch) -is saved in a file named @file{the-patch-file.extension}. Usually -`extension' is `.orig', but this can be changed by the user, and may also be +is saved in a file named @file{the-patch-file.@var{extension}}. +Usually @var{extension} is @file{.orig}, but this can be changed by +the user, and may also be system-dependent. Therefore, Ediff needs to know the backup extension used by the patch program. -Some versions of the patch program let the user specify `-b backup-extension'. -Other versions only permit `-b', which (usually) assumes the extension `.orig'. -Yet others force you to use `-z'. +Some versions of the patch program let the user specify @option{-b +@var{extension}} to specify a backup file name extension. Other +versions only permit @option{-b}, which (usually) assumes the +extension @file{.orig}. Yet others force you to use +@option{-z@var{extension}}. -Note that both `ediff-backup-extension' and `ediff-backup-specs' must be -properly set. If your patch program takes the option `-b', but not -`-b extension', the variable `ediff-backup-extension' must still -be set so Ediff will know which extension to use. +Both @code{ediff-backup-extension} and @var{ediff-backup-specs} must +be properly set. If your patch program takes the option @option{-b}, +but not @option{-b @var{extension}}, the variable +@code{ediff-backup-extension} must still be set so Ediff will know +which extension to use. @item ediff-custom-diff-program @itemx ediff-custom-diff-options @@ -2105,7 +2111,7 @@ typing @kbd{s}. This change is temporary, until Ediff finds a reason to redraw the screen. Typing @kbd{s} again restores the original window size. With a positive prefix argument, the @kbd{s} command will make the merge -window slightly taller. This change is persistent. With `@kbd{-}' or +window slightly taller. This change is persistent. With ``@kbd{-}'' or with a negative prefix argument, the command @kbd{s} makes the merge window slightly shorter. This change also persistent. diff --git a/doc/misc/edt.texi b/doc/misc/edt.texi index aa0ef63..c72aca2 100644 --- a/doc/misc/edt.texi +++ b/doc/misc/edt.texi @@ -710,7 +710,7 @@ functions are bound to @key{F7}, @key{F8}, @kbd{GOLD-F8}, @key{F9}, @item The original EDT emulation package set up many default regular and GOLD -bindings. We tried to preserve most (but not all!) of these, so users +bindings. We tried to preserve most (but not all!)@: of these, so users of the original emulation package will feel more at home. Nevertheless, there are still many GOLD key sequences which are not diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi index ab5eb06..566a6d7 100644 --- a/doc/misc/efaq-w32.texi +++ b/doc/misc/efaq-w32.texi @@ -22,7 +22,7 @@ Copyright @copyright{} 2008, 2010-2015 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 +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 @@ -594,7 +594,7 @@ Subject: Re: Re[2]: problem with caps/ctrl swap on NT 4.0 @smallexample 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). +bypassing mappings that you've done at a higher level (i.e., it just works). Here's the format of the value: @@ -674,7 +674,7 @@ 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 +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 @@ -2029,8 +2029,8 @@ select it. For arguments, use @option{+$(CurLine)} (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.) +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 diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index cdf9440..9fc8cfc 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -3670,7 +3670,7 @@ for deleting the previous character outside of Emacs. On many Unix systems, this command will remap @key{DEL}: @example -stty erase `^?' +stty erase '^?' @end example @item @@ -3766,8 +3766,8 @@ You can swap two keys (or key sequences) by using the into @key{DEL} and @key{DEL} to @kbd{C-h}, use @lisp -(keyboard-translate ?\C-h ?\C-?) ; translate `C-h' to DEL -(keyboard-translate ?\C-? ?\C-h) ; translate DEL to `C-h'. +(keyboard-translate ?\C-h ?\C-?) ; translate 'C-h' to DEL +(keyboard-translate ?\C-? ?\C-h) ; translate DEL to 'C-h'. @end lisp @noindent diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index f17fd31..fe0b326 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi @@ -233,7 +233,7 @@ first argument, and this one must be an @eieio{} type. @item Support for metaclasses There is just one default metaclass, @code{eieio-default-superclass}, and you cannot define your own. The @code{:metaclass} tag in -@code{defclass} is ignored. Also, functions like `find-class', which +@code{defclass} is ignored. Also, functions like @code{find-class}, which should return instances of the metaclass, behave differently in @eieio{} in that they return symbols or plain structures instead. diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index 3a86e1b..9cdfe77 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -266,54 +266,54 @@ This is a summary of keystrokes available in every ERC buffer. @table @kbd -@item C-a or (`erc-bol') +@item C-a or (@code{erc-bol}) Go to beginning of line or end of prompt. -@item RET (`erc-send-current-line') +@item RET (@code{erc-send-current-line}) Send the current line -@item TAB (`erc-complete-word') +@item TAB (@code{erc-complete-word}) If at prompt, complete the current word. Otherwise, move to the next link or button. -@item M-TAB (`ispell-complete-word') +@item M-TAB (@code{ispell-complete-word}) Complete the given word, using ispell. -@item C-c C-a (`erc-bol') +@item C-c C-a (@code{erc-bol}) Go to beginning of line or end of prompt. -@item C-c C-b (`erc-iswitchb') -Use `iswitchb-read-buffer' to prompt for a ERC buffer to switch to. +@item C-c C-b (@code{erc-iswitchb}) +Use @code{iswitchb-read-buffer} to prompt for a ERC buffer to switch to. -@item C-c C-c (`erc-toggle-interpret-controls') +@item C-c C-c (@code{erc-toggle-interpret-controls}) Toggle interpretation of control sequences in messages. -@item C-c C-d (`erc-input-action') +@item C-c C-d (@code{erc-input-action}) Interactively input a user action and send it to IRC. -@item C-c C-e (`erc-toggle-ctcp-autoresponse') +@item C-c C-e (@code{erc-toggle-ctcp-autoresponse}) Toggle automatic CTCP replies (like VERSION and PING). -@item C-c C-f (`erc-toggle-flood-control') +@item C-c C-f (@code{erc-toggle-flood-control}) Toggle use of flood control on sent messages. -@item C-c TAB (`erc-invite-only-mode') +@item C-c TAB (@code{erc-invite-only-mode}) Turn on the invite only mode (+i) for the current channel. -@item C-c C-j (`erc-join-channel') +@item C-c C-j (@code{erc-join-channel}) Join channel. If point is at the beginning of a channel name, use that as default. -@item C-c C-k (`erc-go-to-log-matches-buffer') +@item C-c C-k (@code{erc-go-to-log-matches-buffer}) Interactively open an erc-log-matches buffer -@item C-c C-l (`erc-save-buffer-in-logs') +@item C-c C-l (@code{erc-save-buffer-in-logs}) Append buffer contents to the log file, if logging is enabled. -@item C-c C-n (`erc-channel-names') +@item C-c C-n (@code{erc-channel-names}) Run "/names #channel" in the current channel. -@item C-c C-o (`erc-get-channel-mode-from-keypress') +@item C-c C-o (@code{erc-get-channel-mode-from-keypress}) Read a key sequence and call the corresponding channel mode function. After doing @kbd{C-c C-o}, type in a channel mode letter. @@ -321,22 +321,22 @@ After doing @kbd{C-c C-o}, type in a channel mode letter. @kbd{RET} lets you type more than one mode at a time. If @kbd{l} is pressed, @code{erc-set-channel-limit} gets called. If @kbd{k} is pressed, @code{erc-set-channel-key} gets called. -Anything else will be sent to `erc-toggle-channel-mode'. +Anything else will be sent to @code{erc-toggle-channel-mode}. -@item C-c C-p (`erc-part-from-channel') +@item C-c C-p (@code{erc-part-from-channel}) Part from the current channel and prompt for a reason. -@item C-c C-q (`erc-quit-server') +@item C-c C-q (@code{erc-quit-server}) Disconnect from current server after prompting for reason. -@item C-c C-r (`erc-remove-text-properties-region') +@item C-c C-r (@code{erc-remove-text-properties-region}) Clears the region (start,end) in object from all colors, etc. -@item C-c C-t (`erc-set-topic') +@item C-c C-t (@code{erc-set-topic}) Prompt for a topic for the current channel. -@item C-c C-u (`erc-kill-input') -Kill current input line using `erc-bol' followed by `kill-line'. +@item C-c C-u (@code{erc-kill-input}) +Kill current input line using @code{erc-bol} followed by @code{kill-line}. @end table diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index 51e9586..710ebbb 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi @@ -822,7 +822,7 @@ functions. While fixtures are a useful syntactic simplification in other languages, this does not apply to Lisp, where higher-order functions -and `unwind-protect' are available. One way to implement and use a +and @code{unwind-protect} are available. One way to implement and use a fixture in ERT is @lisp @@ -851,7 +851,7 @@ be added but would provide only a minor simplification. (If you are interested in such syntax, note that splitting set-up and tear-down into separate functions, like *Unit tools usually do, makes -it impossible to establish dynamic `let' bindings as part of the +it impossible to establish dynamic @code{let} bindings as part of the fixture. So, blindly imitating the way fixtures are implemented in other languages would be counter-productive in Lisp.) diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 4ed894e..beaa24a 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -250,7 +250,7 @@ need to use a function that takes some other data type, you will need to call it in an Elisp expression (which can also be used with @ref{Expansion, expansions}). As with other shells, you can escape special characters and spaces with the backslash (@code{\}) and -the single (@code{''}) and double (@code{""}) quotes. +apostrophes (@code{''}) and double quotes (@code{""}). @node Built-ins @@ -1146,7 +1146,7 @@ auto-revert mode in that buffer at frequent intervals---and a @item Make @command{dgrep} load @code{dired}, mark everything, then invoke @code{dired-do-search} -@item Write mesh.c +@item Write @file{mesh.c} This would run Emacs with the appropriate arguments to invoke Eshell only. That way, it could be listed as a login shell. @@ -1155,7 +1155,8 @@ only. That way, it could be listed as a login shell. @item Auto-detect when a command is visual, by checking @code{TERMCAP} usage -@item The first keypress after @kbd{M-x watson} triggers `eshell-send-input' +@item The first keypress after @kbd{M-x watson} triggers +@code{eshell-send-input} @item Make @kbd{/} electric diff --git a/doc/misc/eudc.texi b/doc/misc/eudc.texi index 76a25c1..7ab444c 100644 --- a/doc/misc/eudc.texi +++ b/doc/misc/eudc.texi @@ -416,7 +416,7 @@ may be specified by appending a colon and a number to the name of the server. You will not need this unless your server runs on a port other than the default (which depends on the protocol). If the directory server resides on your own computer (which is the case -if you use the BBDB back end) then `localhost' is a reasonable value but +if you use the BBDB back end) then @samp{localhost} is a reasonable value but it will be ignored anyway. @end defvar @@ -829,11 +829,11 @@ trying to perform an inline query. Possible values are: Only the current directory server is tried @item hotlist The servers in the hotlist are tried in order until one finds a match -for the query or `eudc-max-servers-to-query' is reached +for the query or @code{eudc-max-servers-to-query} is reached @item server-then-hotlist The current server then the servers in the hotlist are tried in the order they appear in the hotlist until one of them finds a match or -`eudc-max-servers-to-query' is reached. This is the default. +@code{eudc-max-servers-to-query} is reached. This is the default. @end table @end defvar diff --git a/doc/misc/forms.texi b/doc/misc/forms.texi index 433009c..ab284bd 100644 --- a/doc/misc/forms.texi +++ b/doc/misc/forms.texi @@ -854,7 +854,7 @@ number of records actually present in the data file. @item Problem saving buffers? An error occurred while saving the data file buffer. Most likely, Emacs did ask to confirm deleting the buffer because it had been modified, and -you said `no'. +you said ``no''. @end table @node Long Example diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index 8eb7c77..8126827 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -1112,7 +1112,7 @@ resulting in: :O \-> ... | 115 |Raymond Scholz | 1:24 :O \-> ... | 19 |Lars Magne Ingebrigt |15:33 :O Slow mailing list | 13 |Lars Magne Ingebrigt |Sat 23:49 -:O Re: `@@' mark not documented | 13 |Lars Magne Ingebrigt |Sat 23:50 +:O Re: '@@' mark not documented | 13 |Lars Magne Ingebrigt |Sat 23:50 :R > Re: Gnus still doesn't count messages prope| 23 |Lars Magne Ingebrigt |Sat 23:57 :O \-> ... | 18 |Kai Grossjohann | 0:35 :O \-> ... | 13 |Lars Magne Ingebrigt | 0:56 @@ -1501,7 +1501,7 @@ entries. Say @samp{c} to create a new entry, @samp{b} to search your BBDB and @samp{C-o} to add a new field to an entry. If you want to add a sender to the BBDB you can -also just hit `:' on the posting in the summary buffer and +also just hit @kbd{:} on the posting in the summary buffer and you are done. When you now compose a new mail, hit @samp{TAB} to cycle through know recipients. diff --git a/doc/misc/gnus-news.el b/doc/misc/gnus-news.el index 81986f2..ba8a463 100644 --- a/doc/misc/gnus-news.el +++ b/doc/misc/gnus-news.el @@ -85,7 +85,7 @@ paragraph-separate: \"[ ]*$\"\nend:\n") (infile (concat dir infile)) (buffer (find-file-noselect (concat dir outfile)))) (with-temp-buffer - ;; Could be done using `texinfmt' stuff as in `infohack.el'. + ;; Could be done using 'texinfmt' stuff as in 'infohack.el'. (insert (shell-command-to-string (concat gnus-news-makeinfo-command " " @@ -102,7 +102,7 @@ paragraph-separate: \"[ ]*$\"\nend:\n") (save-excursion (while (re-search-forward "^ " nil t) (replace-match ""))) - ;; Avoid `*' from @ref at beginning of line: + ;; Avoid '*' from @ref at beginning of line: (save-excursion (while (re-search-forward "^\\*Note" nil t) (replace-match " \\&"))) diff --git a/doc/misc/gnus-news.texi b/doc/misc/gnus-news.texi index c5b96e7..ef6573f 100644 --- a/doc/misc/gnus-news.texi +++ b/doc/misc/gnus-news.texi @@ -13,8 +13,8 @@ @c carry prominent notices stating who last changed them. @c This file contains a list of news features Gnus. It is supposed to be -@c included in `gnus.texi'. `GNUS-NEWS' is automatically generated from -@c this file (see `gnus-news.el'). +@c included in 'gnus.texi'. 'GNUS-NEWS' is automatically generated from +@c this file (see 'gnus-news.el'). @itemize @bullet diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index ed4d1a5..97e56e1 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -11913,8 +11913,8 @@ controlling variable is a predicate list, as described above. @ifinfo @c Avoid sort of redundant entries in the same section for the printed -@c manual, but add them in info to allow `i gnus-treat-foo-bar RET' or -@c `i foo-bar'. +@c manual, but add them in info to allow 'i gnus-treat-foo-bar RET' or +@c 'i foo-bar'. @vindex gnus-treat-buttonize @vindex gnus-treat-buttonize-head @vindex gnus-treat-capitalize-sentences @@ -14987,7 +14987,7 @@ this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5}, @samp{cram-md5}, @samp{anonymous} or the default @samp{login}. @item :program -When using the `shell' :stream, the contents of this variable is +When using the @samp{shell} :stream, the contents of this variable is mapped into the @code{imap-shell-program} variable. This should be a @code{format}-like string (or list of strings). Here's an example: @@ -17768,7 +17768,7 @@ So you send a ``reminder'' message (actually, a diary one) to yourself. @item You forget all about it and keep on getting and reading new mail, as usual. @item -From time to time, as you type `g' in the group buffer and as the date +From time to time, as you type @kbd{g} in the group buffer and as the date is getting closer, the message will pop up again to remind you of your appointment, just as if it were new and unread. @item @@ -19648,7 +19648,7 @@ Immediately scoring. @end table @item -If you are scoring on `e' (extra) headers, you will then be prompted for +If you are scoring on @samp{e} (extra) headers, you will then be prompted for the header name on which you wish to score. This must be a header named in gnus-extra-headers, and @samp{TAB} completion is available. @@ -21354,8 +21354,8 @@ variable. To work correctly the @code{nnir-namazu-remove-prefix} variable must also be correct. This is the prefix to remove from each file name -returned by Namazu in order to get a proper group name (albeit with `/' -instead of `.'). +returned by Namazu in order to get a proper group name (albeit with @samp{/} +instead of @samp{.}). For example, suppose that Namazu returns file names such as @samp{/home/john/Mail/mail/misc/42}. For this example, use the @@ -21368,18 +21368,20 @@ correct group name @samp{mail.misc}. Extra switches may be passed to the namazu search command by setting the variable @code{nnir-namazu-additional-switches}. It is particularly important not to pass any any switches to namazu that will change the -output format. Good switches to use include `--sort', `--ascending', -`--early' and `--late'. Refer to the Namazu documentation for further +output format. Good switches to use include @option{--sort}, +@option{--ascending}, @option{--early} and @option{--late}. +Refer to the Namazu documentation for further information on valid switches. -Mail must first be indexed with the `mknmz' program. Read the documentation -for namazu to create a configuration file. Here is an example: +Mail must first be indexed with the @command{mknmz} program. Read the +documentation for namazu to create a configuration file. Here is an +example: @cartouche @example package conf; # Don't remove this line! - # Paths which will not be indexed. Don't use `^' or `$' anchors. + # Paths which will not be indexed. Don't use '^' or '$' anchors. $EXCLUDE_PATH = "spam|sent"; # Header fields which should be searchable. case-insensitive @@ -21451,7 +21453,7 @@ when searching all groups on a server. @item nnir-summary-line-format The format specification to be used for lines in an nnir summary buffer. -All the items from `gnus-summary-line-format' are available, along with +All the items from @code{gnus-summary-line-format} are available, along with three items unique to nnir summary buffers: @example @@ -21465,7 +21467,7 @@ If @code{nil} (the default) this will use @code{gnus-summary-line-format}. @item nnir-retrieve-headers-override-function If non-@code{nil}, a function that retrieves article headers rather than using the gnus built-in function. This function takes an article list and -group as arguments and populates the `nntp-server-buffer' with the +group as arguments and populates the @code{nntp-server-buffer} with the retrieved headers. It should then return either 'nov or 'headers indicating the retrieved header format. Failure to retrieve headers should return @code{nil}. @@ -26124,10 +26126,10 @@ their @code{:char} property, or showing the marks as full strings. @lisp ;; show the marks as single characters (see the :char property in -;; `gnus-registry-marks'): +;; 'gnus-registry-marks'): ;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars) -;; show the marks by name (see `gnus-registry-marks'): +;; show the marks by name (see 'gnus-registry-marks'): ;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names) @end lisp @@ -27817,7 +27819,7 @@ As a result of the following change, the @file{~/News/overview/} directory is not used any more. You can safely delete the entire hierarchy. -@c FIXME: `gnus-load' is mentioned in README, which is not included in +@c FIXME: 'gnus-load' is mentioned in README, which is not included in @c the repository. We should find a better place for this item. @item @code{(require 'gnus-load)} diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index 496674c..ca449e4 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi @@ -129,7 +129,7 @@ Completion Actions * Block Boundary Check:: Is the END statement correct? -* Padding Operators:: Enforcing space around `=' etc +* Padding Operators:: Enforcing space around @samp{=} etc * Case Changes:: Enforcing upper case keywords The IDLWAVE Shell @@ -501,7 +501,7 @@ plot_wday,1,1 @noindent and press @key{RET}. This fails with an error message telling you the @code{YT} keyword to plot is ambiguous. What are the allowed keywords again? Go back to the source window and put the cursor into -the `plot' line and press @kbd{C-c ?}. This shows the routine info +the ``plot'' line and press @kbd{C-c ?}. This shows the routine info window for the plot routine, which contains a list of keywords, along with the argument list. Oh, we wanted @code{YTITLE}. Fix that up. Recompile with @kbd{C-c C-d C-c}. Jump back into the shell with @@ -608,7 +608,7 @@ Group}. Here you'll be presented with all the various variables grouped into categories. You can navigate the hierarchy (e.g., @samp{IDLWAVE Code Formatting->Idlwave Abbrev And Indent Action->Idlwave Expand Generic End} to turn on @code{END} expansion), read about the variables, -change them, and `Save for Future Sessions'. Few of these variables +change them, and ``Save for Future Sessions''. Few of these variables need customization, but you can exercise considerable control over IDLWAVE's functionality with them. @@ -705,7 +705,7 @@ library: a=readf@key{M-@key{TAB}} @end example -expands to `readfits('. Then try +expands to ``readfits(''. Then try @example a=readfits(@key{C-c ?} @@ -1599,7 +1599,7 @@ completed keywords. @defopt idlwave-function-completion-adds-paren (@code{t}) Non-@code{nil} means completion automatically adds @samp{(} after -completed function. A value of `2' means also add the closing +completed function. A value of 2 means also add the closing parenthesis and position the cursor between the two. @end defopt @@ -2121,7 +2121,7 @@ settings are described below and set separately. @menu * Block Boundary Check:: Is the END statement correct? -* Padding Operators:: Enforcing space around `=' etc +* Padding Operators:: Enforcing space around @samp{=} etc * Case Changes:: Enforcing upper case keywords @end menu @@ -2490,7 +2490,7 @@ The frame parameters for a dedicated idlwave-shell frame. @end defopt @defopt idlwave-shell-raise-frame (@code{t}) -Non-@code{nil} means `idlwave-shell' raises the frame showing the shell +Non-@code{nil} means @code{idlwave-shell} raises the frame showing the shell window. @end defopt @@ -3943,7 +3943,7 @@ user is King! w3m-use-header-line nil w3m-use-toolbar nil) -;; Close my help window or frame when w3m closes with `q' +;; Close my help window or frame when w3m closes with 'q'. (defadvice w3m-close-window (after idlwave-close activate) (if (boundp 'idlwave-help-frame) (idlwave-help-quit))) @@ -3969,11 +3969,11 @@ user is King! (idlwave-action-and-binding "," '(idlwave-surround nil 1)) (idlwave-action-and-binding "&" '(idlwave-surround 1 1)) - ;; Pad only after `->', remove any space before the arrow + ;; Pad only after '->', remove any space before the arrow (idlwave-action-and-binding "->" '(idlwave-surround 0 -1 nil 2)) ;; Set some personal bindings - ;; (In this case, makes `,' have the normal self-insert behavior.) + ;; (In this case, makes ',' have the normal self-insert behavior.) (local-set-key "," 'self-insert-command) (local-set-key [f5] 'idlwave-shell-break-here) (local-set-key [f6] 'idlwave-shell-clear-current-bp) diff --git a/doc/misc/info.texi b/doc/misc/info.texi index 759956d..7337b46 100644 --- a/doc/misc/info.texi +++ b/doc/misc/info.texi @@ -67,8 +67,8 @@ type the command @kbd{h} now. It brings you to a programmed instruction sequence. To read about advanced Info commands, type @kbd{n} twice. This -brings you to @cite{Advanced Info Commands}, skipping over the `Getting -Started' chapter. +brings you to @cite{Advanced Info Commands}, skipping over the ``Getting +Started'' chapter. Type @kbd{H} to see a summary of all available commands. @end ifinfo diff --git a/doc/misc/mairix-el.texi b/doc/misc/mairix-el.texi index 5cf9ab0..16f4902 100644 --- a/doc/misc/mairix-el.texi +++ b/doc/misc/mairix-el.texi @@ -140,7 +140,7 @@ not tested (yet). You should make sure that you don't accidentally index the search results produced by mairix. This can be done by pointing -`mairix-file-path' to a directory which is surely not indexed by mairix. +@code{mairix-file-path} to a directory which is surely not indexed by mairix. Another possibility is to use something like @example @@ -222,12 +222,12 @@ Here's a description of the available interactive functions: @vindex mairix-search-options Call mairix with a search query. You will also be asked if you want to include whole threads. The results are saved by mairix in the default -mail file, which is set through the variable `mairix-search-file', which -again is prefixed by `mairix-file-path'. The results will then be +mail file, which is set through the variable @code{mairix-search-file}, which +again is prefixed by @code{mairix-file-path}. The results will then be displayed with the chosen mail program. The command used to call mairix -is specified by the variable `mairix-command', together with the options -`mairix-search-options'. The latter has the default ``-F'' for making -searching faster. +is specified by the variable @code{mairix-command}, together with the options +@code{mairix-search-options}. The latter has the default @option{-F} +for making searching faster. @item mairix-widget-search @kindex M-x mairix-widget-search @@ -239,7 +239,7 @@ how it works. You can then directly call mairix with the search term or save it for future use. Since mairix allows almost arbitrary combinations of search commands (like ``tc'' for ``to or cc''), you might want to include some other fields. This can be easily done by -modifying `mairix-widget-fields-list'. +modifying @code{mairix-widget-fields-list}. @item mairix-widget-search-based-on-article @kindex M-x mairix-widget-search-based-on-article @@ -270,7 +270,7 @@ for the search and will then be asked if you want to save your saved searches in your @file{.emacs}. If you answer with yes, the variable @code{mairix-saved-searches} will be saved in the customize section of your @file{.emacs}. You can also do this later by using -`mairix-edit-saved-searches'. +@code{mairix-edit-saved-searches}. @item mairix-use-saved-search @kindex M-x mairix-use-saved-search @@ -303,10 +303,11 @@ maybe you like it. @vindex mairix-update-options @vindex mairix-synchronous-update Call mairix to update the database. Mairix will be called with the -options `mairix-update-options'; the default is ``-F'' and ``-Q'' to +options @code{mairix-update-options}; the default is @option{-F} and +@option{-Q} to make updates as fast as possible. Note that by using these options, absolutely no integrity checking is done. If your database somehow gets -corrupted, simply delete it and update. If `mairix-synchronous-update' +corrupted, simply delete it and update. If @code{mairix-synchronous-update} is @code{nil} (the default), mairix will be called in a subprocess so Emacs will still be usable while the update is done. diff --git a/doc/misc/makefile.w32-in b/doc/misc/makefile.w32-in index 6869d94..398b774 100644 --- a/doc/misc/makefile.w32-in +++ b/doc/misc/makefile.w32-in @@ -21,7 +21,7 @@ # Where to find the source code. The source code for Emacs's C kernel is # expected to be in $(srcdir)/src, and the source code for Emacs's # utility programs is expected to be in $(srcdir)/lib-src. This is -# set by the configure script's `--srcdir' option. +# set by the configure script's '--srcdir' option. srcdir=. infodir = $(srcdir)/../../info @@ -71,7 +71,7 @@ DVI_TARGETS = calc.dvi cc-mode.dvi cl.dvi dbus.dvi dired-x.dvi \ wisent.dvi htmlfontify.dvi INFOSOURCES = info.texi -# The following rule does not work with all versions of `make'. +# The following rule does not work with all versions of 'make'. .SUFFIXES: .texi .dvi .texi.dvi: texi2dvi $< diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 6e49c0a..884d829 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -2006,13 +2006,13 @@ that look like: Hallvard B Furuseth writes: @end example -@c FIXME: Add `message-insert-formatted-citation-line' and -@c `message-citation-line-format' +@c FIXME: Add 'message-insert-formatted-citation-line' and +@c 'message-citation-line-format'. Point will be at the beginning of the body of the message when this function is called. -Note that Gnus provides a feature where clicking on `writes:' hides the +Note that Gnus provides a feature where clicking on @samp{writes:} hides the cited text. If you change the citation line too much, readers of your messages will have to adjust their Gnus, too. See the variable @code{gnus-cite-attribution-suffix}. @xref{Article Highlighting, , diff --git a/doc/misc/newsticker.texi b/doc/misc/newsticker.texi index 0520a4e..dfabb92 100644 --- a/doc/misc/newsticker.texi +++ b/doc/misc/newsticker.texi @@ -178,7 +178,7 @@ are kept until @code{newsticker-obsolete-item-max-age} is reached. @vindex newsticker-automatically-mark-items-as-old @item newsticker-automatically-mark-items-as-old -If this is set to `t' then a ``new'' item becomes ``old'' as soon as +If this is set to @code{t} then a ``new'' item becomes ``old'' as soon as it is retrieved a second time. @end table diff --git a/doc/misc/octave-mode.texi b/doc/misc/octave-mode.texi index b65c5ee..3199ec4 100644 --- a/doc/misc/octave-mode.texi +++ b/doc/misc/octave-mode.texi @@ -232,7 +232,7 @@ to directly start an inferior Octave process. This will start Octave in a special buffer the name of which is specified by the variable @code{inferior-octave-buffer} and defaults to @file{*Inferior Octave*}. From within this buffer, you can -interact with the inferior Octave process `as usual', i.e., by +interact with the inferior Octave process ``as usual'', i.e., by entering Octave commands at the prompt. The buffer is in Inferior Octave mode, which is derived from the standard Comint mode, a major mode for interacting with an inferior interpreter. See the @@ -282,7 +282,7 @@ then sourcing the buffer by using @kbd{C-c C-l} @item C-c C-i s @kindex C-c C-i s @findex octave-show-process-buffer -Make sure that `inferior-octave-buffer' is displayed +Make sure that @code{inferior-octave-buffer} is displayed (@code{octave-show-process-buffer}). @item C-c C-i q @@ -350,7 +350,7 @@ The startup of the inferior Octave process is highly customizable. The variable @code{inferior-octave-startup-args} can be used for specifying command lines arguments to be passed to Octave on startup as a list of strings. For example, to suppress the startup message -and use `traditional' mode, set this to @code{("-q" "--traditional")}. +and use ``traditional'' mode, set this to @code{("-q" "--traditional")}. You can also specify a startup file of Octave commands to be loaded on startup; note that these commands will not produce any visible output in the process buffer. Which file to use is controlled by the @@ -433,7 +433,7 @@ when Octave is waiting for input, or done sending output. @c @noindent @c to your @file{.emacs} file. -@c You can use either `plain' Emacs Info or the function @code{octave-help} +@c You can use either 'plain' Emacs Info or the function @code{octave-help} @c as your Octave info reader (for @samp{help -i}). In the former case, @c use @code{info_program ("info-emacs-info")}. @c The latter is perhaps more attractive because it allows to look up keys diff --git a/doc/misc/org.texi b/doc/misc/org.texi index d2721f6..a2cc51e 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -1053,7 +1053,7 @@ is not necessary. In that case it is sufficient to start Emacs as shown below. @lisp -;;; Minimal setup to load latest `org-mode' +;;; Minimal setup to load latest 'org-mode' ;; activate debugging (setq debug-on-error t @@ -2356,7 +2356,7 @@ Fields that are wider become clipped and end in the string @samp{=>}. Note that the full text is still in the buffer but is hidden. To see the full text, hold the mouse over the field---a tool-tip window will show the full content. To edit such a field, use the command -@kbd{C-c `} (that is @kbd{C-c} followed by the backquote). This will +@kbd{C-c `} (that is @kbd{C-c} followed by the grave accent). This will open a new window with the full field. Edit it and finish with @kbd{C-c C-c}. @@ -2770,7 +2770,7 @@ It is also possible to write a formula in Emacs Lisp. This can be useful for string manipulation and control structures, if Calc's functionality is not enough. -If a formula starts with a single-quote followed by an opening parenthesis, +If a formula starts with an apostrophe followed by an opening parenthesis, then it is evaluated as a Lisp form. The evaluation should return either a string or a number. Just as with @file{calc} formulas, you can specify modes and a printf format after a semicolon. @@ -6330,7 +6330,8 @@ you stop working on that task, or when you mark the task done, the clock is stopped and the corresponding time interval is recorded. It also computes the total time spent on each subtree@footnote{Clocking only works if all headings are indented with less than 30 stars. This is a hardcoded -limitation of `lmax' in `org-clock-sum'.} of a project. And it remembers a +limitation of @code{lmax} in @code{org-clock-sum}.} of a project. And it +remembers a history or tasks recently clocked, to that you can jump quickly between a number of tasks absorbing your time. @@ -10312,14 +10313,14 @@ macro, they are removed again (depending on the variable @code{cdlatex-simplify-sub-super-scripts}). @item @kindex ` -Pressing the backquote @kbd{`} followed by a character inserts math +Pressing the grave accent @kbd{`} followed by a character inserts math macros, also outside @LaTeX{} fragments. If you wait more than 1.5 seconds -after the backquote, a help window will pop up. +after the grave accent, a help window will pop up. @item @kindex ' -Pressing the single-quote @kbd{'} followed by another character modifies +Pressing the apostrophe @kbd{'} followed by another character modifies the symbol before point with an accent or a font. If you wait more than -1.5 seconds after the single-quote, a help window will pop up. Character +1.5 seconds after the apostrophe, a help window will pop up. Character modification will work only inside @LaTeX{} fragments; outside the quote is normal. @end itemize @@ -12192,7 +12193,7 @@ You can control the size and scale of the embedded images using the The exporter specifies the desired size of the image in the final document in units of centimeters. In order to scale the embedded images, the exporter queries for pixel dimensions of the images using one of a) ImageMagick's -@file{identify} program or b) Emacs `create-image' and `image-size' +@file{identify} program or b) Emacs @code{create-image} and @code{image-size} APIs@footnote{Use of @file{ImageMagick} is only desirable. However, if you routinely produce documents that have large images or you export your Org files that has images using a Emacs batch script, then the use of @@ -13390,9 +13391,9 @@ the Org buffer and get them translated into @LaTeX{} without using the @lisp @group (defun my-latex-filter-nobreaks (text backend info) - "Ensure \" \" are properly handled in LaTeX export." + "Ensure \"_\" are properly handled in LaTeX export." (when (org-export-derived-backend-p backend 'latex) - (replace-regexp-in-string " " "~" text))) + (replace-regexp-in-string "_" "~" text))) (add-to-list 'org-export-filter-plain-text-functions 'my-latex-filter-nobreaks) @@ -15730,7 +15731,7 @@ process. For example, compare the following two blocks: : bye @end example -In non-session mode, the `2' is not printed and does not appear. +In non-session mode, the ``2'' is not printed and does not appear. @example #+BEGIN_SRC python :results output :session @@ -15745,8 +15746,8 @@ In non-session mode, the `2' is not printed and does not appear. : bye @end example -But in @code{:session} mode, the interactive interpreter receives input `2' -and prints out its value, `2'. (Indeed, the other print statements are +But in @code{:session} mode, the interactive interpreter receives input ``2'' +and prints out its value, ``2''. (Indeed, the other print statements are unnecessary here). @node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code @@ -17814,8 +17815,8 @@ scheduled, and clocking, and any additional properties defined in the entry. The return value is an alist. Keys may occur multiple times if the property key was used several times.@* POM may also be @code{nil}, in which case the current entry is used. -If WHICH is @code{nil} or `all', get all properties. If WHICH is -`special' or `standard', only get that subclass. +If WHICH is @code{nil} or @code{all}, get all properties. If WHICH is +@code{special} or @code{standard}, only get that subclass. @end defun @vindex org-use-property-inheritance @findex org-insert-property-drawer diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index f0241f0..646122b 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi @@ -296,7 +296,7 @@ send it to a channel. @cindex quotes @cindex double-quotes Many commands take parameters. IRC commands usually ignore string -delimiters. Neither quote nor double-quote have special meanings in +delimiters. Neither apostrophe nor double-quote have special meanings in IRC. @example diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index 1497b1f..6488ae2 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi @@ -1000,7 +1000,7 @@ In eqs. (1), (2), (3)--(4), (5) and (6) @item u Unmark a marked entry. -@c FIXME: Do we need `A' as well for consistency? +@c FIXME: Do we need 'A' as well for consistency? @cindex LaTeX packages, @code{saferef} @cindex @code{saferef}, LaTeX package @item a @@ -4192,7 +4192,7 @@ List of magic words which identify a reference to be of this type. If the word before point is equal to one of these words when calling @code{reftex-reference}, the label list offered will be automatically restricted to labels of the correct type. If the first element of this -word list is the symbol `regexp', the strings are interpreted as regular +word list is the symbol @code{regexp}, the strings are interpreted as regular expressions. @item @var{toc-level} @@ -4247,7 +4247,7 @@ but this process can be slow when a document contains thousands of labels. If you use label prefixes consistently, you may speed up document parsing by setting this variable to a non-@code{nil} value. RefTeX will then compare the label prefix with the prefixes found in -`reftex-label-alist' and derive the correct label type in this way. +@code{reftex-label-alist} and derive the correct label type in this way. Possible values for this option are: @example @@ -4913,7 +4913,7 @@ The keymap which is active in the @file{*Index*} buffer @defopt reftex-view-crossref-extra Macros which can be used for the display of cross references. -This is used when `reftex-view-crossref' is called with point in an +This is used when @code{reftex-view-crossref} is called with point in an argument of a macro. Note that crossref viewing for citations, references (both ways) and index entries is hard-coded. This variable is only to configure additional structures for which crossreference @@ -5447,7 +5447,7 @@ deleted from the toc buffer with the @kbd{d} key. @noindent @b{Version 4.19} @itemize @bullet @item -New command `reftex-toc-recenter' (@kbd{C-c -}) which shows the current +New command @code{reftex-toc-recenter} (@kbd{C-c -}) which shows the current section in the TOC buffer without selecting the TOC window. @item Recentering happens automatically in idle time when the option @@ -5459,7 +5459,7 @@ buffer. The highlight in the TOC buffer stays when the focus moves to a different window. @item -New command `reftex-goto-label'. +New command @code{reftex-goto-label}. @item Part numbers are no longer included in chapter numbers, and a new part does not reset the chapter counter. See new option diff --git a/doc/misc/remember.texi b/doc/misc/remember.texi index c0d2ba3..13594d9 100644 --- a/doc/misc/remember.texi +++ b/doc/misc/remember.texi @@ -115,8 +115,8 @@ Have you ever noticed that having a laptop to write on doesn't @emph{actually} increase the amount of quality material that you turn out, in the long run? Perhaps it's because the time we save electronically in one way, we're losing electronically in another; the -tool should never dominate one's focus. As the mystic Faridu'd-Din -`Attar wrote: ``Be occupied as little as possible with things of the +tool should never dominate one's focus. As the mystic Farīd ud-Dīn +ʿAṭṭār wrote: ``Be occupied as little as possible with things of the outer world but much with things of the inner world; then right action will overcome inaction.'' @@ -318,10 +318,10 @@ Save (if it is modified) and bury the current buffer. @item C-c C-c @itemx C-x C-s -Remember the contents of the current buffer (`remember-finalize'). +Remember the contents of the current buffer (@code{remember-finalize}). @item C-c C-k -Destroy the current @file{*Remember*} buffer (`remember-destroy'). +Destroy the current @file{*Remember*} buffer (@code{remember-destroy}). @end table diff --git a/doc/misc/sc.texi b/doc/misc/sc.texi index a97e504..a851fa2 100644 --- a/doc/misc/sc.texi +++ b/doc/misc/sc.texi @@ -1790,7 +1790,7 @@ a mail message to the Supercite mailing list: Martin> tends to be a "full blown" version rather than to be Martin> stripped down. - Martin> 2: `point' is at the start of the header, `mark' at the + Martin> 2: 'point' is at the start of the header, 'mark' at the Martin> end of the message body. Martin> 3: (run-hooks 'mail-yank-hooks) diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi index 0907240..5f4a782 100644 --- a/doc/misc/semantic.texi +++ b/doc/misc/semantic.texi @@ -604,7 +604,7 @@ Emacs Lisp. It is an LALR parser suitable for complex languages. @c Following comments are for the benefit of ispell. @c LocalWords: alist API APIs arg argc args argv asis assoc autoload Wisent -@c LocalWords: backquote bnf bovinate bovinates LALR +@c LocalWords: bnf bovinate bovinates LALR @c LocalWords: bovinating bovination bovinator bucketize @c LocalWords: cb cdr charquote checkcache cindex CLOS @c LocalWords: concat concocting const ctxt Decl defcustom diff --git a/doc/misc/speedbar.texi b/doc/misc/speedbar.texi index 726f749..da507db 100644 --- a/doc/misc/speedbar.texi +++ b/doc/misc/speedbar.texi @@ -43,16 +43,16 @@ modify this GNU manual.'' Speedbar is a program for Emacs which can be used to summarize information related to the current buffer. Its original inspiration -is the `explorer' often used in modern development environments, office +is the ``explorer'' often used in modern development environments, office packages, and web browsers. Speedbar displays a narrow frame in which a tree view is shown. This tree view defaults to containing a list of files and directories. Files -can be `expanded' to list tags inside. Directories can be expanded to +can be ``expanded'' to list tags inside. Directories can be expanded to list the files within itself. Each file or tag can be jumped to immediately. -Speedbar expands upon `explorer' windows by maintaining context with the +Speedbar expands upon ``explorer'' windows by maintaining context with the user. For example, when using the file view, the current buffer's file is highlighted. Speedbar also mimics the explorer windows by providing multiple display modes. These modes come in two flavors. Major display @@ -61,8 +61,8 @@ only when a buffer of the applicable type is shown. This allows authors of other packages to provide speedbar summaries customized to the needs of that mode. -Throughout this manual, activities are defined as `clicking on', or -`expanding' items. Clicking means using @kbd{Mouse-2} on a +Throughout this manual, activities are defined as ``clicking on'', or +``expanding'' items. Clicking means using @kbd{Mouse-2} on a button. Expanding refers to clicking on an expansion button to display an expanded summary of the entry the expansion button is on. @xref{Basic Navigation}. @@ -231,9 +231,9 @@ Groups summarize information in a single line, and provide a high level view of more complex systems, like a directory tree, or manual chapters. Groups appear at different indentation levels, and are prefixed with a -@samp{+} in some sort of `box'. The group name will summarize the +@samp{+} in some sort of ``box''. The group name will summarize the information within it, and the expansion box will display that -information inline. In File mode, directories and files are `groups' +information inline. In File mode, directories and files are ``groups'' where the @samp{+} is surrounded by brackets like this: @example @@ -246,7 +246,7 @@ In this example, we see both open and closed directories, in addition to a file. The directories have a box consisting of angle brackets, and a file uses square brackets. -In all modes, a group can be `edited' by pressing @kbd{RET}, meaning a +In all modes, a group can be ``edited'' by pressing @kbd{RET}, meaning a file will be opened, or a directory explicitly opened in speedbar. A group can be expanded or contracted using @kbd{+} or @kbd{-}. @xref{Basic Key Bindings}. @@ -292,7 +292,7 @@ Unadorned text will generally be colorless, and not clickable. Each type of Group, item indicator, and label is given a different color. The colors chosen are dependent on whether the background color is light or dark. -Of important note is that the `current item', which may be a buffer or +Of important note is that the ``current item'', which may be a buffer or file name, is highlighted red, and underlined. Colors can be customized from the group @code{speedbar-faces}. Some @@ -1128,7 +1128,7 @@ The conventions allow almost anything to be inserted, but several helper functions are provided to make it easy to create the standardized buttons. -To understand the built in functions, each `button' in speedbar consists +To understand the built in functions, each ``button'' in speedbar consists of four important pieces of data. The text to be displayed, token data to be associated with the text, a function to call, and some face to display it in. diff --git a/doc/misc/todo-mode.texi b/doc/misc/todo-mode.texi index f58965c..3032da3 100644 --- a/doc/misc/todo-mode.texi +++ b/doc/misc/todo-mode.texi @@ -702,13 +702,13 @@ prompt, after typing @kbd{i} to invoke @code{todo-insert-item}, looks like this: @example -Press a key (so far `i'): @{ i=>default p=>copy @} @{ y=>diary k=>nonmarking @} @{ c=>calendar d=>date n=>dayname @} t=>time @{ h=>here r=>region @} +Press a key (so far @kbd{i}): @{ i=>default p=>copy @} @{ y=>diary k=>nonmarking @} @{ c=>calendar d=>date n=>dayname @} t=>time @{ h=>here r=>region @} @end example @noindent If you now type @kbd{y}, the prompt changes to this: @example -Press a key (so far `i y'): y=>diary:GO! @{ c=>calendar d=>date n=>dayname @} t=>time @{ h=>here r=>region @} +Press a key (so far @kbd{i y}): y=>diary:GO! @{ c=>calendar d=>date n=>dayname @} t=>time @{ h=>here r=>region @} @end example @noindent Notice that the pair @samp{k=>nonmarking} is now absent, since it @@ -892,7 +892,7 @@ is on a done item, this displays the following prompt in the echo area: @example -Press a key (so far `e'): c=>add/edit comment d=>delete comment +Press a key (so far @kbd{e}): c=>add/edit comment d=>delete comment @end example @noindent @@ -903,7 +903,7 @@ echo area, and you can continue or complete the invocation only by typing one of the listed keys: @example -Press a key (so far `e'): e=>edit h=>header m=>multiline y=>diary k=>nonmarking d=>date t=>time +Press a key (so far @kbd{e}): e=>edit h=>header m=>multiline y=>diary k=>nonmarking d=>date t=>time @end example As noted above, passing the @samp{date} parameter does not complete @@ -912,7 +912,7 @@ following prompt, and typing any of these keys does complete the invocation: @example -Press a key (so far `e d'): f=>full c=>calendar a=>today n=>dayname y=>year m=>month d=>daynum +Press a key (so far @kbd{e d}): f=>full c=>calendar a=>today n=>dayname y=>year m=>month d=>daynum @end example In addition to the item-level invocations @kbd{e y}, to change the diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index d9cb933..1875a70 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -105,8 +105,8 @@ copy and modify this GNU manual.'' This file documents @value{tramp} version @value{trampver}, a remote file editing package for @value{emacsname}. -@value{tramp} stands for `Transparent Remote (file) Access, Multiple -Protocol'. This package provides remote file editing, similar to +@value{tramp} stands for ``Transparent Remote (file) Access, Multiple +Protocol''. This package provides remote file editing, similar to @value{ftppackagename}. The difference is that @value{ftppackagename} uses FTP to transfer @@ -704,7 +704,7 @@ the remote host, this option uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh} to open a connection. This is useful for users where the normal login shell is set up to ask them a number of questions when logging in. This procedure avoids these questions, and -just gives @value{tramp} a more-or-less `standard' login shell to work +just gives @value{tramp} a more-or-less ``standard'' login shell to work with. Note that this procedure does not eliminate questions asked by @@ -856,7 +856,7 @@ the remote host, this option uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh} to open a connection. This is useful for users where the normal login shell is set up to ask them a number of questions when logging in. This procedure avoids these questions, and -just gives @value{tramp} a more-or-less `standard' login shell to work +just gives @value{tramp} a more-or-less ``standard'' login shell to work with. This is also useful for Windows users where @command{ssh}, when @@ -2210,7 +2210,7 @@ When is @code{nil} (the default), such problems do not occur. Therefore, it is useful to set special values for @value{tramp} -files. For example, the following statement effectively `turns off' +files. For example, the following statement effectively ``turns off'' the effect of @ifset emacs @code{backup-directory-alist} @@ -3256,7 +3256,7 @@ file name completion, report a bug to the @value{tramp} developers. File name completion does not work in large directories @value{tramp} uses globbing for some operations. (Globbing means to use the -shell to expand wildcards such as `*.c'.) This might create long +shell to expand wildcards such as @samp{*.c}.) This might create long command lines, especially in directories with many files. Some shells choke on long command lines, or don't cope well with the globbing itself. diff --git a/doc/misc/url.texi b/doc/misc/url.texi index a1fa31f..8c4afbe 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi @@ -1116,7 +1116,7 @@ This the @samp{nslookup} program. It is @code{"nslookup"} by default. @cindex network connections, suppressing @cindex suppressing network connections @cindex bugs, HTML -@cindex HTML `bugs' +@cindex HTML ``bugs'' In some circumstances it is desirable to suppress making network connections. A typical case is when rendering HTML in a mail user agent, when external URLs should not be activated, particularly to diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi index 777bb10..829c4f6 100644 --- a/doc/misc/vhdl-mode.texi +++ b/doc/misc/vhdl-mode.texi @@ -898,7 +898,7 @@ The official Emacs VHDL Mode Home Page can be found at @chapter Sample @file{.emacs} file @cindex Sample @file{.emacs} file -Most customizations can be done using the `Customize' entry in the +Most customizations can be done using the ``Customize'' entry in the VHDL Mode menu, which requires no editing of the .emacs file. If you want to customize indentation, here you go: diff --git a/doc/misc/vip.texi b/doc/misc/vip.texi index ebb1494..250ced9 100644 --- a/doc/misc/vip.texi +++ b/doc/misc/vip.texi @@ -1023,14 +1023,14 @@ Jump to mark (and pop mark off the mark ring). Emacs uses the @dfn{mark ring} to store marked positions. The commands @kbd{m <}, @kbd{m >} and @kbd{m .}@: not only set mark but also add it as the latest element of the mark ring (replacing the oldest one). By repeating -the command `@kbd{m ,}' you can visit older and older marked positions. You +the command @kbd{m ,} you can visit older and older marked positions. You will eventually be in a loop as the mark ring is a ring. @node Motion Commands @section Motion Commands Commands for moving around in the current buffer are collected here. These -commands are used as an `argument' for the delete, change and yank commands +commands are used as an ``argument'' for the delete, change and yank commands to be described in the next section. @table @kbd @@ -1113,7 +1113,7 @@ considered as a sequence of non-white characters (@code{vip-end-of-Word}). @end table @noindent @cindex syntax table -Here the meaning of the word `word' for the @kbd{w}, @kbd{b} and @kbd{e} +Here the meaning of the word ``word'' for the @kbd{w}, @kbd{b} and @kbd{e} commands is determined by the @dfn{syntax table} effective in the current buffer. Each major mode has its syntax mode, and therefore the meaning of a word also changes as the major mode changes. See GNU Emacs Manual for @@ -1380,7 +1380,7 @@ Delete a character before point. Given @var{n}, delete @var{n} characters @cindex yank Yank commands @dfn{yank} a text of buffer into a (usually anonymous) register. -Here the word `yank' is used in Vi's sense. Thus yank commands do not +Here the word ``yank'' is used in Vi's sense. Thus yank commands do not alter the content of the buffer, and useful only in combination with commands that put back the yanked text into the buffer. diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 0ccc6ac..cfaf4e6 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -655,11 +655,12 @@ alone as a default is meaningless, since this command requires a file argument. @end table @noindent -As in Vi, Viper's destructive commands can be re-executed by typing `@kbd{.}'. +As in Vi, Viper's destructive commands can be re-executed by typing +a period (@kbd{.}). However, in addition, Viper keeps track of the history of such commands. This history can be perused by typing @kbd{C-c M-p} and @kbd{C-c M-n}. Having found the appropriate command, it can be then executed by typing -`@kbd{.}'. +a period. @xref{Improvements over Vi}, for more information. @node Insert State @@ -877,7 +878,8 @@ want to change this. @noindent Currently undisplayed files can be listed using the @kbd{:ar} command. The command @kbd{:n} can be given counts from the @kbd{:ar} list to switch to -other files. For example, use `:n3' to move to the third file in that list. +other files. For example, use @samp{:n3} to move to the third file in +that list. @node Unimplemented Features @section Unimplemented Features @@ -1457,8 +1459,8 @@ In Vi state, these commands let the user peruse the history of Vi-style destructive commands, such as @kbd{dw}, @kbd{J}, @kbd{a}, etc. By repeatedly typing @kbd{C-c M-p} or @kbd{C-c M-n} you will cycle Viper through the recent history of Vi commands, displaying the commands one by -one. Once -an appropriate command is found, it can be executed by typing `@kbd{.}'. +one. Once an appropriate command is found, it can be executed by +typing a period. Since typing @kbd{C-c M-p} is tedious, it is more convenient to bind an appropriate function to a function key on the keyboard and use that key. @@ -1626,7 +1628,7 @@ values. The corresponding :se command is also indicated. (The symbols Viper supports both the abbreviated Vi variable names and their full names. Variable completion is done on full names only. @key{TAB} and @key{SPC} complete -variable names. Typing `=' will complete the name and then will prompt for +variable names. Typing @kbd{=} will complete the name and then will prompt for a value, if applicable. For instance, @kbd{:se au @key{SPC}} will complete the command to @kbd{:set autoindent}; @kbd{:se ta @key{SPC}} will complete the command and prompt further like this: @kbd{:set tabstop = }. @@ -1800,8 +1802,8 @@ unless you are a novice, as this precludes the use of language-specific features provided by the major modes. @item viper-keep-point-on-repeat t If not @code{nil}, point is not moved when the user repeats the previous -command by typing `.' This is very useful for doing repeated changes with -the @kbd{.} key. +command by typing a period. This is very useful for doing repeated +changes with the @kbd{.} key. @item viper-repeat-from-history-key 'f12 Prefix key used to invoke the macros @kbd{f12 1} and @kbd{f12 2} that repeat the second-last and the third-last destructive command. @@ -2375,23 +2377,24 @@ shown above, and then setting it in the desired major modes as follows: @end example @item Vi-isms in Emacs state -Some people find it useful to use the Vi-style search key, `/', to invoke +Some people find it useful to use the Vi-style search key, @kbd{/}, to invoke search in modes which Viper leaves in emacs-state. These modes are: @code{dired-mode}, @code{mh-folder-mode}, @code{Info-mode}, and @code{Buffer-menu-mode} -(more may be added in the future). So, in the above modes, Viper binds `/' +(more may be added in the future). So, in the above modes, Viper binds @kbd{/} so that it will behave Vi-style. Furthermore, in those major modes, Viper -binds `:' to invoke ex-style commands, like in vi-state. And, as described -above, `//' and `///' get bound to Vi-style macros that toggle +binds @kbd{:} to invoke ex-style commands, like in vi-state. And, as described +above, @kbd{//} and @kbd{///} get bound to Vi-style macros that toggle case-insensitivity and regexp-search. If you don't like these features---which I don't really understand---you -can unbind `/' and `:' in @code{viper-dired-modifier-map} (for Dired) or in -@code{viper-slash-and-colon-map}, for other modes. +can unbind @kbd{/} and @kbd{:} in @code{viper-dired-modifier-map} (for +Dired) or in @code{viper-slash-and-colon-map}, for other modes. @vindex @code{viper-slash-and-colon-map} @vindex @code{viper-dired-modifier-map} -To unbind the macros `//' and `///' for a major mode where you feel they +To unbind the macros @kbd{//} and @kbd{///} for a major mode where you +feel they are undesirable, execute @code{viper-set-emacs-state-searchstyle-macros} with a non-@code{nil} argument. This can be done either interactively, by supplying a prefix argument, or by placing @@ -2419,16 +2422,17 @@ Change your user level interactively. Viper supports Emacs-style file completion when it prompts the user for a file name. However, in many cases, the same directory may contain files with identical prefix but different suffixes, e.g., prog.c, prog.o, -paper.tex, paper.dvi. In such cases, completion will stop at the `.'. +paper.tex, paper.dvi. In such cases, completion will stop at the period. If the above variable is a list of strings representing suffixes, Viper will try these suffixes in the order listed and will check if the corresponding file exists. -For instance, if completion stopped at `paper.'@: and the user typed -@key{RET}, -then Viper will check if the files `paper.', `paper.tex', `paper.c', etc., exist. +For instance, if completion stopped at @samp{paper.} and the user +typed @key{RET}, then Viper will check if the files @file{paper.}, +@file{paper.tex}, @file{paper.c}, etc., exist. It will take the first such file. If no file exists, Viper will give a chance -to complete the file name by typing the appropriate suffix. If `paper.'@: was +to complete the file name by typing the appropriate suffix. +If @file{paper.} was the intended file name, hitting return will accept it. To turn this feature off, set the above variable to @code{nil}. @@ -2473,9 +2477,9 @@ major modes. Viper keeps track of the recent history of destructive commands, such as @kbd{dw}, @kbd{i}, etc. In Vi state, -the most recent command can be re-executed by hitting `@kbd{.}', as in Vi. +the most recent command can be re-executed by hitting a period, as in Vi. However, repeated typing @kbd{C-c M-p} will cause Viper to show the -previous destructive commands in the minibuffer. Subsequent hitting `@kbd{.}' +previous destructive commands in the minibuffer. Subsequent hitting period will execute the command that was displayed last. The key @kbd{C-c M-n} will cycle through the command history in the opposite direction. @@ -2598,8 +2602,8 @@ your Viper customization file: This would bind mouse search to the action invoked by pressing the Meta key and clicking mouse button 1. The allowed values of @code{viper-mouse-search-key} are lists that contain a mouse-button number -(1,2, or 3) and any combination of the words `control', `meta', and -`shift'. +(1,2, or 3) and any combination of the words ``control'', ``meta'', and +``shift''. If the requested mouse action (e.g., (meta 1)) is already taken for other purposes then you have to confirm your intention by placing the following @@ -2616,9 +2620,9 @@ The region that is chosen as a pattern to search for is determined as follows. If search is invoked via a single click, Viper chooses the region that lies between the beginning of the ``word'' under the pointer (``word'' is understood in Vi sense) and the end of that word. The only difference -with Vi's words is that in Lisp major modes `-' is considered an +with Vi's words is that in Lisp major modes @samp{-} is considered an alphanumeric symbol. This is done for the convenience of working with Lisp -symbols, which often have an `-' in them. Also, if you click on a +symbols, which often have an @samp{-} in them. Also, if you click on a non-alphanumeric character that is not a word separator (in Vi sense) then this character will also be considered alphanumeric, provided that it is adjacent (from either side) to an alphanumeric character. This useful @@ -3164,7 +3168,8 @@ By default, Viper syntax preference is @code{reformed-vi}, which means that Viper considers only those symbols to be part of a word that are specified as word-symbols by the current Emacs syntax table (which may be different for different major modes) plus the underscore symbol @kbd{_}, minus the -symbols that are not considered words in Vi (e.g., `,',;, etc.), but may be +symbols that are not considered words in Vi (e.g., @samp{,}, @samp{;}, +etc.), but may be considered as word-symbols by various Emacs major modes. Reformed-Vi works very close to Vi, and it also recognizes words in other alphabets. Therefore, this is the most appropriate mode for editing text @@ -3546,7 +3551,7 @@ the direction of older commands, while hitting @kbd{C-c M-n} does so in reverse order. Each command in the history is displayed in the minibuffer. The displayed command can -then be executed by typing `@kbd{.}'. +then be executed by typing a period. Since typing the above sequences of keys may be tedious, the functions doing the perusing can be bound to unused keyboard keys in the @@ -4261,7 +4266,7 @@ character on the previous line. This setting affects the current buffer only. @item autoindent-global @itemx ai-global -Same as `autoindent', but affects all buffers. +Same as @code{autoindent}, but affects all buffers. @item noautoindent @itemx noai Cancel autoindent. @@ -4320,7 +4325,7 @@ their normal length (default 8 positions). This setting affects the current buffer only. @item tabstop-global @itemx ts-g -Same as `tabstop', but affects all buffers. +Same as @code{tabstop}, but affects all buffers. @item wrapmargin= @itemx wm= @cindex auto fill diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi index 6d5b6d3..1942b79 100644 --- a/doc/misc/widget.texi +++ b/doc/misc/widget.texi @@ -66,7 +66,7 @@ modify this GNU manual.'' @chapter Introduction Most graphical user interface toolkits provide a number of standard -user interface controls (sometimes known as `widgets' or `gadgets'). +user interface controls (sometimes known as ``widgets'' or ``gadgets''). Emacs doesn't really support anything like this, except for an incredibly powerful text ``widget.'' On the other hand, Emacs does provide the necessary primitives to implement many other widgets diff --git a/doc/misc/woman.texi b/doc/misc/woman.texi index a259249..a935bed 100644 --- a/doc/misc/woman.texi +++ b/doc/misc/woman.texi @@ -12,8 +12,8 @@ @c %**end of header @copying -This file documents WoMan: A program to browse Unix manual pages `W.O. -(without) man'. +This file documents WoMan: A program to browse Unix manual pages ``W.O. +(without) man''. Copyright @copyright{} 2001--2015 Free Software Foundation, Inc. @@ -172,7 +172,7 @@ is important I will refer to them both ambiguously as @code{roff}. @code{roff} markup consists of @dfn{requests} and @dfn{escape sequences}. A request occupies a complete line and begins with either a -period or a single forward quote. An escape sequences is embedded +period or an apostrophe. An escape sequence is embedded within the input text and begins (by default) with a backslash. The original man macro package defines 20 new @code{roff} requests implemented as macros, which were considered to be sufficient for