Mercurial > hg > xemacs-beta
diff lisp/frame.el @ 245:51092a27c943 r20-5b21
Import from CVS: tag r20-5b21
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:17:54 +0200 |
parents | 262b8bb4a523 |
children | 11cf20601dec |
line wrap: on
line diff
--- a/lisp/frame.el Mon Aug 13 10:17:09 2007 +0200 +++ b/lisp/frame.el Mon Aug 13 10:17:54 2007 +0200 @@ -757,21 +757,22 @@ (defun suspend-or-iconify-emacs () "Calls iconify-emacs if frame is an X frame, otherwise calls suspend-emacs" (interactive) - (cond - ((eq (frame-type) 'x) - (iconify-emacs)) - ((and (eq (frame-type) 'tty) - (console-tty-controlling-process (selected-console))) - (suspend-console (selected-console))) - (t - (suspend-emacs)))) + (cond ((device-on-window-system-p) + (iconify-emacs)) + ((and (eq (frame-type) 'tty) + (console-tty-controlling-process (selected-console))) + (suspend-console (selected-console))) + (t + (suspend-emacs)))) ;; This is quite a mouthful, but it should be descriptive, as it's -;; bound to C-z +;; bound to C-z. FSF takes the easy way out by binding C-z to +;; different things depending on window-system. We can't do the same, +;; because we allow simultaneous X and TTY consoles. (defun suspend-emacs-or-iconify-frame () "Iconify current frame if it is an X frame, otherwise suspend Emacs." (interactive) - (cond ((eq (frame-type) 'x) + (cond ((device-on-window-system-p) (iconify-frame)) ((and (eq (frame-type) 'tty) (console-tty-controlling-process (selected-console))) @@ -901,6 +902,11 @@ (set-window-buffer w buffer)) fr)) +(defcustom get-frame-for-buffer-default-to-current nil + "*When non-nil, `get-frame-for-buffer' will default to the current frame." + :type 'boolean + :group 'frames) + (defun get-frame-for-buffer-noselect (buffer &optional not-this-window-p on-frame) "Return a frame in which to display BUFFER. @@ -1006,6 +1012,13 @@ (get-frame-for-buffer-make-new-frame buffer) (car frames)))) + ;; + ;; This buffer's mode did not express a preference for a frame of a + ;; particular name. However, the user wants the frame to be the + ;; current one in that case. + ;; + (get-frame-for-buffer-default-to-current nil) + (t ;; ;; This buffer's mode did not express a preference for a frame of a