[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17630: 24.3.91; gv expander for a few places are incorrect

From: Leo Liu
Subject: bug#17630: 24.3.91; gv expander for a few places are incorrect
Date: Sat, 31 May 2014 11:04:07 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (CentOS 6.5)

On 2014-05-30 12:20 -0400, Stefan Monnier wrote:
> Indeed.  So I guess the better fix is to use gv-define-setter, indeed.
> BTW, IIRC these setter definitions come straight from the old CL code,
> so this bug has been with us for a while.

Indeed, though the return value of (setf (window-buffer ...) ...) is a

The fix is trivial. Do you mind installing it in emacs-24?

=== modified file 'lisp/emacs-lisp/gv.el'
--- lisp/emacs-lisp/gv.el       2014-02-21 19:01:19 +0000
+++ lisp/emacs-lisp/gv.el       2014-05-31 02:50:44 +0000
@@ -340,13 +340,16 @@
 (gv-define-simple-setter process-filter set-process-filter)
 (gv-define-simple-setter process-sentinel set-process-sentinel)
 (gv-define-simple-setter process-get process-put)
-(gv-define-simple-setter window-buffer set-window-buffer)
-(gv-define-simple-setter window-display-table set-window-display-table 'fix)
-(gv-define-simple-setter window-dedicated-p set-window-dedicated-p)
-(gv-define-simple-setter window-hscroll set-window-hscroll)
 (gv-define-simple-setter window-parameter set-window-parameter)
-(gv-define-simple-setter window-point set-window-point)
-(gv-define-simple-setter window-start set-window-start)
+(gv-define-setter window-buffer (v &optional w)
+  `(progn (set-window-buffer ,w ,v) ,v))
+(gv-define-setter window-display-table (v &optional w)
+  `(progn (set-window-display-table ,w ,v) ,v))
+(gv-define-setter window-dedicated-p (v &optional w)
+  `(set-window-dedicated-p ,w ,v))
+(gv-define-setter window-hscroll (v &optional w) `(set-window-hscroll ,w ,v))
+(gv-define-setter window-point (v &optional w) `(set-window-point ,w ,v))
+(gv-define-setter window-start (v &optional w) `(set-window-start ,w ,v))
 (gv-define-setter buffer-local-value (val var buf)
   (macroexp-let2 nil v val

reply via email to

[Prev in Thread] Current Thread [Next in Thread]