diff options
| author | Glenn Morris | 2016-05-27 19:22:29 -0400 |
|---|---|---|
| committer | Glenn Morris | 2016-05-27 19:22:29 -0400 |
| commit | 1ca6dea08380a6daccc5b01b32fce714875d44f7 (patch) | |
| tree | bc7228c3eb8eb2c3db4e2f315a38a48964d24f55 | |
| parent | 4e182dce20bd09e38a69bdf637a3bf2a8bbfdc58 (diff) | |
| download | emacs-1ca6dea08380a6daccc5b01b32fce714875d44f7.tar.gz emacs-1ca6dea08380a6daccc5b01b32fce714875d44f7.zip | |
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Tweak previous to
avoid build failure.
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 809e9223b43..121738df576 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'. | |||
| 2672 | (let ((accessor (intern (format "%s%s" conc-name slot)))) | 2672 | (let ((accessor (intern (format "%s%s" conc-name slot)))) |
| 2673 | (push slot slots) | 2673 | (push slot slots) |
| 2674 | (push (nth 1 desc) defaults) | 2674 | (push (nth 1 desc) defaults) |
| 2675 | (push `(cl-defsubst ,accessor (x) | 2675 | ;; The arg "cl-x" is referenced by name in eg pred-form |
| 2676 | ,(format "Access slot \"%s\" of `%s' struct X." | 2676 | ;; and pred-check, so changing it is not straightforward. |
| 2677 | (push `(cl-defsubst ,accessor (cl-x) | ||
| 2678 | ,(format "Access slot \"%s\" of `%s' struct CL-X." | ||
| 2677 | slot struct) | 2679 | slot struct) |
| 2678 | (declare (side-effect-free t)) | 2680 | (declare (side-effect-free t)) |
| 2679 | ,@(and pred-check | 2681 | ,@(and pred-check |
| 2680 | (list `(or ,pred-check | 2682 | (list `(or ,pred-check |
| 2681 | (signal 'wrong-type-argument | 2683 | (signal 'wrong-type-argument |
| 2682 | (list ',name x))))) | 2684 | (list ',name cl-x))))) |
| 2683 | ,(if (memq type '(nil vector)) `(aref x ,pos) | 2685 | ,(if (memq type '(nil vector)) `(aref cl-x ,pos) |
| 2684 | (if (= pos 0) '(car x) | 2686 | (if (= pos 0) '(car cl-x) |
| 2685 | `(nth ,pos x)))) | 2687 | `(nth ,pos cl-x)))) |
| 2686 | forms) | 2688 | forms) |
| 2687 | (if (cadr (memq :read-only (cddr desc))) | 2689 | (if (cadr (memq :read-only (cddr desc))) |
| 2688 | (push `(gv-define-expander ,accessor | 2690 | (push `(gv-define-expander ,accessor |