summaryrefslogtreecommitdiff
path: root/lisp/fringe.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-03-26 13:57:43 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-03-26 13:57:43 +0000
commit095fe28140411c14e1e77d6c076655c06ca191a9 (patch)
treef85f170cb35f2cd2f87a83e05785bc064fcc3eb6 /lisp/fringe.el
parent9b7b2b9e3570fe12323c9b5e88447d74eec0f4f8 (diff)
downloademacs-095fe28140411c14e1e77d6c076655c06ca191a9.tar.gz
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
Diffstat (limited to 'lisp/fringe.el')
-rw-r--r--lisp/fringe.el41
1 files changed, 7 insertions, 34 deletions
diff --git a/lisp/fringe.el b/lisp/fringe.el
index 317fff0973c..7a04d87a579 100644
--- a/lisp/fringe.el
+++ b/lisp/fringe.el
@@ -104,40 +104,13 @@ This is usually invoked when setting `fringe-mode' via customize."
See `fringe-mode' for possible values and their effect."
(setq fringe-mode value)
- ;; Apply it to default-frame-alist.
- (let ((parameter (assq 'left-fringe default-frame-alist)))
- (if (consp parameter)
- (setcdr parameter (if (consp fringe-mode)
- (car fringe-mode)
- fringe-mode))
- (setq default-frame-alist
- (cons (cons 'left-fringe (if (consp fringe-mode)
- (car fringe-mode)
- fringe-mode))
- default-frame-alist))))
- (let ((parameter (assq 'right-fringe default-frame-alist)))
- (if (consp parameter)
- (setcdr parameter (if (consp fringe-mode)
- (cdr fringe-mode)
- fringe-mode))
- (setq default-frame-alist
- (cons (cons 'right-fringe (if (consp fringe-mode)
- (cdr fringe-mode)
- fringe-mode))
- default-frame-alist))))
-
- ;; Apply it to existing frames.
- (let ((frames (frame-list)))
- (while frames
- (modify-frame-parameters
- (car frames)
- (list (cons 'left-fringe (if (consp fringe-mode)
- (car fringe-mode)
- fringe-mode))
- (cons 'right-fringe (if (consp fringe-mode)
- (cdr fringe-mode)
- fringe-mode))))
- (setq frames (cdr frames)))))
+ (modify-all-frames-parameters
+ (list (cons 'left-fringe (if (consp fringe-mode)
+ (car fringe-mode)
+ fringe-mode))
+ (cons 'right-fringe (if (consp fringe-mode)
+ (cdr fringe-mode)
+ fringe-mode)))))
;; For initialization of fringe-mode, take account of changes
;; made explicitly to default-frame-alist.