emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 1ca6dea: * lisp/emacs-lisp/cl-macs.el (cl-defstruct


From: Glenn Morris
Subject: [Emacs-diffs] master 1ca6dea: * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Tweak previous to
Date: Fri, 27 May 2016 23:34:55 +0000 (UTC)

branch: master
commit 1ca6dea08380a6daccc5b01b32fce714875d44f7
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Tweak previous to
    avoid build failure.
---
 lisp/emacs-lisp/cl-macs.el |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 809e922..121738d 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2672,17 +2672,19 @@ non-nil value, that slot cannot be set via `setf'.
            (let ((accessor (intern (format "%s%s" conc-name slot))))
              (push slot slots)
              (push (nth 1 desc) defaults)
-             (push `(cl-defsubst ,accessor (x)
-                       ,(format "Access slot \"%s\" of `%s' struct X."
+             ;; The arg "cl-x" is referenced by name in eg pred-form
+             ;; and pred-check, so changing it is not straightforward.
+             (push `(cl-defsubst ,accessor (cl-x)
+                       ,(format "Access slot \"%s\" of `%s' struct CL-X."
                                 slot struct)
                        (declare (side-effect-free t))
                        ,@(and pred-check
                              (list `(or ,pred-check
                                          (signal 'wrong-type-argument
-                                                 (list ',name x)))))
-                       ,(if (memq type '(nil vector)) `(aref x ,pos)
-                          (if (= pos 0) '(car x)
-                            `(nth ,pos x))))
+                                                 (list ',name cl-x)))))
+                       ,(if (memq type '(nil vector)) `(aref cl-x ,pos)
+                          (if (= pos 0) '(car cl-x)
+                            `(nth ,pos cl-x))))
                     forms)
               (if (cadr (memq :read-only (cddr desc)))
                   (push `(gv-define-expander ,accessor



reply via email to

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