unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17024: 24.3.50; eieio-compiled-function-arglist is broken
@ 2014-03-17 13:13 OKAZAKI Tetsurou
  2014-03-18 20:21 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: OKAZAKI Tetsurou @ 2014-03-17 13:13 UTC (permalink / raw)
  To: 17024


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)


In GNU Emacs 24.3.50.3 (i686-pc-cygwin)
 of 2014-03-17 on reishi
Repository revision: 116776 eliz@gnu.org-20140316163150-cxpn6olwgxpj5t5z
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --without-all --without-x --with-w32 --with-zlib
 --with-gnutls --with-xml2 --with-xpm --with-jpeg --with-tiff --with-gif
 --with-png --with-rsvg --with-file-notification=yes
 --without-compress-install --enable-check-lisp-object-type
 --disable-link-time-optimization 'CFLAGS=-ggdb3 -O2''

Important settings:
  value of $LC_TIME: C
  value of $LANG: ja_JP.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-semantic-mru-bookmark-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-idle-scheduler-mode: t
  global-semantic-idle-summary-mode: t
  semantic-mode: t
  global-ede-mode: t
  diff-auto-refine-mode: t
  display-time-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
q <help-echo> <down-mouse-3> <mouse-3> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <edit> <paste> C-j 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <edit> <paste> C-j <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <send-emacs-bug
-report>

Recent messages:
jde-java-font-lock: building names cache...empty
For information about GNU Emacs and the GNU system, type C-h C-a.
Package lmenu is obsolete!
Package sregex is obsolete!

Load-path shadows:
/usr/local/share/emacs/site-lisp/flim/md4 hides /usr/local/share/emacs/24.3.50/lisp/md4
/usr/local/share/emacs/site-lisp/flim/hex-util hides /usr/local/share/emacs/24.3.50/lisp/hex-util
/usr/local/share/emacs/site-lisp/bitmap/po hides /usr/local/share/emacs/24.3.50/lisp/textmodes/po
/usr/local/share/emacs/site-lisp/flim/sasl hides /usr/local/share/emacs/24.3.50/lisp/net/sasl
/usr/local/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/local/share/emacs/24.3.50/lisp/net/sasl-ntlm
/usr/local/share/emacs/site-lisp/flim/sasl-digest hides /usr/local/share/emacs/24.3.50/lisp/net/sasl-digest
/usr/local/share/emacs/site-lisp/flim/sasl-cram hides /usr/local/share/emacs/24.3.50/lisp/net/sasl-cram
/usr/local/share/emacs/site-lisp/flim/ntlm hides /usr/local/share/emacs/24.3.50/lisp/net/ntlm
/usr/local/share/emacs/site-lisp/flim/hmac-md5 hides /usr/local/share/emacs/24.3.50/lisp/net/hmac-md5
/usr/local/share/emacs/site-lisp/flim/hmac-def hides /usr/local/share/emacs/24.3.50/lisp/net/hmac-def
/usr/local/share/emacs/site-lisp/wl/rfc2368 hides /usr/local/share/emacs/24.3.50/lisp/mail/rfc2368
/usr/local/share/emacs/site-lisp/wl/utf7 hides /usr/local/share/emacs/24.3.50/lisp/gnus/utf7
/usr/local/share/emacs/site-lisp/semi/smime hides /usr/local/share/emacs/24.3.50/lisp/gnus/smime
/usr/local/share/emacs/site-lisp/semi/pgg hides /usr/local/share/emacs/24.3.50/lisp/obsolete/pgg
/usr/local/share/emacs/site-lisp/semi/pgg-pgp5 hides /usr/local/share/emacs/24.3.50/lisp/obsolete/pgg-pgp5
/usr/local/share/emacs/site-lisp/semi/pgg-pgp hides /usr/local/share/emacs/24.3.50/lisp/obsolete/pgg-pgp
/usr/local/share/emacs/site-lisp/semi/pgg-parse hides /usr/local/share/emacs/24.3.50/lisp/obsolete/pgg-parse
/usr/local/share/emacs/site-lisp/semi/pgg-gpg hides /usr/local/share/emacs/24.3.50/lisp/obsolete/pgg-gpg
/usr/local/share/emacs/site-lisp/semi/pgg-def hides /usr/local/share/emacs/24.3.50/lisp/obsolete/pgg-def

Features:
(shadow sort gnus-util mail-extr emacsbug sendmail debbugs-autoloads
oauth2-autoloads package jde derived jde-annotations jde-class
jde-parse-class jde-import jde-open-source jde-bsh jde-parse-expr
jde-java-font-lock jde-which-method jde-java-grammar semantic/senator
semantic/decorate pulse jde-wiz jde-complete eldoc jde-plugins
executable browse-url jde-gen tempo jde-run jde-jdb jde-bug jde-dbs
jde-dbo regress jde-db jde-parse sregex etags jde-imenu semantic/imenu
imenu semantic/db-file data-debug cedet-files semantic/java semantic/doc
thingatpt avl-tree semantic/sb semantic/sort jde-compile cus-edit
cus-start cus-load cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs jde-help jde-widgets tree-widget
beanshell lmenu jde-custom jde-project-file jde-util arc-mode
archive-mode efc jde-autoload semantic/mru-bookmark semantic/db-mode
semantic/db semantic/idle semantic/format semantic/tag-ls semantic/find
semantic/ctxt semantic/util-modes semantic/util semantic semantic/tag
semantic/lex semantic/fw mode-local ede/speedbar ede/files ede ede/base
gv ede/auto ede/source eieio-base eieio-speedbar speedbar sb-image
ezimage dframe eieio-custom eieio byte-opt bytecomp byte-compile cconv
eieio-core cedet mime-w3m w3m-load tls generic-x vc-diff vc
vc-dispatcher psvn advice wid-edit cl cl-loaddefs cl-lib log-edit
message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns
mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log
diff-mode easy-mmode easymenu compile comint ansi-color ring time
time-date japan-util tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel w32-common-fns disp-table w32-win w32-vars
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
gfilenotify w32 multi-tty emacs)





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#17024: 24.3.50; eieio-compiled-function-arglist is broken
  2014-03-17 13:13 bug#17024: 24.3.50; eieio-compiled-function-arglist is broken OKAZAKI Tetsurou
@ 2014-03-18 20:21 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-03-18 20:21 UTC (permalink / raw)
  To: OKAZAKI Tetsurou; +Cc: 17024

> 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)






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-18 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-17 13:13 bug#17024: 24.3.50; eieio-compiled-function-arglist is broken OKAZAKI Tetsurou
2014-03-18 20:21 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).