* bug#24700: 26.0.50; unimplemented cl-defstruct slot option :type used in Emacs source code
@ 2016-10-15 21:05 Gemini Lasswell
2016-10-19 18:23 ` Johan Bockgård
0 siblings, 1 reply; 2+ messages in thread
From: Gemini Lasswell @ 2016-10-15 21:05 UTC (permalink / raw)
To: 24700
The only slot option implemented in Emacs Lisp for cl-defstruct is
:read-only, according to the documentation. However there exists code in
the Emacs source tree which uses the :type option as in Common Lisp. My
(possibly incomplete) search found it in the following files:
emacs-lisp/cl-generic.el
emacs-lisp/cl-preloaded.el
emacs-lisp/eieio-core.el
emacs-lisp/ert.el
erc/erc-backend.el
gnus/nnmaildir.el
The code for cl-defstruct ignores any keyword other than :read-only, but
the problem is that since :type is not included in the edebug spec for
cl-defstruct's slot options, edebug and testcover give errors when asked
to instrument these files. To reproduce:
1. emacs -Q
2. M-x edebug-all-defs RET
3. C-x C-f lisp/emacs-lisp/cl-generic.el RET
4. M-x eval-buffer RET
In GNU Emacs 26.0.50.2 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1004))
of 2016-10-14 built on rainbow.local
Windowing system distributor 'Apple', version 10.3.1404
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Edebugging all definitions is on.
edebug-syntax-error: Invalid read syntax: "Failed matching", ("cl-defstruct" [&or symbolp (gate symbolp &rest [&or symbolp (&or [":conc-name" symbolp] [":constructor" symbolp &optional cl-lambda-list] [":copier" symbolp] [":predicate" symbolp] [":include" symbolp &rest sexp] [":print-function" sexp] [":type" symbolp] [":named"] [":initial-offset" natnump])])] [&optional stringp] &rest &or symbolp (symbolp def-form &optional ":read-only" sexp))
Configured using:
'configure --with-ns'
Configured features:
JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
NS
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
diff-auto-refine-mode: t
tooltip-mode: t
global-eldoc-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
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message subr-x puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils cl-macs vc-git diff-mode
easy-mmode map seq byte-opt gv bytecomp byte-compile cl-extra help-mode
cconv edebug easymenu cl-loaddefs pcase cl-lib time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev
obarray minibuffer cl-preloaded 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 kqueue
cocoa ns multi-tty make-network-process emacs)
Memory information:
((conses 16 214195 19525)
(symbols 48 21023 0)
(miscs 40 46 192)
(strings 32 21113 4927)
(string-bytes 1 657659)
(vectors 16 35806)
(vector-slots 8 677585 4828)
(floats 8 183 222)
(intervals 56 396 16)
(buffers 976 12))
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#24700: 26.0.50; unimplemented cl-defstruct slot option :type used in Emacs source code
2016-10-15 21:05 bug#24700: 26.0.50; unimplemented cl-defstruct slot option :type used in Emacs source code Gemini Lasswell
@ 2016-10-19 18:23 ` Johan Bockgård
0 siblings, 0 replies; 2+ messages in thread
From: Johan Bockgård @ 2016-10-19 18:23 UTC (permalink / raw)
To: 24700-done
Gemini Lasswell <gazally@runbox.com> writes:
> The only slot option implemented in Emacs Lisp for cl-defstruct is
> :read-only, according to the documentation. However there exists code in
> the Emacs source tree which uses the :type option as in Common Lisp. My
> (possibly incomplete) search found it in the following files:
>
> emacs-lisp/cl-generic.el
> emacs-lisp/cl-preloaded.el
> emacs-lisp/eieio-core.el
> emacs-lisp/ert.el
> erc/erc-backend.el
> gnus/nnmaildir.el
>
> The code for cl-defstruct ignores any keyword other than :read-only, but
> the problem is that since :type is not included in the edebug spec for
> cl-defstruct's slot options, edebug and testcover give errors when asked
> to instrument these files.
Edebug spec fixed in master.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-19 18:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-15 21:05 bug#24700: 26.0.50; unimplemented cl-defstruct slot option :type used in Emacs source code Gemini Lasswell
2016-10-19 18:23 ` Johan Bockgård
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).