all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18587: 24.4.50; error from cl-assert with a symbol argument
@ 2014-09-30  5:55 Tom Tromey
  2016-07-04  3:53 ` npostavs
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2014-09-30  5:55 UTC (permalink / raw
  To: 18587


This works fine:

(let ((x 5))
  (cl-assert x))

However, to my surprise, this fails with an error from macroexpand:

(let ((x 5))
  (cl-assert x t))

Writing (cl-assert (progn x) t) works ok, but I think ideally I
shouldn't have to do that.





In GNU Emacs 24.4.50.10 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9)
 of 2014-09-26 on bapiya
Repository revision: 117953 sdl.web@gmail.com-20140926001521-n3km8s3h27glxgf3
Windowing system distributor `Fedora Project', version 11.0.11404000
System Description:	Fedora release 20 (Heisenbug)

Configured using:
 `configure --prefix=/home/tromey/Emacs/install'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB

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

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  diff-auto-refine-mode: t
  which-function-mode: t
  projectile-global-mode: t
  projectile-mode: t
  global-auto-revert-mode: t
  desktop-save-mode: t
  erc-services-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  savehist-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t

Recent input:
<tab> <return> C-s - i n t o - M-m C-M-SPC M-; C-x 
C-g C-n C-e C-x C-e C-z n C-p C-e C-j C-x 1 M-v C-z 
n C-/ C-x C-s C-x s y C-M-x C-x b <return> C-x s <switch-frame> 
C-z n C-x b <return> C-e C-x C-e C-z n C-x 4 b <return> 
C-p C-p C-e C-j C-] C-x o C-x 1 C-z n C-x s C-x v d 
<return> p = C-x 1 C-x b <return> g x = C-x 1 <switch-frame> 
C-c b C-c C-g C-z n C-z n C-x C-f d o m . <tab> C-g 
C-x b d o m <tab> <return> C-s e l c C-w C-w C-w C-s 
C-s C-s C-a C-x s <switch-frame> <switch-frame> C-z 
n C-c b C-n C-n C-n = C-x 1 C-c b C-z n C-x b p r o 
j <tab> <return> C-f C-x s C-p C-u C-p C-k C-k C-k 
C-u SPC [ . . . ] C-f C-f C-x C-s C-z n = C-x 1 C-c 
b C-x C-f / t m p / b u g . e l C-g C-x b * s c r <tab> 
<return> C-u C-n ( c l C-a C-k 9 <backspace> ( l e 
t SPC ( ( x SPC 5 ) ) <return> ( c l - a s s e r t 
SPC x SPC t ) ) C-j C-] <switch-frame> C-z n M-b M-b 
M-f M-d C-e C-j C-z n M-x r e p o r t - e m <tab> C-g 
C-c r n SPC E E E E E SPC E C-p C-p SPC SPC n E SPC 
E E E E E q SPC Q y C-u C-n C-u C-n M-x r e p o r t 
- e m <tab> <return>

Recent messages:
Reading active file from archive via nnfolder...done
Reading active file via nndraft...done
Checking new news...done
Opening nnimap server on mail.tromey.com...done
nnimap read 0k from mail.tromey.com
Parsing BBDB... (frobnicating...done)
Expiring articles...done
Opening nnimap server on mail.mozilla.com...done
nnimap read 0k from mail.mozilla.com
Discard changes to this group and exit? (y or n) y

Load-path shadows:
/home/tromey/.emacs.d/elpa/css-mode-1.0/css-mode hides /home/tromey/Emacs/install/share/emacs/24.4.50/lisp/textmodes/css-mode
/home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/24.4.50/lisp/play/bubbles

Features:
(shadow mail-hist emacsbug bbdb-gui bbdb-hooks mule-util sort smiley
gnus-cite mm-archive gnus-async gnus-bcklg qp gnus-ml disp-table
gnus-topic nndraft nnmh nnfolder utf-7 bbdb-gnus bbdb-snarf mail-extr
bbdb-com warnings cl gnutls network-stream starttls gnus-agent gnus-srvr
gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache gnus-registry
registry eieio-base gnus-art mm-uu mml2015 epg-config mm-view mml-smime
smime dig mailcap gnus-sum gnus-group gnus-undo smtpmail sendmail
gnus-start gnus-cloud nnimap nnmail mail-source tls utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader
eieio-opt speedbar sb-image ezimage dframe log-edit message rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util
copyright dabbrev misearch multi-isearch help-mode debug cl-macs gv
org-element org-rmail org-mhe org-irc org-info org-gnus org-docview
doc-view image-mode org-bibtex bibtex org-bbdb org-w3m org org-macro
org-footnote org-pcomplete org-list org-faces org-entities noutline
outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob
ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs goto-addr add-log gud conf-mode sgml-mode python dired-aux
dired jka-compr smerge-mode diff-mode easy-mmode vc-arch vc-mtn vc-hg
bug-reference js json cc-mode cc-fonts cc-guess cc-menus cc-cmds vc-bzr
vc-sccs vc-svn vc-cvs vc-rcs vc-git flyspell ispell eldoc diminish appt
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs which-func imenu
projectile edmacro kmacro pkg-info find-func lisp-mnt epl grep compile
dash s minimap autorevert filenotify desktop frameset cus-start cus-load
status erc-services erc-list erc-menu erc-join erc-ring erc-networks
erc-pcomplete pcomplete erc-track erc-match erc-button wid-edit
cl-loaddefs cl-lib erc-fill erc-stamp erc-netsplit erc-goodies erc
erc-backend erc-compat format-spec auth-source eieio byte-opt bytecomp
byte-compile cconv eieio-core gnus-util mm-util mail-prsvr
password-cache thingatpt pp advice help-fns vc-dir ewoc vc vc-dispatcher
cc-styles cc-align cc-engine cc-vars cc-defs bbdb timezone ange-ftp
comint ansi-color ring server savehist dwarf-mode-autoloads
jabber-autoloads lisppaste-autoloads pydoc-info-autoloads info-look info
easymenu weblogger-autoloads package bbdb-autoloads time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
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
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 1136439 11118)
 (symbols 48 111297 0)
 (miscs 40 40097 303)
 (strings 32 409980 88872)
 (string-bytes 1 12919429)
 (vectors 16 90018)
 (vector-slots 8 1437635 21109)
 (floats 8 381 594)
 (intervals 56 50489 675)
 (buffers 976 282)
 (heap 1024 244876 18281))

Tom





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

* bug#18587: 24.4.50; error from cl-assert with a symbol argument
  2014-09-30  5:55 bug#18587: 24.4.50; error from cl-assert with a symbol argument Tom Tromey
@ 2016-07-04  3:53 ` npostavs
  0 siblings, 0 replies; 2+ messages in thread
