* lisp/loadup.el (purify-flag): Pre-grow the hash-table to reduce the
memory use.
* lisp/bindings.el (bindings--define-key): New function.
* lisp/vc/vc-hooks.el, lisp/replace.el, lisp/menu-bar.el:
* lisp/international/mule-cmds.el, lisp/emacs-lisp/lisp-mode.el:
* lisp/buff-menu.el, lisp/bookmark.el:
* bindings.el: Use it to purecopy define-key bindings.
* src/fns.c (maybe_resize_hash_table): Output message when growing the
purify-hashtable.
* lisp/info.el (info-emacs-bug): New command.
* lisp/menu-bar.el (menu-bar-help-menu): Add "How to Report a Bug" to Help.
* lisp/mail/emacsbug.el (report-emacs-bug): Replace with info-emacs-bug.
In particular, prevent it from setting non-font-related attributes
like the foreground and background color. This requires a bugfix to
face-spec-reset-face to make "resetting" the default face work.
* lisp/faces.el (face-spec-reset-face): Don't apply unspecified
attribute values to the default face.
* lisp/frame.el (set-frame-font): New arg ALL-FRAMES.
* lisp/menu-bar.el (menu-set-font): Use set-frame-font.
* menu-bar.el (menu-bar-file-menu): Add entry for making new
window on right of selected. (Bug#6786) Reword other window
entries and separate them from frame entries.
* src/gtkutil.c (XG_BIN_CHILD): New macro.
(xg_get_menu_item_label, xg_update_menubar)
(xg_update_menu_item, xg_tool_bar_menu_proxy)
(xg_show_toolbar_item, update_frame_tool_bar): Use it.
(separator_names, xg_separator_p): Move to keyboard.c.
(create_menus, xg_update_submenu, update_frame_tool_bar): Use
menu_separator_name_p.
* src/keyboard.c (parse_tool_bar_item): Allow menu separators in
tool-bar maps.
(menu_separator_name_p): New function, from gtkutil.c.
(separator_names): Move from gtkutil.c.
* src/keyboard.h (menu_separator_name_p): Add prototype.
* src/nsmenu.m (name_is_separator): Function deleted.
(addItemWithWidgetValue): Use menu_separator_name_p.
* src/w32menu.c (name_is_separator): Function deleted.
(add_menu_item): Use menu_separator_name_p.
menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p):
New functions.
(menu-bar-showhide-menu) <menu-bar-mode, showhide-tool-bar>: Use
them instead of `nil' and `>', respectively.
(menu-bar-showhide-tool-bar-menu): Use menu-bar-frame-for-menubar
instead of `nil'.
(toggle-menu-bar-mode-from-frame): Use menu-bar-frame-for-menubar
and menu-bar-positive-p instead of `nil' and `>', respectively.
Do NOT merge with trunk!
menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p): New functions.
(menu-bar-showhide-menu) <menu-bar-mode, showhide-tool-bar>: Use
them instead of `nil' and `>', respectively.
* lisp/menu-bar.el (menu-bar-files-menu): Make it into an actual alias,
rather than just an unused variable that inherits from the real one.
* doc/lispref/maps.texi (Standard Keymaps): Update File menu description.
* lisp/menu-bar.el (menu-bar-options-save): Fix handling of menu-bar
and tool-bar modes. (Bug#6211)
(menu-bar-mode): Move setting of standard-value after the
minor-mode definition, otherwise it seems to have no effect.
* lisp/menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left)
(menu-bar-showhide-tool-bar-menu-customize-disable)
(menu-bar-showhide-tool-bar-menu-customize-enable-right)
(menu-bar-showhide-tool-bar-menu-customize-enable-top)
(menu-bar-showhide-tool-bar-menu-customize-enable-bottom): New functions
(menu-bar-showhide-tool-bar-menu): If tool bar is moveable,
make a menu for Options => toolbar that can move it.
* src/frame.c (Qtool_bar_position): New variable.
(make_frame): Set tool_bar_position to Qtop.
(frame_parms): Add tool-bar-position.
(x_report_frame_params): Store tool_bar_position.
(x_set_fringe_width): Reset wm size hint after fringe changes.
* src/frame.h (struct frame): Add tool_bar_position.
(Qbottom): Declare.
* src/gtkutil.c (FRAME_TOTAL_PIXEL_WIDTH): New macro.
(xg_frame_set_char_size): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
(xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH.
(xg_create_frame_widgets): Create a hobox for placing widgets
vertically. Use gtk_box_pack_start.
(xg_height_or_width_changed): Renamed from xg_height_changed.
(x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width.
(xg_update_frame_menubar, free_frame_menubar): Change to
xg_height_or_width_changed.
(xg_tool_bar_detach_callback): Update left/right/top/bottom tool bar
size correctly. Remove hardcoded 4, instead use handlebox size -
toolbar size.
(xg_tool_bar_attach_callback): Update left/right/top/bottom tool bar
size correctly. Use handlebox size + toolbar size as additional
size.
(xg_pack_tool_bar): POS is a new parameter.
Set orientation of tool bar based on pos.
Only make handlebox_widget if NULL.
Check if tool bar goes to vbox or hbox depending on pos.
(xg_update_tool_bar_sizes): New function.
(update_frame_tool_bar): Remove old_req, new_req. Do not get tool bar
height, call xg_update_tool_bar_sizes instead.
(free_frame_tool_bar): Remove from hbox or vbox depending on
toolbar_in_hbox, Set all FRAME_TOOLBAR_*_(WIDTH|HEIGHT) to zero.
(xg_change_toolbar_position): New function.
* src/gtkutil.h (xg_change_toolbar_position): Declare.
* src/window.c (calc_absolute_offset): Check for FRAME_TOOLBAR_TOP_HEIGHT
and FRAME_TOOLBAR_LEFT_WIDTH.
* src/xfns.c (x_set_tool_bar_position): New function.
(xic_set_statusarea): Use FRAME_TOOLBAR_TOP_HEIGHT.
(x_frame_parm_handlers): Add x_set_tool_bar_position.
(syms_of_xfns): if USE_GTK, provide move-toolbar.
* src/xterm.c (x_set_window_size_1): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
* src/xterm.h (struct x_output): Add toolbar_top_height,
toolbar_bottom_height, toolbar_left_width, toolbar_right_width. Remove
toolbar_height.
if USE_GTK: Add hbox_widget and toolbar_in_hbox.
(FRAME_TOOLBAR_TOP_HEIGHT, FRAME_TOOLBAR_BOTTOM_HEIGHT)
(FRAME_TOOLBAR_LEFT_WIDTH, FRAME_TOOLBAR_RIGHT_WIDTH): New macros.
(FRAME_TOOLBAR_HEIGHT): Is now TOP_HEIGHT + BOTTOM_HEIGHT.
* lisp/menu-bar.el (menu-bar-enable-clipboard): Don't overwrite
Cut/Copy/Paste menu bar items.
* lisp/mouse.el: Bind mouse-2 to mouse-yank-primary.
(mouse-drag-copy-region): Default to nil.
* lisp/simple.el (select-active-regions): Default to t.
(push-mark-command): Don't overwrite primary with empty string.
* lisp/term/x-win.el (x-select-enable-clipboard): Default to t.
(x-initialize-window-system): Don't overwrite Paste menu item.
Don't add entries for `menu-bar-lines' and `tool-bar-lines' to
`default-frame-alist' and `initial-frame-alist' at startup.
Instead, use X resources to update the `menu-bar-mode' and
`tool-bar-mode' variables at startup, and use them as defaults during
frame creation.
* lisp/frame.el (frame-notice-user-settings): Don't change
default-frame-alist based on menu-bar-mode and tool-bar-mode, or
vice versa.
* lisp/menu-bar.el (menu-bar-mode):
* lisp/tool-bar.el (tool-bar-mode): Don't change default-frame-alist.
Set init-value to t.
* lisp/startup.el (command-line): Use X resources to set the value of
menu-bar-mode and tool-bar-mode, before calling frame-initialize.
* src/frame.c (Vmenu_bar_mode, Vtool_bar_mode): New vars.
* src/w32fns.c (Fx_create_frame):
* src/nsfns.m (Fx_create_frame): Likewise.
* src/xfns.c (Fx_create_frame): Don't consult X resouces when setting
menu-bar-lines and tool-bar-lines. Use menu-bar-mode and
tool-bar-mode, which are now set using these X resources at
startup, to determine the defaults.