dgnushack.el (define-obsolete-variable-alias): Simplify
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 14 Nov 2012 23:39:20 +0000 (23:39 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 14 Nov 2012 23:39:20 +0000 (23:39 +0000)
lisp/ChangeLog
lisp/dgnushack.el

index 97d9a68..5ef3ff6 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-14  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * dgnushack.el (define-obsolete-variable-alias): Simplify.
+
 2012-11-08  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-article-browse-html-parts): Always replace charset
index fec8302..19998fe 100644 (file)
     (autoload 'customize-set-variable "cus-edit" nil t)
     (autoload 'customize-variable "cus-edit" nil t)
     (autoload 'debug "debug" nil t)
-    (autoload 'define-compiler-macro "cl-macs" nil nil 'macro)
     (autoload 'sha1 "sha1")
     (if (featurep 'mule)
        (unless (locate-library "mule-ccl")
@@ -582,10 +581,10 @@ but which should be robust in the unexpected case that an error is signaled."
                                                     (oldvar newvar &rest args)
                                                     activate)
      "Ignore arguments other than the 1st and the 2nd ones."
-     (ad-Orig-define-obsolete-variable-alias oldvar newvar))
-   (define-compiler-macro
-     define-obsolete-variable-alias (oldvar newvar &rest args)
-     `(funcall ,(symbol-function 'ad-Orig-define-obsolete-variable-alias)
-              ,oldvar ,newvar))))
+     ad-do-it)
+   (put 'define-obsolete-variable-alias 'byte-optimizer
+       (lambda (form)
+         (setcdr (nthcdr 2 form) nil)
+         form))))
 
 ;;; dgnushack.el ends here