From: Stefan Monnier Date: Tue, 5 Nov 2013 22:45:44 +0000 (-0500) Subject: * src/xdisp.c (prepare_menu_bars): Mark static. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~939 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9e6e98264c0c2684245463689614926bb22a8516;p=emacs.git * src/xdisp.c (prepare_menu_bars): Mark static. * src/lisp.h (prepare_menu_bars): Don't declare. * src/xselect.c (x_handle_selection_clear): * src/callproc.c (call_process): Remove redundant call to prepare_menu_bars. --- diff --git a/src/ChangeLog b/src/ChangeLog index 740a8f93505..00ac6f6e28c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2013-11-05 Stefan Monnier + + * xdisp.c (prepare_menu_bars): Mark static. + * lisp.h (prepare_menu_bars): Don't declare. + * xselect.c (x_handle_selection_clear): + * callproc.c (call_process): Remove redundant call to prepare_menu_bars. + 2013-11-05 Paul Eggert * keyboard.c (Fcommand_error_default_function): Fix pointer signedness diff --git a/src/callproc.c b/src/callproc.c index 72b9c1dc370..3317c1203bc 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -777,7 +777,6 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, char buf[CALLPROC_BUFFER_SIZE_MAX]; int bufsize = CALLPROC_BUFFER_SIZE_MIN; int nread; - bool first = 1; EMACS_INT total_read = 0; int carryover = 0; bool display_on_the_fly = display_p; @@ -875,9 +874,6 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, if (display_p) { - if (first) - prepare_menu_bars (); - first = 0; redisplay_preserve_echo_area (1); /* This variable might have been set to 0 for code detection. In that case, set it back to 1 because diff --git a/src/dispextern.h b/src/dispextern.h index 22357a01c84..32c6a63e62f 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -33,7 +33,7 @@ along with GNU Emacs. If not, see . */ #else /* !HAVE_X_WINDOWS */ -/* X-related stuff used by non-X gui code. */ +/* X-related stuff used by non-X gui code. */ typedef struct { unsigned long pixel; @@ -2348,7 +2348,7 @@ struct it } stretch; } u; - /* current text and display positions. */ + /* Current text and display positions. */ struct text_pos position; struct display_pos current; Lisp_Object from_overlay; @@ -2360,11 +2360,12 @@ struct it unsigned string_from_prefix_prop_p : 1; unsigned display_ellipsis_p : 1; unsigned avoid_cursor_p : 1; - unsigned bidi_p:1; + unsigned bidi_p : 1; unsigned from_disp_prop_p : 1; enum line_wrap_method line_wrap; - /* properties from display property that are reset by another display property. */ + /* Properties from display property that are reset by another display + property. */ short voffset; Lisp_Object space_width; Lisp_Object font_height; diff --git a/src/lisp.h b/src/lisp.h index b70ca9e9f7c..2b197cd32b1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3526,7 +3526,6 @@ extern void update_echo_area (void); extern void truncate_echo_area (ptrdiff_t); extern void redisplay (void); extern void redisplay_preserve_echo_area (int); -extern void prepare_menu_bars (void); void set_frame_cursor_types (struct frame *, Lisp_Object); extern void syms_of_xdisp (void); diff --git a/src/xdisp.c b/src/xdisp.c index a9dd387729e..296ab458946 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -737,7 +737,7 @@ ptrdiff_t help_echo_pos; Lisp_Object previous_help_echo_string; -/* Platform-independent portion of hourglass implementation. */ +/* Platform-independent portion of hourglass implementation. */ #ifdef HAVE_WINDOW_SYSTEM @@ -6554,8 +6554,8 @@ lookup_glyphless_char_display (int c, struct it *it) if (c >= 0) { glyphless_method = CHAR_TABLE_REF (Vglyphless_char_display, c); - if (CONSP (glyphless_method)) - glyphless_method = FRAME_WINDOW_P (it->f) + if (CONSP (glyphless_method)) + glyphless_method = FRAME_WINDOW_P (it->f) ? XCAR (glyphless_method) : XCDR (glyphless_method); } @@ -6759,7 +6759,7 @@ get_next_display_element (struct it *it) Non-printable characters and raw-byte characters are also translated to octal form. */ - if (((c < ' ' || c == 127) /* ASCII control chars */ + if (((c < ' ' || c == 127) /* ASCII control chars. */ ? (it->area != TEXT_AREA /* In mode line, treat \n, \t like other crl chars. */ || (c != '\t' @@ -9272,7 +9272,7 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) /* The commented-out optimization uses vmotion on terminals. This gives bad results, because elements like it->what, on which - callers such as pos_visible_p rely, aren't updated. */ + callers such as pos_visible_p rely, aren't updated. */ /* struct position pos; if (!FRAME_WINDOW_P (it->f)) { @@ -9290,7 +9290,7 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) { /* DVPOS == 0 means move to the start of the screen line. */ move_it_vertically_backward (it, 0); - /* Let next call to line_bottom_y calculate real line height */ + /* Let next call to line_bottom_y calculate real line height. */ last_height = 0; } else if (dvpos > 0) @@ -11167,7 +11167,7 @@ x_consider_frame_title (Lisp_Object frame) /* Prepare for redisplay by updating menu-bar item lists when appropriate. This can call eval. */ -void +static void prepare_menu_bars (void) { int all_windows; @@ -18452,7 +18452,7 @@ append_space_for_newline (struct it *it, int default_face_p) it->len = 1; /* If the default face was remapped, be sure to use the - remapped face for the appended newline. */ + remapped face for the appended newline. */ if (default_face_p) it->face_id = lookup_basic_face (it->f, DEFAULT_FACE_ID); else if (it->face_before_selective_p) @@ -25052,7 +25052,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym) lower_yoff = descent - 2 - metrics_lower.descent; upper_yoff = (lower_yoff - metrics_lower.ascent - 1 - metrics_upper.descent); - /* Don't make the height shorter than the base height. */ + /* Don't make the height shorter than the base height. */ if (height > base_height) { it->ascent = ascent; @@ -25089,16 +25089,16 @@ x_produce_glyphs (struct it *it) struct face *face = FACE_FROM_ID (it->f, it->face_id); struct font *font = face->font; struct font_metrics *pcm = NULL; - int boff; /* baseline offset */ + int boff; /* Baseline offset. */ if (font == NULL) { /* When no suitable font is found, display this character by the method specified in the first extra slot of Vglyphless_char_display. */ - Lisp_Object acronym = lookup_glyphless_char_display (-1, it); + Lisp_Object acronym = lookup_glyphless_char_display (-1, it); - eassert (it->what == IT_GLYPHLESS); + eassert (it->what == IT_GLYPHLESS); produce_glyphless_glyph (it, 1, STRINGP (acronym) ? acronym : Qnil); goto done; } @@ -25236,7 +25236,7 @@ x_produce_glyphs (struct it *it) { /* A newline has no width, but we need the height of the line. But if previous part of the line sets a height, - don't increase that height */ + don't increase that height. */ Lisp_Object height; Lisp_Object total_height = Qnil; @@ -25246,7 +25246,7 @@ x_produce_glyphs (struct it *it) it->nglyphs = 0; height = get_it_property (it, Qline_height); - /* Split (line-height total-height) list */ + /* Split (line-height total-height) list. */ if (CONSP (height) && CONSP (XCDR (height)) && NILP (XCDR (XCDR (height)))) diff --git a/src/xselect.c b/src/xselect.c index 34edc49feab..6dbeb539f77 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -972,7 +972,6 @@ x_handle_selection_clear (struct input_event *event) Frun_hook_with_args (2, args); } - prepare_menu_bars (); redisplay_preserve_echo_area (20); }