aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2011-05-22 21:39:25 -0300
committerStefan Monnier2011-05-22 21:39:25 -0300
commitb1ef1257fe09bb9c602fc9d488b132896e4d16a9 (patch)
tree9f2140a6ea5e6e4ad53846c1a7f924f93d1197c4
parent7400048f602459209e89da4680ed9cc351ace4ee (diff)
downloademacs-b1ef1257fe09bb9c602fc9d488b132896e4d16a9.tar.gz
emacs-b1ef1257fe09bb9c602fc9d488b132896e4d16a9.zip
* lisp/emacs-lisp/eieio.el (eieio-defgeneric-form-primary-only-one):
Fix function quoting. Use backquote better.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/eieio.el17
2 files changed, 13 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 506348601ee..726f41496e3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/eieio.el (eieio-defgeneric-form-primary-only-one):
4 Fix function quoting. Use backquote better.
5
12011-05-22 Yuanle Song <sylecn@gmail.com> 62011-05-22 Yuanle Song <sylecn@gmail.com>
2 7
3 * nxml/rng-xsd.el (rng-xsd-check-pattern): Use case-sensitive 8 * nxml/rng-xsd.el (rng-xsd-check-pattern): Use case-sensitive
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 8c5260106a8..83c09b6fe0f 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -1226,29 +1226,28 @@ IMPL is the symbol holding the method implementation."
1226 (if (not (eieio-object-p (car local-args))) 1226 (if (not (eieio-object-p (car local-args)))
1227 ;; Not an object. Just signal. 1227 ;; Not an object. Just signal.
1228 (signal 'no-method-definition 1228 (signal 'no-method-definition
1229 (list ,(list 'quote method) local-args)) 1229 (list ',method local-args))
1230 1230
1231 ;; We do have an object. Make sure it is the right type. 1231 ;; We do have an object. Make sure it is the right type.
1232 (if ,(if (eq class eieio-default-superclass) 1232 (if ,(if (eq class eieio-default-superclass)
1233 nil ; default superclass means just an obj. Already asked. 1233 nil ; default superclass means just an obj. Already asked.
1234 `(not (child-of-class-p (aref (car local-args) object-class) 1234 `(not (child-of-class-p (aref (car local-args) object-class)
1235 ,(list 'quote class))) 1235 ',class)))
1236 )
1237 1236
1238 ;; If not the right kind of object, call no applicable 1237 ;; If not the right kind of object, call no applicable
1239 (apply 'no-applicable-method (car local-args) 1238 (apply 'no-applicable-method (car local-args)
1240 ,(list 'quote method) local-args) 1239 ',method local-args)
1241 1240
1242 ;; It is ok, do the call. 1241 ;; It is ok, do the call.
1243 ;; Fill in inter-call variables then evaluate the method. 1242 ;; Fill in inter-call variables then evaluate the method.
1244 (let ((scoped-class ,(list 'quote class)) 1243 (let ((scoped-class ',class)
1245 (eieio-generic-call-next-method-list nil) 1244 (eieio-generic-call-next-method-list nil)
1246 (eieio-generic-call-key method-primary) 1245 (eieio-generic-call-key method-primary)
1247 (eieio-generic-call-methodname ,(list 'quote method)) 1246 (eieio-generic-call-methodname ',method)
1248 (eieio-generic-call-arglst local-args) 1247 (eieio-generic-call-arglst local-args)
1249 ) 1248 )
1250 (apply ,(list 'quote impl) local-args) 1249 (apply #',impl local-args)
1251 ;(,impl local-args) 1250 ;;(,impl local-args)
1252 ))))))) 1251 )))))))
1253 1252
1254(defsubst eieio-defgeneric-reset-generic-form-primary-only-one (method) 1253(defsubst eieio-defgeneric-reset-generic-form-primary-only-one (method)