1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00
Commit Graph

448 Commits

Author SHA1 Message Date
Andreas Schwab
651eaf36f2 * calc/calc-prog.el (math-do-defmath): Use backquote forms. Fix
handling of interactive spec when the body uses return.
(math-do-arg-check, math-define-function-body): Use backquote forms.
* calc/calc-ext.el (math-defcache): Likewise.
* calc/calc-rewr.el (math-rwfail, math-rweval): Likewise.
* allout.el (allout-new-exposure): Likewise.
* calc/calcalg2.el (math-tracing-integral): Likewise.
* info.el (Info-last-menu-item): Likewise.
* emulation/vip.el (vip-loop): Likewise.
* textmodes/artist.el (artist-funcall): Likewise.
* menu-bar.el (menu-bar-make-mm-toggle, menu-bar-make-toggle):
Construct menu-item directly.

* cedet/ede/base.el (ede-with-projectfile): Use backquote forms.
2012-08-07 18:12:20 +02:00
Chong Yidong
6200f3c413 * menu-bar.el (menu-bar-tools-menu): Remove PCL-CVS. 2012-08-03 16:25:42 +08:00
Stefan Monnier
1ec4b7b259 Get rid of all the manual purecopy calls in menu-bar definitions.
* 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.
2012-06-27 17:15:13 -04:00
Stefan Monnier
dc5d230cac Miscellaneous minor cleanups and simplifications.
* lisp/help-fns.el (describe-variable): Don't croak when doc is not found.
* lisp/vc/pcvs.el (cvs-retrieve-revision): Avoid toggle-read-only.
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Purecopy a tiny bit more.
* lisp/emacs-lisp/syntax.el (syntax-ppss): Simplify with new `if' place.
* lisp/emacs-lisp/smie.el (smie-next-sexp): CSE.
* lisp/emacs-lisp/macroexp.el (macroexp-let2): Fix edebug spec and avoid
((lambda ..) ..).
* lisp/emacs-lisp/eieio.el (eieio-oref, slot-value): Use simpler defsetf.
2012-06-23 11:38:23 -04:00
Glenn Morris
3290526dde Add "How to Report a Bug" to Help menu
* 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.
2012-05-21 20:31:34 -07:00
Chong Yidong
fce3fdeb94 Fix menu-set-font interaction with Custom themes.
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.
2012-01-31 16:38:58 +08:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
e1dbe924b5 Spelling fixes. 2011-11-19 18:29:42 -08:00
Juanma Barranquero
7877f37394 Fix typos. 2011-11-16 18:47:25 +01:00
Chong Yidong
2d197ffbe2 Rename split-window-{above-each-other|split-window-side-by-side}
to split-window-below and split-window-right.

* lisp/window.el (split-window-below, split-window-right): Rename from
split-window-above-each-other and split-window-side-by-side
respectively.  All callers changed.
(split-window-sensibly, split-window-sensibly): Use them.
(split-window-keep-point): Doc fix.

* lisp/isearch.el: Add isearch-scroll property to split-window-below
and split-window-right.

* lisp/follow.el (follow-mode):
* lisp/vc/pcvs-util.el (cvs-pop-to-buffer-same-frame):
* lisp/progmodes/ada-xref.el (ada-gdb-application):
* lisp/emulation/vip.el (vip-buffer-in-two-windows):
* lisp/image-dired.el (image-dired-dired-with-window-configuration):
* lisp/dired-x.el (dired-do-find-marked-files):
* lisp/dired.el (dired-pop-to-buffer):
* lisp/bs.el (bs--show-with-configuration):
* lisp/vc/emerge.el (emerge-setup-windows):
* lisp/textmodes/two-column.el (2C-two-columns):
* lisp/textmodes/reftex-toc.el (reftex-toc):
* lisp/progmodes/gdb-mi.el (gdb-setup-windows):
* lisp/progmodes/fortran.el (fortran-window-create):
* lisp/net/newst-treeview.el (newsticker--treeview-window-init):
* lisp/emulation/ws-mode.el (wordstar-C-o-map, wordstar-mode):
* lisp/emulation/tpu-edt.el (tpu-gold-map):
* lisp/emulation/crisp.el (crisp-mode-map):
* lisp/calendar/calendar.el (calendar-basic-setup): Callers changed.
2011-10-30 09:56:03 +08:00
Chong Yidong
06e21633a4 Fix minor mode docstrings for the new meaning of a nil ARG.
* abbrev.el (abbrev-mode):
* allout.el (allout-mode):
* autoinsert.el (auto-insert-mode):
* autoarg.el (autoarg-mode, autoarg-kp-mode):
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-mode):
* battery.el (display-battery-mode):
* composite.el (global-auto-composition-mode)
(auto-composition-mode):
* delsel.el (delete-selection-mode):
* desktop.el (desktop-save-mode):
* dired-x.el (dired-omit-mode):
* dirtrack.el (dirtrack-mode):
* doc-view.el (doc-view-minor-mode):
* double.el (double-mode):
* electric.el (electric-indent-mode, electric-pair-mode):
* emacs-lock.el (emacs-lock-mode):
* epa-hook.el (auto-encryption-mode):
* follow.el (follow-mode):
* font-core.el (font-lock-mode):
* frame.el (auto-raise-mode, auto-lower-mode, blink-cursor-mode):
* help.el (temp-buffer-resize-mode):
* hilit-chg.el (highlight-changes-mode)
(highlight-changes-visible-mode):
* hi-lock.el (hi-lock-mode):
* hl-line.el (hl-line-mode, global-hl-line-mode):
* icomplete.el (icomplete-mode):
* ido.el (ido-everywhere):
* image-file.el (auto-image-file-mode):
* image-mode.el (image-minor-mode):
* iswitchb.el (iswitchb-mode):
* jka-cmpr-hook.el (auto-compression-mode):
* linum.el (linum-mode):
* longlines.el (longlines-mode):
* master.el (master-mode):
* mb-depth.el (minibuffer-depth-indicate-mode):
* menu-bar.el (menu-bar-mode):
* minibuf-eldef.el (minibuffer-electric-default-mode):
* mouse-sel.el (mouse-sel-mode):
* msb.el (msb-mode):
* mwheel.el (mouse-wheel-mode):
* outline.el (outline-minor-mode):
* paren.el (show-paren-mode):
* recentf.el (recentf-mode):
* reveal.el (reveal-mode, global-reveal-mode):
* rfn-eshadow.el (file-name-shadow-mode):
* ruler-mode.el (ruler-mode):
* savehist.el (savehist-mode):
* scroll-all.el (scroll-all-mode):
* scroll-bar.el (scroll-bar-mode):
* server.el (server-mode):
* shell.el (shell-dirtrack-mode):
* simple.el (auto-fill-mode, transient-mark-mode)
(visual-line-mode, overwrite-mode, binary-overwrite-mode)
(line-number-mode, column-number-mode, size-indication-mode)
(auto-save-mode, normal-erase-is-backspace-mode, visible-mode):
* strokes.el (strokes-mode):
* time.el (display-time-mode):
* t-mouse.el (gpm-mouse-mode):
* tool-bar.el (tool-bar-mode):
* tooltip.el (tooltip-mode):
* type-break.el (type-break-mode-line-message-mode)
(type-break-query-mode):
* view.el (view-mode):
* whitespace.el (whitespace-mode, whitespace-newline-mode)
(global-whitespace-mode, global-whitespace-newline-mode):
* xt-mouse.el (xterm-mouse-mode): Doc fix.

* emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix
autogenerated docstring.
2011-10-19 08:54:24 -04:00
Martin Rudalics
b8f7ff0d82 Rewrite window related menu entries. (Bug#6786)
* 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.
2011-10-17 14:52:31 +02:00
Juri Linkov
7cc6e15441 Capitalize non-function content words in menu item strings.
* lisp/buff-menu.el (Buffer-menu-mode-map):
* lisp/dired.el (dired-mode-map):
* lisp/emacs-lisp/lisp-mode.el (emacs-lisp-mode-map)
(lisp-interaction-mode-map):
* lisp/emacs-lisp/package.el (package-menu-mode-map):
* lisp/epa.el (epa-key-list-mode-map):
* lisp/menu-bar.el (menu-bar-showhide-tool-bar-menu)
(menu-bar-options-menu):
* lisp/outline.el (outline-mode-menu-bar-map):
* lisp/vc/vc-bzr.el (vc-bzr-shelve-menu-map, vc-bzr-extra-menu-map):
* lisp/vc/vc-dir.el (vc-dir-menu-map):
* lisp/vc/vc-git.el (vc-git-stash-menu-map, vc-git-extra-menu-map):
Capitalize non-function content words in menu item strings.

* lisp/dired.el (dired-mode-map): Add menu item for
`image-dired-dired-toggle-marked-thumbs'.
2011-09-18 23:43:20 +03:00
Lars Magne Ingebrigtsen
9d6f1d9041 Revert last patch, which wasn't correct. 2011-07-12 15:01:20 +02:00
Lars Magne Ingebrigtsen
48b76ddfd8 (menu-set-font): Clarify that the default will be saved
Fixes: debbugs:3527
2011-07-12 14:58:24 +02:00
Chong Yidong
14cc04aa16 Tweak last change to menu descriptions.
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Revert last change.
(menu-bar-options-menu): Tweak descriptions.
2011-07-07 18:41:09 -04:00
Lars Magne Ingebrigtsen
0a1848ec12 Make all the Options menu items into verb phrases
* menu-bar.el (menu-bar-line-wrapping-menu): Also refill to fit under
80 columns.

