emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r110478: * lisp/emacs-lisp/cl-macs.el


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110478: * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Obey the :read-only property.
Date: Tue, 09 Oct 2012 02:01:10 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110478
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2012-10-09 02:01:10 -0400
message:
  * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Obey the :read-only property.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/cl-loaddefs.el
  lisp/emacs-lisp/cl-macs.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-09 02:07:26 +0000
+++ b/lisp/ChangeLog    2012-10-09 06:01:10 +0000
@@ -1,3 +1,7 @@
+2012-10-09  Stefan Monnier  <address@hidden>
+
+       * emacs-lisp/cl-macs.el (cl-defstruct): Obey the :read-only property.
+
 2012-10-09  Fabián Ezequiel Gallina  <address@hidden>
 
        Implemented `backward-up-list'-like navigation.
@@ -20,8 +24,7 @@
 2012-10-08  Fabián Ezequiel Gallina  <address@hidden>
 
        Fix shell handling of unbalanced quotes and parens in output.
-       * progmodes/python.el (python-rx-constituents): Added
-       string-delimiter.
+       * progmodes/python.el (python-rx-constituents): Add string-delimiter.
        (python-syntax-propertize-function): Use it.
        (python-shell-output-syntax-table): New var.
        (inferior-python-mode): Prevent unbalanced parens/quotes from

=== modified file 'lisp/emacs-lisp/cl-loaddefs.el'
--- a/lisp/emacs-lisp/cl-loaddefs.el    2012-10-06 17:34:57 +0000
+++ b/lisp/emacs-lisp/cl-loaddefs.el    2012-10-09 06:01:10 +0000
@@ -260,7 +260,7 @@
 ;;;;;;  cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when
 ;;;;;;  cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp
 ;;;;;;  cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*)
-;;;;;;  "cl-macs" "cl-macs.el" "6951d080daefb5194b1d21fe9b2deae4")
+;;;;;;  "cl-macs" "cl-macs.el" "885919e79dbcd11081cfb2e039b470c7")
 ;;; Generated autoloads from cl-macs.el
 
 (autoload 'cl--compiler-macro-list* "cl-macs" "\

=== modified file 'lisp/emacs-lisp/cl-macs.el'
--- a/lisp/emacs-lisp/cl-macs.el        2012-10-06 17:34:57 +0000
+++ b/lisp/emacs-lisp/cl-macs.el        2012-10-09 06:01:10 +0000
@@ -2324,26 +2324,29 @@
                           (if (= pos 0) '(car cl-x)
                             `(nth ,pos cl-x)))) forms)
              (push (cons accessor t) side-eff)
-              ;; Don't bother defining a setf-expander, since gv-get can use
-              ;; the compiler macro to get the same result.
-              ;;(push `(gv-define-setter ,accessor (cl-val cl-x)
-              ;;         ,(if (cadr (memq :read-only (cddr desc)))
-              ;;              `(progn (ignore cl-x cl-val)
-              ;;                      (error "%s is a read-only slot"
-              ;;                             ',accessor))
-              ;;            ;; If cl is loaded only for compilation,
-              ;;            ;; the call to cl--struct-setf-expander would
-              ;;            ;; cause a warning because it may not be
-              ;;            ;; defined at run time.  Suppress that warning.
-              ;;            `(progn
-              ;;               (declare-function
-              ;;                cl--struct-setf-expander "cl-macs"
-              ;;                (x name accessor pred-form pos))
-              ;;               (cl--struct-setf-expander
-              ;;                cl-val cl-x ',name ',accessor
-              ;;                ,(and pred-check `',pred-check)
-              ;;                ,pos))))
-              ;;      forms)
+              (if (cadr (memq :read-only (cddr desc)))
+                  (push `(gv-define-expander ,accessor
+                           (lambda (_cl-do _cl-x)
+                             (error "%s is a read-only slot" ',accessor)))
+                        forms)
+                ;; For normal slots, we don't need to define a setf-expander,
+                ;; since gv-get can use the compiler macro to get the
+                ;; same result.
+                ;; (push `(gv-define-setter ,accessor (cl-val cl-x)
+                ;;          ;; If cl is loaded only for compilation,
+                ;;          ;; the call to cl--struct-setf-expander would
+                ;;          ;; cause a warning because it may not be
+                ;;          ;; defined at run time.  Suppress that warning.
+                ;;          (progn
+                ;;            (declare-function
+                ;;             cl--struct-setf-expander "cl-macs"
+                ;;             (x name accessor pred-form pos))
+                ;;            (cl--struct-setf-expander
+                ;;             cl-val cl-x ',name ',accessor
+                ;;             ,(and pred-check `',pred-check)
+                ;;             ,pos)))
+                ;;       forms)
+                )
              (if print-auto
                  (nconc print-func
                         (list `(princ ,(format " %s" slot) cl-s)


reply via email to

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