display-buffer-pop-up-frame.
(display-buffer-pop-up-frame): Never pop up a frame in
noninteractive mode (Bug#8857).
+ (enlarge-window, shrink-window): Don't report an error when the
+ window can't be resized as requested (Bug#8862).
2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
negative, shrink selected window by -DELTA lines or columns.
Return nil."
(interactive "p")
- (resize-window (selected-window) delta horizontal))
+ (cond
+ ((zerop delta))
+ ((window-size-fixed-p nil horizontal)
+ (error "Selected window has fixed size"))
+ ((window-resizable-p nil delta horizontal)
+ (resize-window nil delta horizontal))
+ (t
+ (resize-window
+ nil (if (> delta 0)
+ (window-max-delta nil horizontal)
+ (- (window-min-delta nil horizontal)))
+ horizontal))))
(defun shrink-window (delta &optional horizontal)
"Make selected window DELTA lines smaller.
negative, enlarge selected window by -DELTA lines or columns.
Return nil."
(interactive "p")
- (resize-window (selected-window) (- delta) horizontal))
+ (cond
+ ((zerop delta))
+ ((window-size-fixed-p nil horizontal)
+ (error "Selected window has fixed size"))
+ ((window-resizable-p nil (- delta) horizontal)
+ (resize-window nil (- delta) horizontal))
+ (t
+ (resize-window
+ nil (if (> delta 0)
+ (- (window-min-delta nil horizontal))
+ (window-max-delta nil horizontal))
+ horizontal))))
(defun maximize-window (&optional window)
"Maximize WINDOW.
(setq entry (assq specifiers display-buffer-macro-specifiers)))
;; A macro specifier.
(cdr entry))
- ((memq pop-up-frames '(nil unset))
+ ((with-no-warnings (memq pop-up-frames '(nil unset)))
;; Pop up a new window.
(cdr (assq 'other-window display-buffer-macro-specifiers)))
(t