Fixes: debbugs:1421
2011-07-07 23:43:38 +02:00
Drew Adams
5d907d6cf0 * lisp/menu-bar.el: Use function variable instead of switch-to-buffer.
(menu-bar-select-buffer-function): New variable.
(menu-bar-update-buffers): Use it.
2011-06-20 21:49:36 -04:00
Martin Rudalics
159daf8794 * menu-bar.el (kill-this-buffer-enabled-p): Avoid looping over entire buffer list (Bug#8184). 2011-05-29 15:11:23 -04:00
Stefan Monnier
b016851cb1 Move keymap initialization into declaration.
* lisp/textmodes/enriched.el (enriched-mode-map):
* lisp/textmodes/bib-mode.el (bib-mode-map):
* lisp/term/lk201.el (lk201-function-map):
* lisp/tar-mode.el (tar-mode-map):
* lisp/replace.el (occur-mode-map):
* lisp/progmodes/idlwave.el (idlwave-rinfo-mouse-map, idlwave-rinfo-map):
* lisp/progmodes/idlw-help.el (idlwave-help-mode-map):
* lisp/progmodes/gdb-mi.el (gdb-memory-format-menu, gdb-memory-unit-menu):
* lisp/play/solitaire.el (solitaire-mode-map):
* lisp/play/snake.el (snake-mode-map, snake-null-map):
* lisp/play/pong.el (pong-mode-map):
* lisp/play/handwrite.el (menu-bar-handwrite-map):
* lisp/play/gametree.el (gametree-mode-map):
* lisp/net/rcirc.el (rcirc-mode-map, rcirc-browse-url-map
(rcirc-multiline-minor-mode-map, rcirc-track-minor-mode-map):
* lisp/net/newst-plainview.el (newsticker-menu, newsticker-mode-map)
(newsticker--url-keymap):
* lisp/net/net-utils.el (nslookup-mode-map, ftp-mode-map):
* lisp/menu-bar.el (menu-bar-file-menu, menu-bar-i-search-menu)
(menu-bar-search-menu, menu-bar-replace-menu, menu-bar-goto-menu)
(menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-line-wrapping-menu, menu-bar-options-menu)
(menu-bar-games-menu, menu-bar-encryption-decryption-menu)
(menu-bar-tools-menu, menu-bar-describe-menu)
(menu-bar-search-documentation-menu, menu-bar-manuals-menu)
(menu-bar-help-menu):
* lisp/mail/rmailsum.el (rmail-summary-mode-map):
* lisp/kmacro.el (kmacro-step-edit-map):
* lisp/ibuffer.el (ibuffer-mode-groups-popup, ibuffer-mode-map)
(ibuffer-mode-operate-map):
* lisp/hi-lock.el (hi-lock-menu, hi-lock-map):
* lisp/emulation/vip.el (vip-mode-map):
* lisp/emacs-lisp/re-builder.el (reb-lisp-mode-map):
* lisp/bookmark.el (bookmark-bmenu-mode-map):
* lisp/help-mode.el (help-mode-map):
* lisp/erc/erc-list.el (erc-list-menu-mode-map):
* lisp/org/org-remember.el (org-remember-mode-map):
* lisp/org/org-src.el (org-src-mode-map): Move initialization into declaration.
2011-02-10 11:56:00 -05:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Chong Yidong
b2948a8779 * cus-theme.el (customize-themes): Use switch-to-buffer.
* menu-bar.el (menu-bar-custom-menu): Tweak Mule and Customize
menus.  Add menu item for customize-themes.
2011-01-12 14:10:00 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Chong Yidong
3f95d7ffba Bind "Copy" menu item to kill-ring-save, obsoleting menu-bar-kill-ring-save.
* menu-bar.el (menu-bar-kill-ring-save): Make obsolete.
(menu-bar-edit-menu): Bind "Copy" to kill-ring-save.  Don't use
mouse-region-match.
2010-12-20 22:44:28 +08:00
Chong Yidong
4039c78625 Support for menu separators in the GTK tool-bar.
* 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.
2010-12-17 12:04:06 +08:00
Eli Zaretskii
f68ab99bc1 Fix bug #1077 with popping new frames from a minibuffer-only frame.
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.
2010-12-09 21:07:53 +02:00
Eli Zaretskii
65ceb118c4 Fix bug #1077 with popping new frames from a minibuffer-only frame.
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.
2010-12-09 20:53:17 +02:00
Chong Yidong
2699a55464 Merge changes from emacs-23 branch 2010-10-31 10:40:01 -04:00
Glenn Morris
9d79402605 Remove duplicate Lisp definitions of define-minor-mode variables defined in C.
* lisp/abbrev.el (abbrev-mode):
* lisp/composite.el (auto-composition-mode):
* lisp/menu-bar.el (menu-bar-mode):
* lisp/simple.el (transient-mark-mode):
* lisp/tool-bar.el (tool-bar-mode): Adjust the define-minor-mode calls so
that they do not define the associated variables twice.
* lisp/simple.el (transient-mark-mode): Remove defvar.
* lisp/composite.el (auto-composition-mode): Make variable auto-buffer-local.
* lisp/cus-start.el: Add transient-mark-mode, menu-bar-mode, tool-bar-mode.
Handle multiple groups, and also custom-delayed-init-variables.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.

* src/buffer.c (syms_of_buffer) <abbrev-mode, transient-mark-mode>:
* src/frame.c (syms_of_frame) <tool-bar-mode>: Move docs here from Lisp.
2010-10-28 20:29:29 -07:00
Glenn Morris
b3edb781e0 Move ns-specific menu-bar code from term/ns-win.el to menu-bar.el.
* lisp/term/ns-win.el (global-map, menu-bar-final-items, menu-bar-help-menu):
Move menu-bar related settings to ../menu-bar.el.
* lisp/menu-bar.el (global-map, menu-bar-final-items, menu-bar-help-menu):
Move ns-specific settings here from term/ns-win.el.
2010-10-28 00:05:00 -07:00
Glenn Morris
aab705a2a8 Fix treatment of menu-bar-files-menu.
* 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.
2010-10-26 21:06:52 -07:00
Glenn Morris
6a5c21753e Move ns-win.el's rather wacky menu adjustments to menu-bar.el.
* lisp/term/ns-win.el: Do not require easymenu.
(menu-bar-edit-menu) <copy, paste, paste-from-menu, separator-undo>:
<spell>: Move adjustments to menu-bar.el.
* lisp/menu-bar.el (menu-bar-edit-menu) <copy, paste, paste-from-menu>:
<separator-undo, spell>: Move ns-win's adjustments here.
* lisp/loadup.el [ns]: Do not load easymenu.

* src/Makefile.in (SOME_MACHINE_LISP): Remove easymenu.elc.
* lib-src/makefile.w32-in (OTHER_PLATFORM_SUPPORT): Remove easymenu.elc.
2010-10-24 17:48:26 -07:00
Jan Djärv
36a1b6dba7 Use tool-bar-position in menu Options/Show.
* menu-bar.el (menu-bar-set-tool-bar-position): customize-set-variable
tool-bar-position.  Don't modify frame parameters here.
2010-09-21 09:31:01 +02:00
Juanma Barranquero
6664fc59a8 Merge changes from emacs-23 branch. 2010-09-14 16:41:53 +02:00
Glenn Morris
639b9d87d2 Close bug#6211.
* 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.
2010-09-09 20:04:26 -07:00
Eli Zaretskii
42b6a73bc7 Fix bug #6944.
menu-bar.el (menu-bar-edit-menu) <"Paste">: Check selection in
 CLIPBOARD, not in PRIMARY.
2010-08-30 21:11:34 +03:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Chong Yidong
cb6c4991ef Improvements to describe-package buffer.
* lisp/help.el (help-map): Bind `C-h P' to describe-package.

* lisp/menu-bar.el (menu-bar-describe-menu): Add describe-package.

* lisp/emacs-lisp/package.el (package-refresh-contents): Catch errors
when downloading archives.
(describe-package-1): Add package commentary.
(package-install-button-action): New function.
(package-menu-mode-map): Bind ? to package-menu-describe-package.
(package-menu-view-commentary): Function removed.
(package-list-packages-internal): Hide the `package' package too.
2010-08-25 23:31:34 -04:00
Jan D
a0c16be48f * menu-bar.el (menu-bar-set-tool-bar-position): Set frame parameter on all frames. 2010-08-25 08:53:55 +02:00
Chong Yidong
b0126eac41 Merge changes from emacs-23 branch. 2010-08-22 16:02:16 -04:00
Glenn Morris
635f7282c4 * lisp/menu-bar.el (menu-bar-games-menu): Add landmark. 2010-08-20 19:11:34 -07:00
Jan D
2b4e627726 Fix handling of tool-bar-position, also put into default-frame-alist.
* lisp/menu-bar.el (menu-bar-set-tool-bar-position): New function.
(menu-bar-showhide-tool-bar-menu-customize-enable-left)
(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): Call
menu-bar-set-tool-bar-position.

* src/frame.h (Qtool_bar_position): Declare.

* src/xfns.c (Fx_create_frame): Call x_default_parameter for
Qtool_bar_position.
2010-08-13 15:26:13 +02:00
Jan Djärv
bfeabdc3d7 Add ability to put Gtk+ tool bar on the left/right/bottom or top. Default top.
* 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.
2010-07-29 18:49:59 +02:00
Chong Yidong
f9d71b4284 Change clipboard/primary selection to X application standards.
* 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.
2010-07-14 14:03:39 -04:00
Chong Yidong
4ad11f8ccb Set default-frame-alist, if necessary, in menu/tool-bar-mode.
* menu-bar.el (menu-bar-mode):
* tool-bar.el (tool-bar-mode): Replace default-frame-alist element
if it has been set.
2010-07-05 13:54:13 -04:00
Chong Yidong
6431f2e619 Change default-frame-alist and menu/tool-bar-mode interaction (Bug#2249).
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.
2010-06-26 20:30:52 -04:00
Chong Yidong
cced75847f Add preliminary describe-package functionality, and some cleanup.
* help-mode.el (help-package-def): New button type.

* menu-bar.el: Move package-list-packages binding here from
package.el.

* emacs-lisp/package.el: Move package-list-packages binding to
menu-bar.el.
(describe-package, describe-package-1, package--dir): New funs.
(package-activate-1): Use package--dir.

* emacs-lisp/package-x.el (gnus-article-buffer): Require package.
2010-06-19 18:36:51 -04:00
Juanma Barranquero
69582fcd16 menu-bar.el (menu-bar-options-menu): Fix typo in menu entry. 2010-06-17 12:45:25 +02:00
Katsumi Yamaoka
b374f54d1e (menu-bar-manuals-menu): Fix typo. 2010-02-28 23:37:19 +00:00