Mercurial > emacs
comparison lisp/window.el @ 101240:b8ae7a4c9154
Remove experimental code inadvertently introduced when reverting the
2009-01-14 change of special-display-p. (Bug#1929, Bug#1930)
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Fri, 16 Jan 2009 16:51:54 +0000 |
parents | 7eba5f48f79f |
children | 27ea4d4a56a4 |
comparison
equal
deleted
inserted
replaced
101239:059475cb166b | 101240:b8ae7a4c9154 |
---|---|
955 ;; whatever reason. | 955 ;; whatever reason. |
956 (condition-case nil | 956 (condition-case nil |
957 (enlarge-window (/ (- (window-height window) (window-height)) 2)) | 957 (enlarge-window (/ (- (window-height window) (window-height)) 2)) |
958 (error nil))))) | 958 (error nil))))) |
959 | 959 |
960 (defun display-buffer-specially (buffer locus) | |
961 (cond | |
962 ((window-minibuffer-p (selected-window)) | |
963 nil) | |
964 ((eq locus 'this) | |
965 (condition-case nil | |
966 (switch-to-buffer buffer) | |
967 (error nil))) | |
968 ((memq locus '(below below-split right right-split)) | |
969 (let ((edges (window-edges))) | |
970 (cond | |
971 ((and (eq locus 'below) | |
972 (let* ((other-window (next-window)) | |
973 (other-edges (window-edges other-window))) | |
974 (and (= (nth 0 edges) (nth 0 other-edges)) | |
975 (< (nth 3 edges) (nth 3 other-edges)) | |
976 other-window)))) | |
977 ((and (eq locus 'right) | |
978 (let* ((other-window (next-window)) | |
979 (other-edges (window-edges other-window))) | |
980 (and (= (nth 1 edges) (nth 1 other-edges)) | |
981 (< (nth 2 edges) (nth 2 other-edges)) | |
982 other-window)))) | |
983 ((and (memq locus '(below below-split)) | |
984 (let ((split-height-threshold 0)) | |
985 (and (window--splittable-p (selected-window)) | |
986 (split-window))))) | |
987 ((and (memq locus '(right right-split)) | |
988 (let ((split-width-threshold 0)) | |
989 (window--splittable-p (selected-window) t) | |
990 (split-window nil nil t))))))) | |
991 ((memq locus '(bottom bottom-split)) | |
992 (let ((edges (window-edges)) | |
993 (other-edges (window-edges (next-window))) | |
994 (window (selected-window)) | |
995 window-to-display window-to-split) | |
996 ;; Wrong -- our window must be better than the last we found. | |
997 (while (or (> (nth 2 other-edges) (nth 2 edges)) | |
998 (> (nth 3 other-edges) (nth 3 edges))) | |
999 (setq window (next-window window)) | |
1000 (when (> (nth 3 other-edges) (nth 3 edges)) | |
1001 (setq window-to-display window) | |
1002 (setq window-to-split | |
1003 (and (eq locus 'bottom-split) | |
1004 (let ((split-height-threshold 0)) | |
1005 (and (window--splittable-p window) | |
1006 window))))) | |
1007 (setq other-edges (window-edges (next-window window)))) | |
1008 (if (eq locus 'bottom) | |
1009 window-to-display | |
1010 (let ((split-height-threshold 0)) | |
1011 (split-window window-to-split))))))) | |
1012 | |
1013 (defun window--display-buffer-1 (window) | 960 (defun window--display-buffer-1 (window) |
1014 "Raise the frame containing WINDOW. | 961 "Raise the frame containing WINDOW. |
1015 Do not raise the selected frame. Return WINDOW." | 962 Do not raise the selected frame. Return WINDOW." |
1016 (let* ((frame (window-frame window)) | 963 (let* ((frame (window-frame window)) |
1017 (visible (frame-visible-p frame))) | 964 (visible (frame-visible-p frame))) |
1119 ;; parameters to pass to `special-display-function'. | 1066 ;; parameters to pass to `special-display-function'. |
1120 (let ((pars (special-display-p name-of-buffer))) | 1067 (let ((pars (special-display-p name-of-buffer))) |
1121 (when pars | 1068 (when pars |
1122 (funcall special-display-function | 1069 (funcall special-display-function |
1123 buffer (if (listp pars) pars)))))) | 1070 buffer (if (listp pars) pars)))))) |
1124 ((not (memq not-this-window '(nil t))) | |
1125 (window--display-buffer-2 | |
1126 buffer (display-buffer-specially buffer not-this-window))) | |
1127 ((or use-pop-up-frames (not frame-to-use)) | 1071 ((or use-pop-up-frames (not frame-to-use)) |
1128 ;; We want or need a new frame. | 1072 ;; We want or need a new frame. |
1129 (window--display-buffer-2 | 1073 (window--display-buffer-2 |
1130 buffer (frame-selected-window (funcall pop-up-frame-function)))) | 1074 buffer (frame-selected-window (funcall pop-up-frame-function)))) |
1131 ((and pop-up-windows | 1075 ((and pop-up-windows |