• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:default +defs:frame +defs:alist

38 (defvar default-menubar)
40 (defvar frame-icon-title-format)
80 doing everything in one frame, and `ediff-setup-windows-multiframe',
81 which sets the control panel in a separate frame. Also, if the latter
82 function detects that one of the buffers A/B is seen in some other frame,
83 it will try to keep that buffer in that frame.
105 ;; Share of the frame occupied by the merge window (buffer C)
121 (defconst ediff-window-alist
132 You can set it to a horizontal split instead of the default vertical split
142 You can set it to a vertical split instead of the default horizontal split
150 (defconst ediff-control-frame-parameters
167 ;; make initial frame small to avoid distraction
170 ;; ediff's control frame. we put the frame outside the display,
171 ;; so the initial frame won't jump all over the screen
183 ;; frame
191 "*If t, Ediff will always grab the mouse and put it in the control frame.
198 (defcustom ediff-control-frame-position-function 'ediff-make-frame-position
201 of the control frame. It returns an association list
206 (defcustom ediff-control-frame-upward-shift 42
207 "*The upward shift of control frame from the top of buffer A's frame.
209 This is used by the default control frame positioning function,
210 `ediff-make-frame-position'. This variable is provided for easy
211 customization of the default control frame positioning."
215 (defcustom ediff-narrow-control-frame-leftward-shift (if ediff-xemacs-p 7 3)
216 "*The leftward shift of control frame from the right edge of buf A's frame.
218 This is used by the default control frame positioning function,
219 `ediff-make-frame-position' to adjust the position of the control frame
221 customization of the default."
225 (defcustom ediff-wide-control-frame-rightward-shift 7
226 "*The rightward shift of control frame from the left edge of buf A's frame.
228 This is used by the default control frame positioning function,
229 `ediff-make-frame-position' to adjust the position of the control frame
231 customization of the default."
236 ;; Wide frame display
240 ;; keeps frame config for toggling wide display
244 (ediff-defvar-local ediff-wide-display-frame nil
248 The function is called without arguments. It should resize the frame in
250 frame parameters in `ediff-wide-display-orig-parameters'.
251 The variable `ediff-wide-display-frame' should be set to contain
252 the frame used for the wide display.")
255 (ediff-defvar-local ediff-control-frame nil "")
257 (defcustom ediff-prefer-iconified-control-frame nil
288 ;; Select the lowest window on the frame.
291 (select-window (frame-lowest-window)) ; xemacs
352 (ediff-destroy-control-frame control-buffer)
405 (ediff-destroy-control-frame control-buffer)
485 ;;; 2. If A and B are in the same frame but C's frame is different--- use one
486 ;;; frame for A and B and use a separate frame for C.
487 ;;; 3. If C's frame is non-existent, then: if the first suitable
488 ;;; non-dedicated frame is different from A&B's, then use it for C.
489 ;;; Otherwise, put A,B, and C in one frame.
501 (frame-A (if wind-A (window-frame wind-A)))
502 (frame-B (if wind-B (window-frame wind-B)))
503 (frame-C (if wind-C (window-frame wind-C)))
504 ;; on wide display, do things in one frame
505 (force-one-frame
511 (orig-frame (selected-frame))
512 (use-same-frame (or force-one-frame
513 ;; A and C must be in one frame
514 (eq frame-A (or frame-C orig-frame))
515 ;; B and C must be in one frame
516 (eq frame-B (or frame-C orig-frame))
518 (not (frame-live-p frame-A))
519 (not (frame-live-p frame-B))
523 ;; A and B in the same frame, and no good frame
525 (and (eq frame-A frame-B)
526 (not (frame-live-p frame-C)))
528 ;; use-same-frame-for-AB implies wind A and B are ok for display
529 (use-same-frame-for-AB (and (not use-same-frame)
530 (eq frame-A frame-B)))
534 designated-minibuffer-frame
539 (null use-same-frame) ; implies wind-A is suitable
540 (null use-same-frame-for-AB))
550 (null use-same-frame) ; implies wind-B is suitable
551 (null use-same-frame-for-AB))
562 (null use-same-frame)) ; buf C on its own
570 (if (and use-same-frame-for-AB ; implies wind A and B are suitable
587 (if use-same-frame
589 (if (and (eq frame-A frame-B)
590 (eq frame-B frame-C)
591 (frame-live-p frame-A))
592 (select-frame frame-A)
621 (or done-A ; Buf A to be set in its own frame,
622 ;;; or it was set before because use-same-frame = 1
625 ;; and use-same-frame = nil, use-same-frame-for-AB = nil
631 (or done-B ; Buf B to be set in its own frame,
632 ;;; or it was set before because use-same-frame = 1
635 ;; and use-same-frame = nil, use-same-frame-for-AB = nil
642 (or done-C ; Buf C to be set in its own frame,
643 ;;; or it was set before because use-same-frame = 1
646 ;; and use-same-frame = nil
657 (setq frame-A (window-frame ediff-window-A)
658 designated-minibuffer-frame
659 (window-frame (minibuffer-window frame-A))))
661 (ediff-setup-control-frame control-buf designated-minibuffer-frame)
668 ;;; If a buffer is seen in a frame, use that frame for that buffer.
669 ;;; If it is not seen, use the current frame.
670 ;;; If both buffers are not seen, they share the current frame. If one
671 ;;; of the buffers is not seen, it is placed in the current frame (where
672 ;;; ediff started). If that frame is displaying the other buffer, it is
674 ;;; However, if we decide to put both buffers in one frame
675 ;;; and the selected frame isn't splittable, we create a new frame and
677 ;;; another frame.
687 (frame-A (if wind-A (window-frame wind-A)))
688 (frame-B (if wind-B (window-frame wind-B)))
689 (frame-C (if wind-C (window-frame wind-C)))
690 (ctl-frame-exists-p (ediff-with-current-buffer control-buf
691 (frame-live-p ediff-control-frame)))
692 ;; on wide display, do things in one frame
693 (force-one-frame
701 (use-same-frame (or force-one-frame
702 (eq frame-A frame-B)
706 (or (eq frame-A frame-C)
707 (eq frame-B frame-C)
709 (not (frame-live-p frame-A))
710 (not (frame-live-p frame-B))
711 (not (frame-live-p frame-C))))
712 (and (not (frame-live-p frame-B))
713 (or ctl-frame-exists-p
714 (eq frame-A (selected-frame))))
715 (and (not (frame-live-p frame-A))
716 (or ctl-frame-exists-p
717 (eq frame-B (selected-frame))))))
719 designated-minibuffer-frame
730 (if (and (window-live-p wind-A) (null use-same-frame)) ; buf-A on its own
738 (if (and (window-live-p wind-B) (null use-same-frame)) ; buf B on its own
746 (if (and (window-live-p wind-C) (null use-same-frame)) ; buf C on its own
754 (if use-same-frame
756 (if (and (eq frame-A frame-B) (frame-live-p frame-A))
757 (select-frame frame-A)
790 (or done-A ; Buf A to be set in its own frame
791 ;;; or it was set before because use-same-frame = 1
794 ;; and use-same-frame = nil
800 (or done-B ; Buf B to be set in its own frame
801 ;;; or it was set before because use-same-frame = 1
804 ;; and use-same-frame = nil
812 (or done-C ; Buf C to be set in its own frame
813 ;;; or it was set before because use-same-frame = 1
816 ;; and use-same-frame = nil
828 (setq frame-A (window-frame ediff-window-A)
829 designated-minibuffer-frame
830 (window-frame (minibuffer-window frame-A))))
839 (ediff-setup-control-frame control-buf designated-minibuffer-frame)
843 ;; create a new splittable frame if none is found
846 (let ((wind-frame (window-frame (selected-window)))
850 (ediff-frame-has-dedicated-windows wind-frame)
851 (ediff-frame-iconified-p wind-frame)
853 (< (frame-height wind-frame)
857 (ediff-frame-unsplittable-p wind-frame))))
862 (setq wind-frame (window-frame (selected-window)))
866 (setq wind-frame (make-frame '((unsplittable)))))
868 (select-frame wind-frame)
871 (defun ediff-frame-has-dedicated-windows (frame)
877 frame)
880 ;; window is ok, if it is only one window on the frame, not counting the
881 ;; minibuffer, or none of the frame's windows is dedicated.
889 (eq wind (next-window wind 'ignore-minibuffer (window-frame wind)))
891 (not (ediff-frame-has-dedicated-windows (window-frame wind)))
894 ;; Prepare or refresh control frame
895 (defun ediff-setup-control-frame (ctl-buffer designated-minibuffer-frame)
897 ctl-frame-iconified-p dont-iconify-ctl-frame deiconify-ctl-frame
898 ctl-frame old-ctl-frame lines
908 (run-hooks 'ediff-before-setup-control-frame-hook))
910 (setq old-ctl-frame (ediff-with-current-buffer ctl-buffer ediff-control-frame))
912 (setq ctl-frame (if (frame-live-p old-ctl-frame)
913 old-ctl-frame
914 (make-frame ediff-control-frame-parameters))
915 ediff-control-frame ctl-frame)
921 (set-face-attribute 'mode-line ctl-frame :box nil))
926 (setq ctl-frame-iconified-p (ediff-frame-iconified-p ctl-frame))
927 (select-frame ctl-frame)
936 (make-local-variable 'frame-title-format)
937 (make-local-variable 'frame-icon-title-format) ; XEmacs
941 (setq dont-iconify-ctl-frame
943 (setq deiconify-ctl-frame
945 dont-iconify-ctl-frame))
957 designated-minibuffer-frame))
970 ;; In XEmacs, buffer menubar needs to be killed before frame parameters
976 (set-specifier top-gutter (list ctl-frame nil)))
978 (set-specifier top-toolbar-height (list ctl-frame 0))
979 ;;(set-specifier bottom-toolbar-height (list ctl-frame 0))
980 (set-specifier left-toolbar-width (list ctl-frame 0))
981 (set-specifier right-toolbar-width (list ctl-frame 0))
987 ;; Under OS/2 (emx) we have to call modify frame parameters twice, in order
988 ;; to make sure that at least once we do it for non-iconified frame. If
989 ;; appears that in the OS/2 port of Emacs, one can't modify frame
993 (modify-frame-parameters ctl-frame adjusted-parameters))
996 (ediff-make-bottom-toolbar ctl-frame)
1000 (modify-frame-parameters ctl-frame adjusted-parameters)
1001 (make-frame-visible ctl-frame)
1003 ;; This works around a bug in 19.25 and earlier. There, if frame gets
1004 ;; iconified, the current buffer changes to that of the frame that
1007 (select-frame ctl-frame)
1008 (ediff-refresh-control-frame)
1010 (cond ((and ediff-prefer-iconified-control-frame
1011 (not ctl-frame-iconified-p) (not dont-iconify-ctl-frame))
1012 (iconify-frame ctl-frame))
1013 ((or deiconify-ctl-frame (not ctl-frame-iconified-p))
1014 (raise-frame ctl-frame)))
1018 ;; Now move the frame. We must do it separately due to an obscure bug in
1020 (modify-frame-parameters
1021 ctl-frame
1022 (funcall ediff-control-frame-position-function ctl-buffer fwidth fheight))
1024 ;; synchronize so the cursor will move to control frame
1029 (while (and (not (frame-visible-p ctl-frame)) (> count 0))
1033 (or (ediff-frame-iconified-p ctl-frame)
1035 (ediff-reset-mouse ctl-frame
1042 (make-local-hook 'select-frame-hook) ; xemacs
1046 'select-frame-hook 'ediff-xemacs-select-frame-hook nil 'local)
1050 (run-hooks 'ediff-after-setup-control-frame-hook))
1054 (defun ediff-destroy-control-frame (ctl-buffer)
1056 (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
1057 (let ((ctl-frame ediff-control-frame))
1060 (set-buffer-menubar default-menubar)) ; xemacs
1063 (setq ediff-control-frame nil)
1064 (delete-frame ctl-frame)
1071 ;; finds a good place to clip control frame
1072 (defun ediff-make-frame-position (ctl-buffer ctl-frame-width ctl-frame-height)
1074 (let* ((frame-A (window-frame ediff-window-A))
1075 (frame-A-parameters (frame-parameters frame-A))
1076 (frame-A-top (eval (cdr (assoc 'top frame-A-parameters))))
1077 (frame-A-left (eval (cdr (assoc 'left frame-A-parameters))))
1078 (frame-A-width (frame-width frame-A))
1079 (ctl-frame ediff-control-frame)
1081 ctl-frame-top ctl-frame-left)
1089 (setq ctl-frame-top
1090 (- frame-A-top upward-adjustment ediff-control-frame-upward-shift)
1091 ctl-frame-left
1092 (+ frame-A-left
1094 (* (ediff-frame-char-width ctl-frame)
1095 (+ ediff-wide-control-frame-rightward-shift
1097 (- (* frame-A-width (ediff-frame-char-width frame-A))
1098 (* (ediff-frame-char-width ctl-frame)
1099 (+ ctl-frame-width
1100 ediff-narrow-control-frame-leftward-shift
1102 (setq ctl-frame-top
1103 (min ctl-frame-top
1105 (* 2 ctl-frame-height
1106 (ediff-frame-char-height ctl-frame))))
1107 ctl-frame-left
1108 (min ctl-frame-left
1110 (* ctl-frame-width (ediff-frame-char-width ctl-frame)))))
1111 ;; keep ctl frame within the visible bounds
1112 (setq ctl-frame-top (max ctl-frame-top 1)
1113 ctl-frame-left (max ctl-frame-left 1))
1115 (list (cons 'top ctl-frame-top)
1116 (cons 'left ctl-frame-left))
1119 (defun ediff-xemacs-select-frame-hook ()
1120 (if (and (equal (selected-frame) ediff-control-frame)
1122 (raise-frame ediff-control-frame)))
1125 "Construct an alist of parameters for the wide display.
1126 Saves the old frame parameters in `ediff-wide-display-orig-parameters'.
1127 The frame to be resized is kept in `ediff-wide-display-frame'.
1132 (let* ((frame-A (window-frame ediff-window-A))
1133 (frame-A-params (frame-parameters frame-A))
1134 (cw (ediff-frame-char-width frame-A))
1137 (list (cons 'left (max 0 (eval (cdr (assoc 'left frame-A-params)))))
1138 (cons 'width (cdr (assoc 'width frame-A-params))))
1139 ediff-wide-display-frame frame-A)
1140 (modify-frame-parameters
1141 frame-A `((left . ,cw) (width . ,wd) (user-position t)))))
1181 (if (ediff-narrow-control-frame-p)
1186 (if (ediff-narrow-control-frame-p)
1192 (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
1193 (ediff-refresh-control-frame))
1233 (defun ediff-refresh-control-frame ()
1235 ;; set frame/icon titles for Emacs
1236 (modify-frame-parameters
1237 ediff-control-frame
1241 ;; set frame/icon titles for XEmacs
1242 (setq frame-title-format (ediff-make-base-title)
1243 frame-icon-title-format (ediff-make-narrow-control-buffer-id))
1244 ;; force an update of the frame title
1245 (modify-frame-parameters ediff-control-frame '(()))))
1264 (cdr (assoc 'name ediff-control-frame-parameters))