From: Gemini Lasswell <gazally@runbox.com>
To: 24700@debbugs.gnu.org
Subject: bug#24700: 26.0.50; unimplemented cl-defstruct slot option :type used in Emacs source code
Date: Sat, 15 Oct 2016 14:05:53 -0700 [thread overview]
Message-ID: <m2pon1nwzy.fsf@rainbow.local> (raw)
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))
next reply other threads:[~2016-10-15 21:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-15 21:05 Gemini Lasswell [this message]
2016-10-19 18:23 ` bug#24700: 26.0.50; unimplemented cl-defstruct slot option :type used in Emacs source code Johan Bockgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2pon1nwzy.fsf@rainbow.local \
--to=gazally@runbox.com \
--cc=24700@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).