[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 9bf9463: Don't warn about obsolete defgenerics when
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 9bf9463: Don't warn about obsolete defgenerics when defining them |
Date: |
Sun, 29 Jan 2017 16:18:31 +0000 (UTC) |
branch: master
commit 9bf94639b8f674d2c7894df35f26f09d0ecc67f5
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Don't warn about obsolete defgenerics when defining them
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): The declaration code
should run after the definition code (Bug#25556).
---
lisp/emacs-lisp/cl-generic.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 8d141d7..6cc70c4 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -226,7 +226,13 @@ DEFAULT-BODY, if present, is used as the body of a default
method.
(when (eq 'setf (car-safe name))
(require 'gv)
(setq name (gv-setter (cadr name))))
- `(progn
+ `(prog1
+ (progn
+ (defalias ',name
+ (cl-generic-define ',name ',args ',(nreverse options))
+ ,(help-add-fundoc-usage doc args))
+ ,@(mapcar (lambda (method) `(cl-defmethod ,name ,@method))
+ (nreverse methods)))
,@(mapcar (lambda (declaration)
(let ((f (cdr (assq (car declaration)
defun-declarations-alist))))
@@ -235,12 +241,7 @@ DEFAULT-BODY, if present, is used as the body of a default
method.
(t (message "Warning: Unknown defun property `%S' in %S"
(car declaration) name)
nil))))
- (cdr declarations))
- (defalias ',name
- (cl-generic-define ',name ',args ',(nreverse options))
- ,(help-add-fundoc-usage doc args))
- ,@(mapcar (lambda (method) `(cl-defmethod ,name ,@method))
- (nreverse methods)))))
+ (cdr declarations)))))
;;;###autoload
(defun cl-generic-define (name args options)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 9bf9463: Don't warn about obsolete defgenerics when defining them,
Noam Postavsky <=