From 43d0e8483e5b51aec1347b8a2ed53acae34a9811 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 2 Jan 2021 12:18:39 +0100 Subject: Fix `functionp' contraining (bug#45576) * lisp/emacs-lisp/comp.el (comp-known-predicates) (comp-known-predicates-h): New constants. (comp-known-predicate-p, comp-pred-to-cstr): New functions. * lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Don't define. * test/src/comp-tests.el (comp-test-45576): New testcase. * test/src/comp-test-funcs.el (comp-test-45576-f): New function. --- test/src/comp-test-funcs.el | 8 ++++++++ test/src/comp-tests.el | 5 +++++ 2 files changed, 13 insertions(+) (limited to 'test/src') diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 1c2fb3d3c0b..d0ec6365819 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el @@ -455,6 +455,14 @@ (print x) (car x))) +(defun comp-test-45576-f () + ;; Reduced from `eshell-find-alias-function'. + (let ((sym (intern-soft "eval"))) + (if (and (functionp sym) + '(eshell-ls eshell-pred eshell-prompt eshell-script + eshell-term eshell-unix)) + sym))) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;; diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 9801136152a..faaa2f4e4f8 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -482,6 +482,11 @@ https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html." (comp-deftest comp-test-not-cons () (should-not (comp-test-not-cons-f nil))) +(comp-deftest comp-test-45576 () + "Functionp satisfies also symbols. +." + (should (eq (comp-test-45576-f) 'eval))) + ;;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests. ;; -- cgit v1.2.3