Mercurial > emacs
comparison lisp/frame.el @ 89909:68c22ea6027c
Sync to HEAD
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Apr 2004 12:51:06 +0000 |
parents | 375f2633d815 |
children | 4c90ffeb71c5 |
comparison
equal
deleted
inserted
replaced
89908:ee1402f7b568 | 89909:68c22ea6027c |
---|---|
83 (symbol :tag "Parameter") | 83 (symbol :tag "Parameter") |
84 (sexp :tag "Value"))) | 84 (sexp :tag "Value"))) |
85 :group 'frames) | 85 :group 'frames) |
86 | 86 |
87 (setq pop-up-frame-function | 87 (setq pop-up-frame-function |
88 (function (lambda () | 88 ;; Using `function' here caused some sort of problem. |
89 (make-frame pop-up-frame-alist)))) | 89 '(lambda () |
90 (make-frame pop-up-frame-alist))) | |
90 | 91 |
91 (defcustom special-display-frame-alist | 92 (defcustom special-display-frame-alist |
92 '((height . 14) (width . 80) (unsplittable . t)) | 93 '((height . 14) (width . 80) (unsplittable . t)) |
93 "*Alist of frame parameters used when creating special frames. | 94 "*Alist of frame parameters used when creating special frames. |
94 Special frames are used for buffers whose names are in | 95 Special frames are used for buffers whose names are in |
333 (newparms (list (cons 'height (- height lines)))) | 334 (newparms (list (cons 'height (- height lines)))) |
334 (initial-top (cdr (assq 'top | 335 (initial-top (cdr (assq 'top |
335 frame-initial-geometry-arguments))) | 336 frame-initial-geometry-arguments))) |
336 (top (frame-parameter frame-initial-frame 'top))) | 337 (top (frame-parameter frame-initial-frame 'top))) |
337 (when (and (consp initial-top) (eq '- (car initial-top))) | 338 (when (and (consp initial-top) (eq '- (car initial-top))) |
338 (setq newparms | 339 (let ((adjusted-top |
339 (append newparms | 340 (cond ((and (consp top) |
340 `((top . ,(+ top (* lines char-height)))) | 341 (eq '+ (car top))) |
341 nil))) | 342 (list '+ |
343 (+ (cadr top) | |
344 (* lines char-height)))) | |
345 ((and (consp top) | |
346 (eq '- (car top))) | |
347 (list '- | |
348 (- (cadr top) | |
349 (* lines char-height)))) | |
350 (t (+ top (* lines char-height)))))) | |
351 (setq newparms | |
352 (append newparms | |
353 `((top . ,adjusted-top)) | |
354 nil)))) | |
342 (modify-frame-parameters frame-initial-frame newparms) | 355 (modify-frame-parameters frame-initial-frame newparms) |
343 (tool-bar-mode -1))))) | 356 (tool-bar-mode -1))))) |
344 | 357 |
345 ;; The initial frame we create above always has a minibuffer. | 358 ;; The initial frame we create above always has a minibuffer. |
346 ;; If the user wants to remove it, or make it a minibuffer-only | 359 ;; If the user wants to remove it, or make it a minibuffer-only |
940 The frame name is displayed on the modeline if the terminal displays only | 953 The frame name is displayed on the modeline if the terminal displays only |
941 one frame, otherwise the name is displayed on the frame's caption bar." | 954 one frame, otherwise the name is displayed on the frame's caption bar." |
942 (interactive "sFrame name: ") | 955 (interactive "sFrame name: ") |
943 (modify-frame-parameters (selected-frame) | 956 (modify-frame-parameters (selected-frame) |
944 (list (cons 'name name)))) | 957 (list (cons 'name name)))) |
958 | |
959 (defun frame-current-scroll-bars (&optional frame) | |
960 "Return the current scroll-bar settings in frame FRAME. | |
961 Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the | |
962 current location of the vertical scroll-bars (left, right, or nil), | |
963 and HORISONTAL specifies the current location of the horisontal scroll | |
964 bars (top, bottom, or nil)." | |
965 (let ((vert (frame-parameter frame 'vertical-scroll-bars)) | |
966 (hor nil)) | |
967 (unless (memq vert '(left right nil)) | |
968 (setq vert default-frame-scroll-bars)) | |
969 (cons vert hor))) | |
945 | 970 |
946 ;;;; Frame/display capabilities. | 971 ;;;; Frame/display capabilities. |
947 (defun display-mouse-p (&optional display) | 972 (defun display-mouse-p (&optional display) |
948 "Return non-nil if DISPLAY has a mouse available. | 973 "Return non-nil if DISPLAY has a mouse available. |
949 DISPLAY can be a display name, a frame, or nil (meaning the selected | 974 DISPLAY can be a display name, a frame, or nil (meaning the selected |
1325 (define-key ctl-x-5-map "0" 'delete-frame) | 1350 (define-key ctl-x-5-map "0" 'delete-frame) |
1326 (define-key ctl-x-5-map "o" 'other-frame) | 1351 (define-key ctl-x-5-map "o" 'other-frame) |
1327 | 1352 |
1328 (provide 'frame) | 1353 (provide 'frame) |
1329 | 1354 |
1355 ;;; arch-tag: 82979c70-b8f2-4306-b2ad-ddbd6b328b56 | |
1330 ;;; frame.el ends here | 1356 ;;; frame.el ends here |