Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!sdcsvax!ucbvax!home.csc.ti.COM!Oren From: Oren@home.csc.ti.COM (LaMott Oren) Newsgroups: comp.windows.x Subject: Re: V11 CLX window-priority setf bug fix Message-ID: <2770150315-4318448@SI> Date: Tue, 13-Oct-87 18:11:55 EDT Article-I.D.: SI.2770150315-4318448 Posted: Tue Oct 13 18:11:55 1987 Date-Received: Fri, 16-Oct-87 06:17:22 EDT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 29 (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)