GNU bug report logs - #17024
24.3.50; eieio-compiled-function-arglist is broken

Previous Next

Package: emacs;

Reported by: OKAZAKI Tetsurou <okazaki.tetsurou <at> gmail.com>

Date: Mon, 17 Mar 2014 13:14:02 UTC

Severity: normal

Found in version 24.3.50

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: OKAZAKI Tetsurou <okazaki.tetsurou <at> gmail.com>
Cc: 17024 <at> debbugs.gnu.org
Subject: bug#17024: 24.3.50; eieio-compiled-function-arglist is broken
Date: Tue, 18 Mar 2014 16:21:38 -0400
> The library `emacs-lisp/eieio-core.el' defines the function
> `eieio-compiled-function-arglist' for compatibility but
> its implementation is broken.

> In *scratch* buffer:
> (eieio-compiled-function-arglist (symbol-function 'make-temp-file))
> => 769

> The function `help-function-arglist' does the right thing.

> (help-function-arglist (symbol-function 'make-temp-file))
> => (arg1 &optional arg2 arg3)

Does the patch below work for you?
And could you explain in which circumstance you've bumped into
this problem?


        Stefan


=== modified file 'lisp/emacs-lisp/eieio-core.el'
--- lisp/emacs-lisp/eieio-core.el	2014-01-01 07:43:34 +0000
+++ lisp/emacs-lisp/eieio-core.el	2014-03-18 20:19:52 +0000
@@ -34,18 +34,11 @@
 (eval-when-compile (require 'cl))       ;FIXME: Use cl-lib!
 
 ;; Compatibility
-(if (fboundp 'compiled-function-arglist)
-
+(defalias 'eieio-compiled-function-arglist
+  (if (featurep 'xemacs)
     ;; XEmacs can only access a compiled functions arglist like this:
-    (defalias 'eieio-compiled-function-arglist 'compiled-function-arglist)
-
-  ;; Emacs doesn't have this function, but since FUNC is a vector, we can just
-  ;; grab the appropriate element.
-  (defun eieio-compiled-function-arglist (func)
-    "Return the argument list for the compiled function FUNC."
-    (aref func 0))
-
-  )
+      #'compiled-function-arglist
+    #'help-function-arglist))
 
 (put 'eieio--defalias 'byte-hunk-handler
      #'byte-compile-file-form-defalias) ;;(get 'defalias 'byte-hunk-handler)





This bug report was last modified 8 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.