[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cl-case is not autoloaded in Emacs 27
From: |
Daniele Nicolodi |
Subject: |
cl-case is not autoloaded in Emacs 27 |
Date: |
Wed, 21 Jul 2021 19:18:00 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
Hello,
I have been trying to understand why some ERT unit tests I wrote fail in
Emacs 27 while they suceed in Emacs 26. After some head scratching I
found that the problem is caused by the fact that Emacs 27 does not seem
to know about the cl-case macro unless I (require 'cl-macs).
Indeed, if I try to byte-compile some trivial code like
(let ((x ?c))
(cl-case x
(?a 0)
(?b 1)))
in Emacs 27.1 or Emacs 27.2 I obtain these warnings:
In toplevel form:
test.el:1:1:Warning: ‘97’ is a malformed function
test.el:1:1:Warning: ‘98’ is a malformed function
In end of data:
test.el:7:1:Warning: the function ‘cl-case’ is not known to be defined.
Adding a (require cl-macs) to my code solves my problem, however, the
doc string of cl-case would suggest that this should not be necessary.
Am I missing something?
Thank you.
Best,
Dan