RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (10/13/87)
VERSION:
X11 release 1
SYNOPSIS:
extraneous arg in CLX window-priority setf
DESCRIPTION:
ditto
REPEAT-BY:
try to call it
FIX:
in lib/CLX/attributes.l, redo the defsetf as follows:
(defsetf window-priority (window &optional sibling) (mode)
;; A bit strange, but retains setf form.
`(progn
(change-drawable-geometry
,window 6 (position ,mode '(:above :below :top-if :bottom-if :opposite)))
,@(when sibling
`((change-drawable-geometry ,window 5 (window-id ,sibling))))
,mode))Oren@home.csc.ti.COM (LaMott Oren) (10/14/87)
(defsetf window-priority (window &optional sibling) (mode)
;; A bit strange, but retains setf form.
`(progn
(change-drawable-geometry
,window 6 (position ,mode '(:above :below :top-if :bottom-if :opposite)))
,@(when sibling
`((change-drawable-geometry ,window 5 (window-id ,sibling))))
,mode))
The defsetf on the TI explorer causes the SIBLING variable above to be
bound to a gensym during macro expansion. (the VALUE of the gensym may
be NIL at runtime). This causes the
`((change-drawable-geometry ,window 5 (window-id ,sibling))))
form to always be included, which is incorrect. The following
definitions fix the problem (and generate less code):
(defsetf window-priority (window &optional sibling) (mode)
;; A bit strange, but retains setf form.
`(set-window-priority ,mode ,window ,sibling))
(DEFUN set-window-priority (mode window sibling)
(declare (type (member :above :below :top-if :bottom-if :opposite) mode)
(type window window)
(type (or null window) sibling))
(change-drawable-geometry
window 6 (position mode '(:above :below :top-if :bottom-if :opposite)))
(when sibling
(change-drawable-geometry window 5 (window-id sibling)))
mode)