commit fb35f1f715da1a931204894b132d7fb6eee0f361 (HEAD, refs/remotes/origin/master) Author: Martin Rudalics Date: Mon Jan 12 08:18:00 2015 +0100 Adjust frame heights to real height of tool bar. * frame.el (frame-notice-user-settings): Remove code dealing with frame-initial-frame-tool-bar-height. Turn off `tool-bar-mode' only if `window-system-frame-alist' or `default-frame-alist' ask for it. (make-frame): Update frame-adjust-size-history if needed. * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to adjust_frame_size. * frame.c (frame_default_tool_bar_height): New variable. (adjust_frame_size): Possibly add requested adjustment to Vframe_adjust_size_history. (make_frame): Initialize tool_bar_redisplayed_once slot. (Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify doc-string. Call adjust_frame_size unconditionally (the frame's text size may remain unaltered but the pixel size may change). (x_figure_window_size): If frame_default_tool_bar_height was set, use it instead of calculating the tool bar height from DEFAULT_TOOL_BAR_IMAGE_HEIGHT. Don't set Vframe_initial_frame_tool_bar_height. (Qchange_frame_size, Qxg_frame_set_char_size) (Qset_window_configuration, Qx_create_frame_1) (Qx_create_frame_2): New symbols. (Vframe_initial_frame_tool_bar_height): Remove. (Vframe_adjust_size_history): New history variable for debugging frame size adjustments. * frame.h (struct frame): New boolean slot tool_bar_redisplayed_once. (frame_default_tool_bar_height): Extern. * gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size to adjust_frame_size. * nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and Qx_create_frame_2 to adjust_frame_size. * w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with inhibit 1 when we have not redisplayed the tool bar yet. (Fx_create_frame): Pass Pass Qx_create_frame_1 and Qx_create_frame_2 to adjust_frame_size. * w32menu.c (set_frame_menubar): Simplify adjust_frame_size call. * window.c (Fset_window_configuration): Pass Qset_window_configuration to adjust_frame_size. * xdisp.c (redisplay_tool_bar): Assign new height to frame_default_tool_bar_height. (redisplay_internal): If we haven't redisplayed this frame's tool bar, call redisplay_tool_bar early so we can adjust the frame size accordingly. * xfns.c (x_change_tool_bar_height): Call adjust_frame_size with inhibit 1 when we have not redisplayed the tool bar yet. (Fx_create_frame): Pass Pass Qx_create_frame_1 and Qx_create_frame_2 to adjust_frame_size. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a47853..a55849a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2015-01-12 Martin Rudalics + + * frame.el (frame-notice-user-settings): Remove code dealing with + frame-initial-frame-tool-bar-height. Turn off `tool-bar-mode' + only if `window-system-frame-alist' or `default-frame-alist' ask + for it. + (make-frame): Update frame-adjust-size-history if needed. + 2015-01-12 Paul Eggert Have 'make' output better GEN names diff --git a/lisp/frame.el b/lisp/frame.el index 8b92730..1d5bbf2 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -275,23 +275,22 @@ there (in decreasing order of priority)." ;; by the lines added in x-create-frame for the tool-bar and ;; switch `tool-bar-mode' off. (when (display-graphic-p) - (let ((tool-bar-lines - (or (assq 'tool-bar-lines initial-frame-alist) - (assq 'tool-bar-lines window-system-frame-alist) - (assq 'tool-bar-lines default-frame-alist)))) - ;; Shrink frame by its initial tool bar height iff either zero - ;; tool bar lines have been requested in one of the frame's - ;; alists or tool bar mode has been turned off explicitly in - ;; the user's init file. - (when (and tool-bar-lines - (> frame-initial-frame-tool-bar-height 0) - (or (not tool-bar-mode) - (null (cdr tool-bar-lines)) - (eq 0 (cdr tool-bar-lines)))) - (set-frame-height - frame-initial-frame (- (frame-text-height frame-initial-frame) - frame-initial-frame-tool-bar-height) - nil t) + (let* ((init-lines + (assq 'tool-bar-lines initial-frame-alist)) + (other-lines + (or (assq 'tool-bar-lines window-system-frame-alist) + (assq 'tool-bar-lines default-frame-alist))) + (lines (or init-lines other-lines)) + (height (tool-bar-height frame-initial-frame t))) + ;; Adjust frame top if either zero (nil) tool bar lines have + ;; been requested in the most relevant of the frame's alists + ;; or tool bar mode has been explicitly turned off in the + ;; user's init file. + (when (and (> height 0) + (or (and lines + (or (null (cdr lines)) + (eq 0 (cdr lines)))) + (not tool-bar-mode))) (let* ((initial-top (cdr (assq 'top frame-initial-geometry-arguments))) (top (frame-parameter frame-initial-frame 'top))) @@ -299,15 +298,19 @@ there (in decreasing order of priority)." (let ((adjusted-top (cond ((and (consp top) (eq '+ (car top))) - (list '+ (+ (cadr top) - frame-initial-frame-tool-bar-height))) + (list '+ (+ (cadr top) height))) ((and (consp top) (eq '- (car top))) - (list '- (- (cadr top) - frame-initial-frame-tool-bar-height))) - (t (+ top frame-initial-frame-tool-bar-height))))) + (list '- (- (cadr top) height))) + (t (+ top height))))) (modify-frame-parameters frame-initial-frame `((top . ,adjusted-top)))))) - (tool-bar-mode -1)))) + ;; Reset `tool-bar-mode' when zero tool bar lines have been + ;; requested for the window-system or default frame alists. + (when (and tool-bar-mode + (and other-lines + (or (null (cdr other-lines)) + (eq 0 (cdr other-lines))))) + (tool-bar-mode -1))))) ;; The initial frame we create above always has a minibuffer. ;; If the user wants to remove it, or make it a minibuffer-only @@ -682,6 +685,9 @@ the new frame according to its own rules." (push p params))) ;; Now make the frame. (run-hooks 'before-make-frame-hook) + +;; (setq frame-adjust-size-history '(t)) + (setq frame (funcall (gui-method frame-creation-function w) params)) (normal-erase-is-backspace-setup-frame frame) @@ -690,6 +696,12 @@ the new frame according to its own rules." (unless (assq param parameters) ;Overridden by explicit parameters. (let ((val (frame-parameter oldframe param))) (when val (set-frame-parameter frame param val))))) + + (when (eq (car frame-adjust-size-history) t) + (setq frame-adjust-size-history + (cons t (cons (list "Frame made") + (cdr frame-adjust-size-history))))) + (run-hook-with-args 'after-make-frame-functions frame) frame)) diff --git a/src/ChangeLog b/src/ChangeLog index 75e9ad5..ea6274f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,49 @@ +2015-01-12 Martin Rudalics + + * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to + adjust_frame_size. + * frame.c (frame_default_tool_bar_height): New variable. + (adjust_frame_size): Possibly add requested adjustment to + Vframe_adjust_size_history. + (make_frame): Initialize tool_bar_redisplayed_once slot. + (Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify + doc-string. Call adjust_frame_size unconditionally (the frame's + text size may remain unaltered but the pixel size may change). + (x_figure_window_size): If frame_default_tool_bar_height was + set, use it instead of calculating the tool bar height from + DEFAULT_TOOL_BAR_IMAGE_HEIGHT. Don't set + Vframe_initial_frame_tool_bar_height. + (Qchange_frame_size, Qxg_frame_set_char_size) + (Qset_window_configuration, Qx_create_frame_1) + (Qx_create_frame_2): New symbols. + (Vframe_initial_frame_tool_bar_height): Remove. + (Vframe_adjust_size_history): New history variable for debugging + frame size adjustments. + * frame.h (struct frame): New boolean slot + tool_bar_redisplayed_once. + (frame_default_tool_bar_height): Extern. + * gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size + to adjust_frame_size. + * nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and + Qx_create_frame_2 to adjust_frame_size. + * w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with + inhibit 1 when we have not redisplayed the tool bar yet. + (Fx_create_frame): Pass Pass Qx_create_frame_1 and + Qx_create_frame_2 to adjust_frame_size. + * w32menu.c (set_frame_menubar): Simplify adjust_frame_size + call. + * window.c (Fset_window_configuration): Pass + Qset_window_configuration to adjust_frame_size. + * xdisp.c (redisplay_tool_bar): Assign new height to + frame_default_tool_bar_height. + (redisplay_internal): If we haven't redisplayed this frame's + tool bar, call redisplay_tool_bar early so we can adjust the + frame size accordingly. + * xfns.c (x_change_tool_bar_height): Call adjust_frame_size with + inhibit 1 when we have not redisplayed the tool bar yet. + (Fx_create_frame): Pass Pass Qx_create_frame_1 and + Qx_create_frame_2 to adjust_frame_size. + 2015-01-12 Paul Eggert Have 'make' output better GEN names diff --git a/src/dispnew.c b/src/dispnew.c index cefcd08..a643d58 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5523,7 +5523,8 @@ change_frame_size_1 (struct frame *f, int new_width, int new_height, /* Adjust frame size but make sure x_set_window_size does not get called. */ - adjust_frame_size (f, new_width, new_height, 5, pretend, Qnil); + adjust_frame_size (f, new_width, new_height, 5, pretend, + Qchange_frame_size); } } diff --git a/src/frame.c b/src/frame.c index 3d2ffbf..0eb51bd 100644 --- a/src/frame.c +++ b/src/frame.c @@ -67,6 +67,9 @@ static struct frame *last_nonminibuf_frame; /* False means there are no visible garbaged frames. */ bool frame_garbaged; +/* The default tool bar height for future frames. */ +int frame_default_tool_bar_height; + #ifdef HAVE_WINDOW_SYSTEM static void x_report_frame_params (struct frame *, Lisp_Object *); #endif @@ -358,6 +361,20 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, Lisp_Object frame; XSETFRAME (frame, f); + + /* `make-frame' initializes Vframe_adjust_size_history to (Qt) and + strips its car when exiting. Just in case make sure its size never + exceeds 100. */ + if (!NILP (Fconsp (Vframe_adjust_size_history)) + && EQ (Fcar (Vframe_adjust_size_history), Qt) + && XFASTINT (Fsafe_length (Vframe_adjust_size_history)) <= 100) + Vframe_adjust_size_history = + Fcons (Qt, Fcons (list5 (make_number (0), + make_number (new_text_width), + make_number (new_text_height), + make_number (inhibit), parameter), + Fcdr (Vframe_adjust_size_history))); + /* The following two values are calculated from the old window body sizes and any "new" settings for scroll bars, dividers, fringes and margins (though the latter should have been processed already). */ @@ -425,6 +442,17 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, else if (inhibit_vertical) new_text_height = old_text_height; + if (!NILP (Fconsp (Vframe_adjust_size_history)) + && EQ (Fcar (Vframe_adjust_size_history), Qt) + && XFASTINT (Fsafe_length (Vframe_adjust_size_history)) <= 100) + Vframe_adjust_size_history = + Fcons (Qt, Fcons (list5 (make_number (1), + make_number (new_text_width), + make_number (new_text_height), + make_number (new_cols), + make_number (new_lines)), + Fcdr (Vframe_adjust_size_history))); + x_set_window_size (f, 0, new_text_width, new_text_height, 1); f->resized_p = true; @@ -496,6 +524,17 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, SET_FRAME_COLS (f, new_cols); SET_FRAME_LINES (f, new_lines); + if (!NILP (Fconsp (Vframe_adjust_size_history)) + && EQ (Fcar (Vframe_adjust_size_history), Qt) + && XFASTINT (Fsafe_length (Vframe_adjust_size_history)) <= 100) + Vframe_adjust_size_history = + Fcons (Qt, Fcons (list5 (make_number (2), + make_number (new_text_width), + make_number (new_text_height), + make_number (new_cols), + make_number (new_lines)), + Fcdr (Vframe_adjust_size_history))); + { struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); int text_area_x, text_area_y, text_area_width, text_area_height; @@ -554,6 +593,7 @@ make_frame (bool mini_p) f->garbaged = true; f->can_x_set_window_size = false; f->can_run_window_configuration_change_hook = false; + f->tool_bar_redisplayed_once = false; f->column_width = 1; /* !FRAME_WINDOW_P value. */ f->line_height = 1; /* !FRAME_WINDOW_P value. */ #ifdef HAVE_WINDOW_SYSTEM @@ -2808,7 +2848,7 @@ DEFUN ("frame-bottom-divider-width", Fbottom_divider_width, Sbottom_divider_widt } DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 4, 0, - doc: /* Set height of frame FRAME to HEIGHT lines. + doc: /* Set text height of frame FRAME to HEIGHT lines. Optional third arg PRETEND non-nil means that redisplay should use HEIGHT lines but that the idea of the actual height of the frame should not be changed. @@ -2827,14 +2867,13 @@ multiple of the default frame font height. */) pixel_height = (!NILP (pixelwise) ? XINT (height) : XINT (height) * FRAME_LINE_HEIGHT (f)); - if (pixel_height != FRAME_TEXT_HEIGHT (f)) - adjust_frame_size (f, -1, pixel_height, 1, !NILP (pretend), Qheight); + adjust_frame_size (f, -1, pixel_height, 1, !NILP (pretend), Qheight); return Qnil; } DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 4, 0, - doc: /* Set width of frame FRAME to WIDTH columns. + doc: /* Set text width of frame FRAME to WIDTH columns. Optional third arg PRETEND non-nil means that redisplay should use WIDTH columns but that the idea of the actual width of the frame should not be changed. @@ -2853,14 +2892,13 @@ multiple of the default frame font width. */) pixel_width = (!NILP (pixelwise) ? XINT (width) : XINT (width) * FRAME_COLUMN_WIDTH (f)); - if (pixel_width != FRAME_TEXT_WIDTH (f)) - adjust_frame_size (f, pixel_width, -1, 1, !NILP (pretend), Qwidth); + adjust_frame_size (f, pixel_width, -1, 1, !NILP (pretend), Qwidth); return Qnil; } DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 4, 0, - doc: /* Set size of FRAME to WIDTH by HEIGHT, measured in characters. + doc: /* Set text size of FRAME to WIDTH by HEIGHT, measured in characters. Optional argument PIXELWISE non-nil means to measure in pixels. Note: When `frame-resize-pixelwise' is nil, some window managers may refuse to honor a WIDTH that is not an integer multiple of the default frame font @@ -2880,10 +2918,7 @@ font height. */) pixel_height = (!NILP (pixelwise) ? XINT (height) : XINT (height) * FRAME_LINE_HEIGHT (f)); - - if (pixel_width != FRAME_TEXT_WIDTH (f) - || pixel_height != FRAME_TEXT_HEIGHT (f)) - adjust_frame_size (f, pixel_width, pixel_height, 1, 0, Qsize); + adjust_frame_size (f, pixel_width, pixel_height, 1, 0, Qsize); return Qnil; } @@ -4492,23 +4527,27 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p) frames without having to guess how tall the tool bar will get. */ if (toolbar_p && FRAME_TOOL_BAR_LINES (f)) { - int margin, relief; + if (frame_default_tool_bar_height) + FRAME_TOOL_BAR_HEIGHT (f) = frame_default_tool_bar_height; + else + { + int margin, relief; - relief = (tool_bar_button_relief >= 0 - ? tool_bar_button_relief - : DEFAULT_TOOL_BAR_BUTTON_RELIEF); + relief = (tool_bar_button_relief >= 0 + ? tool_bar_button_relief + : DEFAULT_TOOL_BAR_BUTTON_RELIEF); - if (RANGED_INTEGERP (1, Vtool_bar_button_margin, INT_MAX)) - margin = XFASTINT (Vtool_bar_button_margin); - else if (CONSP (Vtool_bar_button_margin) - && RANGED_INTEGERP (1, XCDR (Vtool_bar_button_margin), INT_MAX)) - margin = XFASTINT (XCDR (Vtool_bar_button_margin)); - else - margin = 0; + if (RANGED_INTEGERP (1, Vtool_bar_button_margin, INT_MAX)) + margin = XFASTINT (Vtool_bar_button_margin); + else if (CONSP (Vtool_bar_button_margin) + && RANGED_INTEGERP (1, XCDR (Vtool_bar_button_margin), INT_MAX)) + margin = XFASTINT (XCDR (Vtool_bar_button_margin)); + else + margin = 0; - FRAME_TOOL_BAR_HEIGHT (f) - = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief; - Vframe_initial_frame_tool_bar_height = make_number (FRAME_TOOL_BAR_HEIGHT (f)); + FRAME_TOOL_BAR_HEIGHT (f) + = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief; + } } top = x_get_arg (dpyinfo, parms, Qtop, 0, 0, RES_TYPE_NUMBER); @@ -4779,6 +4818,11 @@ syms_of_frame (void) DEFSYM (Qtool_bar_external, "tool-bar-external"); DEFSYM (Qtool_bar_size, "tool-bar-size"); DEFSYM (Qframe_inner_size, "frame-inner-size"); + DEFSYM (Qchange_frame_size, "change-frame-size"); + DEFSYM (Qxg_frame_set_char_size, "xg-frame-set-char-size"); + DEFSYM (Qset_window_configuration, "set-window-configuration"); + DEFSYM (Qx_create_frame_1, "x-create-frame-1"); + DEFSYM (Qx_create_frame_2, "x-create-frame-2"); #ifdef HAVE_NS DEFSYM (Qns_parse_geometry, "ns-parse-geometry"); @@ -4968,10 +5012,6 @@ or call the function `tool-bar-mode'. */); Vtool_bar_mode = Qnil; #endif - DEFVAR_LISP ("frame-initial-frame-tool-bar-height", Vframe_initial_frame_tool_bar_height, - doc: /* Height of tool bar of initial frame. */); - Vframe_initial_frame_tool_bar_height = make_number (0); - DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, doc: /* Minibufferless frames use this frame's minibuffer. Emacs cannot create minibufferless frames unless this is set to an @@ -5050,6 +5090,10 @@ even if this option is non-nil. */); frame_inhibit_implied_resize = Qt; #endif + DEFVAR_LISP ("frame-adjust-size-history", Vframe_adjust_size_history, + doc: /* History of frame size adjustments. */); + Vframe_adjust_size_history = Qnil; + staticpro (&Vframe_list); defsubr (&Sframep); diff --git a/src/frame.h b/src/frame.h index d1ed4d4..cb0044c 100644 --- a/src/frame.h +++ b/src/frame.h @@ -336,6 +336,10 @@ struct frame for this frame. */ bool_bf can_run_window_configuration_change_hook : 1; + /* True means tool bar has been redisplayed at least once in current + session. */ + bool_bf tool_bar_redisplayed_once : 1; + /* Bitfield area ends here. */ /* Number of lines (rounded up) of tool bar. REMOVE THIS */ @@ -1096,6 +1100,8 @@ SET_FRAME_VISIBLE (struct frame *f, int v) extern Lisp_Object selected_frame; +extern int frame_default_tool_bar_height; + extern struct frame *decode_window_system_frame (Lisp_Object); extern struct frame *decode_live_frame (Lisp_Object); extern struct frame *decode_any_frame (Lisp_Object); diff --git a/src/gtkutil.c b/src/gtkutil.c index bedac84..694278a 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -954,7 +954,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height) x_wait_for_event (f, ConfigureNotify); } else - adjust_frame_size (f, -1, -1, 5, 0, Qnil); + adjust_frame_size (f, -1, -1, 5, 0, Qxg_frame_set_char_size); } /* Handle height/width changes (i.e. add/remove/move menu/toolbar). diff --git a/src/nsfns.m b/src/nsfns.m index 828ee88..cc2e496 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1251,7 +1251,8 @@ This function is an internal primitive--use `make-frame' instead. */) /* Read comment about this code in corresponding place in xfns.c. */ adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), - FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1, Qnil); + FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1, + Qx_create_frame_1); /* The resources controlling the menu-bar and tool-bar are processed specially at startup, and reflected in the mode @@ -1325,7 +1326,8 @@ This function is an internal primitive--use `make-frame' instead. */) /* Allow x_set_window_size, now. */ f->can_x_set_window_size = true; - adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 0, 1, Qnil); + adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 0, 1, + Qx_create_frame_2); if (! f->output_data.ns->explicit_parent) { diff --git a/src/w32fns.c b/src/w32fns.c index 789a91a..3b8346a 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -1744,8 +1744,11 @@ x_change_tool_bar_height (struct frame *f, int height) /* Recalculate toolbar height. */ f->n_tool_bar_rows = 0; - adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0, - Qtool_bar_lines); + adjust_frame_size (f, -1, -1, + (!f->tool_bar_redisplayed_once ? 1 + : (old_height == 0 || height == 0) ? 2 + : 4), + 0, Qtool_bar_lines); /* adjust_frame_size might not have done anything, garbage frame here. */ @@ -4617,7 +4620,8 @@ This function is an internal primitive--use `make-frame' instead. */) had one frame line vs one toolbar line which left us with a zero root window height which was obviously wrong as well ... */ adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), - FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1, Qnil); + FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1, + Qx_create_frame_1); /* The X resources controlling the menu-bar and tool-bar are processed specially at startup, and reflected in the mode @@ -4685,7 +4689,8 @@ This function is an internal primitive--use `make-frame' instead. */) /* Allow x_set_window_size, now. */ f->can_x_set_window_size = true; - adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 0, 1, Qnil); + adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 0, 1, + Qx_create_frame_2); /* Tell the server what size and position, etc, we want, and how badly we want them. This should be done after we have the menu diff --git a/src/w32menu.c b/src/w32menu.c index 7a946d2..a65e399 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -501,8 +501,7 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p) /* Force the window size to be recomputed so that the frame's text area remains the same, if menubar has just been created. */ if (old_widget == NULL) - adjust_frame_size (f, FRAME_TEXT_WIDTH (f), - FRAME_TEXT_HEIGHT (f), 2, 0, Qmenu_bar_lines); + adjust_frame_size (f, -1, -1, 2, 0, Qmenu_bar_lines); } unblock_input (); diff --git a/src/window.c b/src/window.c index 1d2221f..5ae95f2 100644 --- a/src/window.c +++ b/src/window.c @@ -6421,7 +6421,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, Qnil); + adjust_frame_size (f, -1, -1, 1, 0, Qset_window_configuration); adjust_frame_glyphs (f); unblock_input (); diff --git a/src/xdisp.c b/src/xdisp.c index 31702ed..f006f8e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12352,6 +12352,7 @@ redisplay_tool_bar (struct frame *f) if (new_height != WINDOW_PIXEL_HEIGHT (w)) { x_change_tool_bar_height (f, new_height); + frame_default_tool_bar_height = new_height; /* Always do that now. */ clear_glyph_matrix (w->desired_matrix); f->fonts_changed = 1; @@ -12446,6 +12447,7 @@ redisplay_tool_bar (struct frame *f) if (change_height_p) { x_change_tool_bar_height (f, new_height); + frame_default_tool_bar_height = new_height; clear_glyph_matrix (w->desired_matrix); f->n_tool_bar_rows = nrows; f->fonts_changed = 1; @@ -13775,6 +13777,17 @@ redisplay_internal (void) retry_frame: +#if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_GTK) && !defined (HAVE_NS) + /* Redisplay internal tool bar if this is the first time so we + can adjust the frame height right now, if necessary. */ + if (!f->tool_bar_redisplayed_once) + { + if (redisplay_tool_bar (f)) + adjust_frame_glyphs (f); + f->tool_bar_redisplayed_once = true; + } +#endif + if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf) { bool gcscrollbars diff --git a/src/xfns.c b/src/xfns.c index 4a41752..936c769 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1130,8 +1130,11 @@ x_change_tool_bar_height (struct frame *f, int height) /* Recalculate toolbar height. */ f->n_tool_bar_rows = 0; - adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0, - Qtool_bar_lines); + adjust_frame_size (f, -1, -1, + (!f->tool_bar_redisplayed_once ? 1 + : (old_height == 0 || height == 0) ? 2 + : 4), + 0, Qtool_bar_lines); /* adjust_frame_size might not have done anything, garbage frame here. */ @@ -3160,7 +3163,8 @@ This function is an internal primitive--use `make-frame' instead. */) had one frame line vs one toolbar line which left us with a zero root window height which was obviously wrong as well ... */ adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), - FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1, Qnil); + FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1, + Qx_create_frame_1); /* Set the menu-bar-lines and tool-bar-lines parameters. We don't look up the X resources controlling the menu-bar and tool-bar @@ -3234,7 +3238,8 @@ This function is an internal primitive--use `make-frame' instead. */) /* Consider frame official, now. */ f->can_x_set_window_size = true; - adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 0, 1, Qnil); + adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 0, 1, + Qx_create_frame_2); #if defined (USE_X_TOOLKIT) || defined (USE_GTK) /* Create the menu bar. */ commit d703a4dce564ede122f5c307889e4bd0e3f3e75c Author: Paul Eggert Date: Sun Jan 11 18:19:31 2015 -0800 Have 'make' output better GEN names * lisp/Makefile.in (PHONY_EXTRAS): New macro. (.PHONY): Depend on it, and on $(lisp)/loaddefs.el, so that the relevant files' time stamps are ignored. (custom-deps, $(lisp)/cus-load.el, finder-data) ($(lisp)/finder-inf.el): Use PHONY_EXTRAS. (custom-deps, $(lisp)/cus-load.el, finder-data) ($(lisp)/finder-inf.el, autoloads, $(lisp)/loaddefs.el) ($(lisp)/subdirs.el, update-subdirs): Output more-accurate destination names with GEN. * src/Makefile.in (gl-stamp, globals.h): Simplify by putting the new contents of globals.h into gl-stamp. This lets us use AM_V_GEN more naturally so that 'make' can output more-accurate names. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7a20822..6a47853 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,16 @@ 2015-01-12 Paul Eggert + Have 'make' output better GEN names + * Makefile.in (PHONY_EXTRAS): New macro. + (.PHONY): Depend on it, and on $(lisp)/loaddefs.el, so that the + relevant files' time stamps are ignored. + (custom-deps, $(lisp)/cus-load.el, finder-data) + ($(lisp)/finder-inf.el): Use PHONY_EXTRAS. + (custom-deps, $(lisp)/cus-load.el, finder-data) + ($(lisp)/finder-inf.el, autoloads, $(lisp)/loaddefs.el) + ($(lisp)/subdirs.el, update-subdirs): + Output more-accurate destination names with GEN. + Say "ELC foo.elc" instead of "GEN foo.elc" * Makefile.in (AM_V_ELC, am__v_ELC_, am__v_ELC_0, am__v_ELC_1): New macros. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index bb61cab..7bf5386 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -150,7 +150,8 @@ setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \ # we add them here to make sure they get built. all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el -.PHONY: all custom-deps finder-data autoloads update-subdirs +PHONY_EXTRAS = +.PHONY: all custom-deps finder-data autoloads update-subdirs $(PHONY_EXTRAS) # custom-deps and finder-data both used to scan _all_ the *.el files. # This could lead to problems in parallel builds if automatically @@ -166,18 +167,19 @@ all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el # Nowadays these commands don't scan automatically generated files, # since they will never contain any useful information # (see finder-no-scan-regexp and custom-dependencies-no-scan-regexp). -$(lisp)/cus-load.el: - $(MAKE) custom-deps custom-deps: + $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/cus-load.el $(lisp)/cus-load.el +$(lisp)/cus-load.el: $(AM_V_GEN)$(setwins_almost); \ echo Directories: $$wins; \ $(emacs) -l cus-dep \ --eval '(setq generated-custom-dependencies-file (unmsys--file-name "$(srcdir)/cus-load.el"))' \ -f custom-make-dependencies $$wins -$(lisp)/finder-inf.el: - $(MAKE) finder-data finder-data: + $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/finder-inf.el \ + $(lisp)/finder-inf.el +$(lisp)/finder-inf.el: $(AM_V_GEN)$(setwins_finder); \ echo Directories: $$wins; \ $(emacs) -l finder \ @@ -190,21 +192,22 @@ finder-data: # Note that we set no-update-autoloads in _generated_ leim files. # If you want to allow autoloads in such files, remove that, # and make this depend on leim. -autoloads: $(LOADDEFS) +autoloads .PHONY: $(lisp)/loaddefs.el +$(lisp)/loaddefs.el: $(LOADDEFS) $(AM_V_GEN)$(setwins_almost); \ echo Directories: $$wins; \ $(emacs) -l autoload \ --eval '(setq autoload-ensure-writable t)' \ --eval '(setq autoload-builtin-package-versions t)' \ - --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \ + --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$@")))' \ -f batch-update-autoloads $$wins # This is required by the bootstrap-emacs target in ../src/Makefile, so # we know that if we have an emacs executable, we also have a subdirs.el. $(lisp)/subdirs.el: - $(MAKE) update-subdirs + $(AM_V_GEN)$(MAKE) update-subdirs update-subdirs: - $(AM_V_GEN)$(setwins_for_subdirs); \ + $(AM_V_at)$(setwins_for_subdirs); \ for file in $$wins; do \ $(srcdir)/../build-aux/update-subdirs $$file; \ done; diff --git a/src/ChangeLog b/src/ChangeLog index 3767622..75e9ad5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2015-01-12 Paul Eggert + + Have 'make' output better GEN names + * Makefile.in (gl-stamp, globals.h): Simplify by putting the new + contents of globals.h into gl-stamp. This lets us use AM_V_GEN + more naturally so that 'make' can output more-accurate names. + 2015-01-11 Stefan Monnier * buffer.c (init_buffer_once): Initialize buffer_local_flags before diff --git a/src/Makefile.in b/src/Makefile.in index a2754ea..2ac34f5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -492,14 +492,13 @@ buildobj.h: Makefile done >$@.tmp $(AM_V_at)mv $@.tmp $@ -globals.h: gl-stamp; @true - GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) - $(AM_V_GEN)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) > gl.tmp - $(AM_V_at)$(top_srcdir)/build-aux/move-if-change gl.tmp globals.h - $(AM_V_at)echo timestamp > $@ + $(AM_V_GEN)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) >$@ + +globals.h: gl-stamp + $(AM_V_GEN)cmp $< $@ >/dev/null || cp $< $@ $(ALLOBJS): globals.h commit c2774f3733a7bdd58616b42da172d1b32932dd03 Author: Paul Eggert Date: Sun Jan 11 17:41:57 2015 -0800 Say "ELC foo.elc" instead of "GEN foo.elc" * admin/unidata/Makefile.in, lisp/Makefile.in (AM_V_ELC) (am__v_ELC_, am__v_ELC_0, am__v_ELC_1): New macros. * admin/unidata/Makefile.in (%.elc): * lisp/Makefile.in ($(THEFILE)c, .el.elc): Use them. diff --git a/admin/ChangeLog b/admin/ChangeLog index dc029a0..2b04281 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,10 @@ +2015-01-12 Paul Eggert + + Say "ELC foo.elc" instead of "GEN foo.elc" + * unidata/Makefile.in (AM_V_ELC, am__v_ELC_, am__v_ELC_0) + (am__v_ELC_1): New macros. + (%.elc): Use them. + 2015-01-08 Glenn Morris * authors.el (authors-aliases): Add an entry to ignore. diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in index 777d127..1396f09 100644 --- a/admin/unidata/Makefile.in +++ b/admin/unidata/Makefile.in @@ -34,6 +34,11 @@ emacs = "${EMACS}" -batch --no-site-file --no-site-lisp # 'make' verbosity. AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AM_V_ELC = $(am__v_ELC_@AM_V@) +am__v_ELC_ = $(am__v_ELC_@AM_DEFAULT_V@) +am__v_ELC_0 = @echo " ELC " $@; +am__v_ELC_1 = + AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; @@ -58,7 +63,7 @@ ${top_srcdir}/src/macuvs.h: ${srcdir}/uvs.el ${srcdir}/IVD_Sequences.txt | \ > $@ %.elc: %.el - $(AM_V_GEN)${emacs} -f batch-byte-compile $< + $(AM_V_ELC)${emacs} -f batch-byte-compile $< unidata.txt: ${srcdir}/UnicodeData.txt $(AM_V_GEN)sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' \ diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 598f9c6..7a20822 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2015-01-12 Paul Eggert + + Say "ELC foo.elc" instead of "GEN foo.elc" + * Makefile.in (AM_V_ELC, am__v_ELC_, am__v_ELC_0, am__v_ELC_1): + New macros. + ($(THEFILE)c, .el.elc): Use them. + 2015-01-11 Michael Albinus * files.el (directory-files-recursively): Do not include diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 565ca77..bb61cab 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -31,6 +31,11 @@ XARGS_LIMIT = @XARGS_LIMIT@ # 'make' verbosity. AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AM_V_ELC = $(am__v_ELC_@AM_V@) +am__v_ELC_ = $(am__v_ELC_@AM_DEFAULT_V@) +am__v_ELC_0 = @echo " ELC " $@; +am__v_ELC_1 = + AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; @@ -260,7 +265,7 @@ TAGS: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4) THEFILE = no-such-file .PHONY: $(THEFILE)c $(THEFILE)c: - $(AM_V_GEN)$(emacs) $(BYTE_COMPILE_FLAGS) \ + $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \ -l bytecomp -f byte-compile-refresh-preloaded \ -f batch-byte-compile $(THEFILE) @@ -276,7 +281,7 @@ $(THEFILE)c: # An old-fashioned suffix rule, which, according to the GNU Make manual, # cannot have prerequisites. .el.elc: - $(AM_V_GEN)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $< + $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $< .PHONY: compile-first compile-main compile compile-always commit 23ffeb9015ca3669995b9a5d47cfc09b7643d9b9 Author: Stefan Monnier Date: Sun Jan 11 17:38:04 2015 -0500 * src/buffer.c (init_buffer_once): Initialize buffer_local_flags early. * src/buffer.c (init_buffer_once): Initialize buffer_local_flags before calling reset_buffer_local_variables, and make sure we initialize it completely. diff --git a/src/ChangeLog b/src/ChangeLog index cd76aaa..3767622 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2015-01-11 Stefan Monnier + + * buffer.c (init_buffer_once): Initialize buffer_local_flags before + calling reset_buffer_local_variables, and make sure we initialize + it completely. + 2015-01-11 Dmitry Antipov * coding.c (Fcoding_system_plist): Use common style for docstring. diff --git a/src/buffer.c b/src/buffer.c index e084372..d0ffe67d9 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5027,6 +5027,93 @@ init_buffer_once (void) memset (buffer_permanent_local_flags, 0, sizeof buffer_permanent_local_flags); + /* 0 means not a lisp var, -1 means always local, else mask. */ + memset (&buffer_local_flags, 0, sizeof buffer_local_flags); + bset_filename (&buffer_local_flags, make_number (-1)); + bset_directory (&buffer_local_flags, make_number (-1)); + bset_backed_up (&buffer_local_flags, make_number (-1)); + bset_save_length (&buffer_local_flags, make_number (-1)); + bset_auto_save_file_name (&buffer_local_flags, make_number (-1)); + bset_read_only (&buffer_local_flags, make_number (-1)); + bset_major_mode (&buffer_local_flags, make_number (-1)); + bset_mode_name (&buffer_local_flags, make_number (-1)); + bset_undo_list (&buffer_local_flags, make_number (-1)); + bset_mark_active (&buffer_local_flags, make_number (-1)); + bset_point_before_scroll (&buffer_local_flags, make_number (-1)); + bset_file_truename (&buffer_local_flags, make_number (-1)); + bset_invisibility_spec (&buffer_local_flags, make_number (-1)); + bset_file_format (&buffer_local_flags, make_number (-1)); + bset_auto_save_file_format (&buffer_local_flags, make_number (-1)); + bset_display_count (&buffer_local_flags, make_number (-1)); + bset_display_time (&buffer_local_flags, make_number (-1)); + bset_enable_multibyte_characters (&buffer_local_flags, make_number (-1)); + + /* These used to be stuck at 0 by default, but now that the all-zero value + means Qnil, we have to initialize them explicitly. */ + bset_name (&buffer_local_flags, make_number (0)); + bset_mark (&buffer_local_flags, make_number (0)); + bset_local_var_alist (&buffer_local_flags, make_number (0)); + bset_keymap (&buffer_local_flags, make_number (0)); + bset_downcase_table (&buffer_local_flags, make_number (0)); + bset_upcase_table (&buffer_local_flags, make_number (0)); + bset_case_canon_table (&buffer_local_flags, make_number (0)); + bset_case_eqv_table (&buffer_local_flags, make_number (0)); + bset_minor_modes (&buffer_local_flags, make_number (0)); + bset_width_table (&buffer_local_flags, make_number (0)); + bset_pt_marker (&buffer_local_flags, make_number (0)); + bset_begv_marker (&buffer_local_flags, make_number (0)); + bset_zv_marker (&buffer_local_flags, make_number (0)); + bset_last_selected_window (&buffer_local_flags, make_number (0)); + + idx = 1; + XSETFASTINT (BVAR (&buffer_local_flags, mode_line_format), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, abbrev_mode), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, overwrite_mode), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, case_fold_search), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, auto_fill_function), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, selective_display), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, selective_display_ellipses), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, tab_width), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, truncate_lines), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, word_wrap), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, ctl_arrow), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, fill_column), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, left_margin), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, abbrev_table), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, display_table), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, syntax_table), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, cache_long_scans), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, category_table), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, bidi_display_reordering), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, bidi_paragraph_direction), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, buffer_file_coding_system), idx); + /* Make this one a permanent local. */ + buffer_permanent_local_flags[idx++] = 1; + XSETFASTINT (BVAR (&buffer_local_flags, left_margin_cols), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, right_margin_cols), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, left_fringe_width), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, right_fringe_width), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, fringes_outside_margins), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, scroll_bar_width), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, scroll_bar_height), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, vertical_scroll_bar_type), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, horizontal_scroll_bar_type), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, indicate_empty_lines), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, indicate_buffer_boundaries), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, fringe_indicator_alist), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, fringe_cursor_alist), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, scroll_up_aggressively), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, scroll_down_aggressively), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, header_line_format), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, cursor_type), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, extra_line_spacing), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, cursor_in_non_selected_windows), idx); ++idx; + + /* Need more room? */ + if (idx >= MAX_PER_BUFFER_VARS) + emacs_abort (); + last_per_buffer_idx = idx; + /* Make sure all markable slots in buffer_defaults are initialized reasonably, so mark_buffer won't choke. */ reset_buffer (&buffer_defaults); @@ -5113,79 +5200,9 @@ init_buffer_once (void) to say that it has its own local value for the slot. The local flag bits are in the local_var_flags slot of the buffer. */ - /* Nothing can work if this isn't true */ + /* Nothing can work if this isn't true. */ { verify (sizeof (EMACS_INT) == word_size); } - /* 0 means not a lisp var, -1 means always local, else mask */ - memset (&buffer_local_flags, 0, sizeof buffer_local_flags); - bset_filename (&buffer_local_flags, make_number (-1)); - bset_directory (&buffer_local_flags, make_number (-1)); - bset_backed_up (&buffer_local_flags, make_number (-1)); - bset_save_length (&buffer_local_flags, make_number (-1)); - bset_auto_save_file_name (&buffer_local_flags, make_number (-1)); - bset_read_only (&buffer_local_flags, make_number (-1)); - bset_major_mode (&buffer_local_flags, make_number (-1)); - bset_mode_name (&buffer_local_flags, make_number (-1)); - bset_undo_list (&buffer_local_flags, make_number (-1)); - bset_mark_active (&buffer_local_flags, make_number (-1)); - bset_point_before_scroll (&buffer_local_flags, make_number (-1)); - bset_file_truename (&buffer_local_flags, make_number (-1)); - bset_invisibility_spec (&buffer_local_flags, make_number (-1)); - bset_file_format (&buffer_local_flags, make_number (-1)); - bset_auto_save_file_format (&buffer_local_flags, make_number (-1)); - bset_display_count (&buffer_local_flags, make_number (-1)); - bset_display_time (&buffer_local_flags, make_number (-1)); - bset_enable_multibyte_characters (&buffer_local_flags, make_number (-1)); - - idx = 1; - XSETFASTINT (BVAR (&buffer_local_flags, mode_line_format), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, abbrev_mode), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, overwrite_mode), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, case_fold_search), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, auto_fill_function), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, selective_display), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, selective_display_ellipses), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, tab_width), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, truncate_lines), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, word_wrap), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, ctl_arrow), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, fill_column), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, left_margin), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, abbrev_table), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, display_table), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, syntax_table), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, cache_long_scans), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, category_table), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, bidi_display_reordering), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, bidi_paragraph_direction), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, buffer_file_coding_system), idx); - /* Make this one a permanent local. */ - buffer_permanent_local_flags[idx++] = 1; - XSETFASTINT (BVAR (&buffer_local_flags, left_margin_cols), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, right_margin_cols), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, left_fringe_width), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, right_fringe_width), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, fringes_outside_margins), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, scroll_bar_width), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, scroll_bar_height), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, vertical_scroll_bar_type), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, horizontal_scroll_bar_type), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, indicate_empty_lines), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, indicate_buffer_boundaries), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, fringe_indicator_alist), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, fringe_cursor_alist), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, scroll_up_aggressively), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, scroll_down_aggressively), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, header_line_format), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, cursor_type), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, extra_line_spacing), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, cursor_in_non_selected_windows), idx); ++idx; - - /* Need more room? */ - if (idx >= MAX_PER_BUFFER_VARS) - emacs_abort (); - last_per_buffer_idx = idx; - Vbuffer_alist = Qnil; current_buffer = 0; all_buffers = 0; @@ -5202,7 +5219,7 @@ init_buffer_once (void) DEFSYM (Qkill_buffer_hook, "kill-buffer-hook"); Fput (Qkill_buffer_hook, Qpermanent_local, Qt); - /* super-magic invisible buffer */ + /* Super-magic invisible buffer. */ Vprin1_to_string_buffer = Fget_buffer_create (build_pure_c_string (" prin1")); Vbuffer_alist = Qnil; commit 509257822ca20ea170ba810b8b679a6dc800dd44 Author: Dmitry Antipov Date: Sun Jan 11 20:42:53 2015 +0300 * coding.c (Fcoding_system_plist): Use common style for docstring. diff --git a/src/ChangeLog b/src/ChangeLog index 8f441be..cd76aaa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2015-01-11 Dmitry Antipov + + * coding.c (Fcoding_system_plist): Use common style for docstring. + 2015-01-11 Paul Eggert Port to MSB hosts without optimization diff --git a/src/coding.c b/src/coding.c index 20c6476..b11143a 100644 --- a/src/coding.c +++ b/src/coding.c @@ -10671,7 +10671,7 @@ Any alias or subsidiary coding system is not a base coding system. */) DEFUN ("coding-system-plist", Fcoding_system_plist, Scoding_system_plist, 1, 1, 0, - doc: "Return the property list of CODING-SYSTEM.") + doc: /* Return the property list of CODING-SYSTEM. */) (Lisp_Object coding_system) { Lisp_Object spec, attrs; commit a3eebe9bbd78b16557b003a75f42bf1225c90414 Merge: 38bb639 4113ac2 Author: Michael Albinus Date: Sun Jan 11 16:00:33 2015 +0100 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs Conflicts: lisp/ChangeLog commit 4113ac253456027c4b54b92a617e0c2b3003a049 Author: Lars Magne Ingebrigtsen Date: Sun Jan 11 15:58:10 2015 +0100 Further eww URL DWIM tweaks * net/eww.el (eww): Interpret anything that looks like a protocol designator as a full URL. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 674b267..679de0c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-01-11 Lars Magne Ingebrigtsen + + * net/eww.el (eww): Interpret anything that looks like a protocol + designator as a full URL. + 2015-01-10 Lars Magne Ingebrigtsen * net/shr.el (shr-urlify): Don't bother the user about diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 6a6da17..71094b1 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -255,7 +255,9 @@ word(s) will be searched for via `eww-search-prefix'." ((string-match-p "\\`ftp://" url) (user-error "FTP is not supported.")) (t - (if (or (string-match "\\`https?:" url) + ;; Anything that starts with something that vaguely looks + ;; like a protocol designator is interpreted as a full URL. + (if (or (string-match "\\`[A-Za-z]+:" url) ;; Also try to match "naked" URLs like ;; en.wikipedia.org/wiki/Free software (string-match "\\`[A-Za-z_]+\\.[A-Za-z._]+/" url) commit 38bb639d552524f9d7311a99536d7b353aa2f029 Author: Michael Albinus Date: Sun Jan 11 15:58:06 2015 +0100 * files.el (directory-files-recursively): Do not include remote file names. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 674b267..fba541f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-01-11 Michael Albinus + + * files.el (directory-files-recursively): Do not include + superfluous remote file names. + 2015-01-10 Lars Magne Ingebrigtsen * net/shr.el (shr-urlify): Don't bother the user about diff --git a/lisp/files.el b/lisp/files.el index 1533c35..175f85b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -740,7 +740,10 @@ This function works recursively. Files are returned in \"depth first\" and alphabetical order. If INCLUDE-DIRECTORIES, also include directories that have matching names." (let ((result nil) - (files nil)) + (files nil) + ;; When DIR is "/", remote file names like "/method:" could + ;; also be offered. We shall suppress them. + (tramp-mode (and tramp-mode (file-remote-p dir)))) (dolist (file (sort (file-name-all-completions "" dir) 'string<)) (unless (member file '("./" "../")) commit 9a57bda31569294ecaf8138a06e5edda9c0d87e3 Author: Paul Eggert Date: Sun Jan 11 01:42:50 2015 -0800 Port to MSB hosts without optimization E.g., when configuring --with-wide-int CFLAGS='-O0' on x86, the inline function XTYPE needs to be declared before being used. * lisp.h (XTYPE): New forward declaration. diff --git a/src/ChangeLog b/src/ChangeLog index 14d582d..8f441be 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2015-01-11 Paul Eggert + + Port to MSB hosts without optimization + E.g., when configuring --with-wide-int CFLAGS='-O0' on x86, + the inline function XTYPE needs to be declared before being used. + * lisp.h (XTYPE): New forward declaration. + 2015-01-10 Paul Eggert Port to 32-bit --with-wide-int diff --git a/src/lisp.h b/src/lisp.h index 1fa1deb..9ed9375 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -610,6 +610,7 @@ INLINE bool (VECTORLIKEP) (Lisp_Object); INLINE bool WINDOWP (Lisp_Object); INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); INLINE struct Lisp_Symbol *(XSYMBOL) (Lisp_Object); +INLINE enum Lisp_Type (XTYPE) (Lisp_Object); INLINE void *(XUNTAG) (Lisp_Object, int); /* Defined in chartab.c. */