From: npostavs @ 2016-07-04  3:53 UTC (permalink / raw
  To: Tom Tromey; +Cc: 18587

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

severity 18587 minor
tags 18587 patch
quit

Tom Tromey <tom@tromey.com> writes:

> This works fine:
>
> (let ((x 5))
>   (cl-assert x))
>
> However, to my surprise, this fails with an error from macroexpand:
>
> (let ((x 5))
>   (cl-assert x t))
>
> Writing (cl-assert (progn x) t) works ok, but I think ideally I
> shouldn't have to do that.

Yeah, seems kind of silly.  Here's a patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1015 bytes --]

From b0fbb6f88c09e13977dca1d24ef76e40312fe4b5 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 3 Jul 2016 23:44:14 -0400
Subject: [PATCH v1] Fix cl-assert with atomp FORM, non-nil SHOW-ARGS

* lisp/emacs-lisp/cl-macs.el (cl-assert): Don't require that FORM is a
list when showing its (non-existent) arguments.
---
 lisp/emacs-lisp/cl-macs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index d2c90c2..b12c8bf 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2978,7 +2978,7 @@ cl-assert
                          (delq nil (mapcar (lambda (x)
                                              (unless (macroexp-const-p x)
                                                x))
-                                           (cdr form))))))
+                                           (cdr-safe form))))))
 	 `(progn
             (or ,form
                 (cl--assertion-failed
-- 
2.8.0


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

end of thread, other threads:[~2016-07-04  3:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30  5:55 bug#18587: 24.4.50; error from cl-assert with a symbol argument Tom Tromey
2016-07-04  3:53 ` npostavs

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.