From: npostavs@users.sourceforge.net
To: Tom Tromey <tom@tromey.com>
Cc: 18587@debbugs.gnu.org
Subject: bug#18587: 24.4.50; error from cl-assert with a symbol argument
Date: Sun, 03 Jul 2016 23:53:15 -0400 [thread overview]
Message-ID: <877fd2dpp0.fsf@users.sourceforge.net> (raw)
In-Reply-To: <87k34lfy8x.fsf@tromey.com> (Tom Tromey's message of "Tue, 30 Sep 2014 06:55:42 +0100")
[-- 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
prev parent reply other threads:[~2016-07-04 3:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877fd2dpp0.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=18587@debbugs.gnu.org \
--cc=tom@tromey.com \
/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 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.