Mercurial > emacs
comparison lisp/menu-bar.el @ 83496:f271076dab2d
Fix toolbars on X frames when Emacs is started on a tty. (Reported by Richard Lewis.)
* lisp/faces.el (x-create-frame-with-faces): Remove bogus check for first
frame. Call `tool-bar-setup'.
* lisp/frame.el (window-system-default-frame-alist): Enhance doc string.
* lisp/frame.el (frame-notice-user-settings): Don't put 'tool-bar-lines
in `default-frame-alist' when initial frame is on a tty.
* lisp/frame.el (modify-all-frames-parameters): Simplify using
`assq-delete-all'. Remove specified parameters from
`window-system-default-frame-alist'.
* lisp/fringe.el (set-fringe-mode): Simplify and fix using
`modify-all-frames-parameters'.
* lisp/menu-bar.el (menu-bar-mode): Ditto.
* lisp/scroll-bar.el (set-scroll-bar-mode): Ditto.
* lisp/tool-bar.el (tool-bar-mode): Ditto. Remove 'tool-bar-map length
check before calling `tool-bar-setup'.
* lisp/tool-bar.el (tool-bar-setup): New variable.
* lisp/tool-bar.el (tool-bar-setup): Use it to guard against multiple
calls. Add optional frame parameter, and select that frame before
adding items.
* src/frame.c (syms_of_frame): Enhance doc string of `default-frame-alist'.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-536
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 26 Mar 2006 13:57:43 +0000 |
parents | 9257a489f3e6 |
children | a25bb5ef27bf |
comparison
equal
deleted
inserted
replaced
83495:989dc6aa2eb2 | 83496:f271076dab2d |
---|---|
1763 With a numeric argument, if the argument is positive, | 1763 With a numeric argument, if the argument is positive, |
1764 turn on menu bars; otherwise, turn off menu bars." | 1764 turn on menu bars; otherwise, turn off menu bars." |
1765 :init-value nil | 1765 :init-value nil |
1766 :global t | 1766 :global t |
1767 :group 'frames | 1767 :group 'frames |
1768 | |
1768 ;; Make menu-bar-mode and default-frame-alist consistent. | 1769 ;; Make menu-bar-mode and default-frame-alist consistent. |
1769 (let ((lines (if menu-bar-mode 1 0))) | 1770 (modify-all-frames-parameters (list (cons 'menu-bar-lines |
1770 ;; Alter existing frames... | 1771 (if menu-bar-mode 1 0)))) |
1771 (mapc (lambda (frame) | |
1772 (modify-frame-parameters frame | |
1773 (list (cons 'menu-bar-lines lines)))) | |
1774 (frame-list)) | |
1775 ;; ...and future ones. | |
1776 (let ((elt (assq 'menu-bar-lines default-frame-alist))) | |
1777 (if elt | |
1778 (setcdr elt lines) | |
1779 (add-to-list 'default-frame-alist (cons 'menu-bar-lines lines))))) | |
1780 | 1772 |
1781 ;; Make the message appear when Emacs is idle. We can not call message | 1773 ;; Make the message appear when Emacs is idle. We can not call message |
1782 ;; directly. The minor-mode message "Menu-bar mode disabled" comes | 1774 ;; directly. The minor-mode message "Menu-bar mode disabled" comes |
1783 ;; after this function returns, overwriting any message we do here. | 1775 ;; after this function returns, overwriting any message we do here. |
1784 (when (and (interactive-p) (not menu-bar-mode)) | 1776 (when (and (interactive-p) (not menu-bar-mode)) |