X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fwindow-xemacs.el;h=6fb0abde115e79a9581c4bce2158b906451ce5c9;hb=89d935bfb8bf9cab3d99f71af40c2afbea401c96;hp=554ec53f4a9c7e4c24417a66f9ff50f37c554e81;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git- diff --git a/lisp/window-xemacs.el b/lisp/window-xemacs.el index 554ec53..6fb0abd 100644 --- a/lisp/window-xemacs.el +++ b/lisp/window-xemacs.el @@ -51,11 +51,11 @@ If WINDOW is nil, the selected window is used." (when (null n) (redraw-frame (window-frame window) t))) -(defun backward-other-window (arg &optional all-frames device) - "Select the ARG'th different window on this frame, going backwards. -This is just like calling `other-window' with the arg negated." +(defun backward-other-window (count &optional which-frames which-devices) + "Select the COUNT'th different window on this frame, going backwards. +This is just like calling `other-window' with COUNT negated." (interactive "p") - (other-window (- arg) all-frames device)) + (other-window (- count) which-frames which-devices)) (defalias 'windows-of-buffer 'get-buffer-window-list) @@ -191,6 +191,29 @@ Each frame has its own window-config and \"unpop\" stack." ;;;;;;;;;;;;; display-buffer, moved here from C. Hallelujah. +(make-variable-buffer-local '__buffer-dedicated-frame) + +(defun buffer-dedicated-frame (&optional buffer) + "Return the frame dedicated to this BUFFER, or nil if there is none. +No argument or nil as argument means use current buffer as BUFFER." + (let ((buffer (decode-buffer buffer))) + (let ((frame (symbol-value-in-buffer '__buffer-dedicated-frame buffer))) + ;; XEmacs addition: if the frame is dead, silently make it go away. + (when (and (framep frame) (not (frame-live-p frame))) + (with-current-buffer buffer + (setq __buffer-dedicated-frame nil)) + (setq frame nil)) + frame))) + +(defun set-buffer-dedicated-frame (buffer frame) + "For this BUFFER, set the FRAME dedicated to it. +FRAME must be a frame or nil." + (let ((buffer (decode-buffer buffer))) + (and frame + (check-argument-type #'frame-live-p frame)) + (with-current-buffer buffer + (setq __buffer-dedicated-frame frame)))) + (defvar display-buffer-function nil "If non-nil, function to call to handle `display-buffer'. It will receive three args: the same as those to `display-buffer'.")