From a985f6f9e287dc97b682e9081c290511c2020e51 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 28 Jun 2025 12:01:13 +0300 Subject: [PATCH] Revert "function-put: signal error with non-symbol" This reverts commit a4ec9ca12969018cdf15b8cc713b3ba054326f99. It caused unnecessary errors, see bug#78593. (cherry picked from commit b4d3ac1e041347081f0843e0b47ad86516cd9cc9) --- lisp/subr.el | 2 -- test/lisp/subr-tests.el | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 26c2e82fc9a..728b3761a9a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4238,8 +4238,6 @@ If AUTOLOAD is non-nil and F is autoloaded, try to load it in the hope that it will set PROP. If AUTOLOAD is `macro', do it only if it's an autoloaded macro." (declare (important-return-value t)) - (unless (symbolp f) - (signal 'wrong-type-argument (list 'symbolp f))) (let ((val nil)) (while (and (symbolp f) (null (setq val (get f prop))) diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index f598ee57f8d..de2c59b9c25 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1298,11 +1298,7 @@ final or penultimate step during initialization.")) (should (eq (function-get 'subr-tests--some-fun 'prop) 'value)) ;; With an alias. (should (eq (function-get 'subr-tests--some-alias 'prop) 'value)) - (function-put 'subr-tests--some-alias 'prop 'value) - (should-error (function-get "non-symbol" 'prop) - :type 'wrong-type-argument) - (should-error (function-put "non-symbol" 'prop 'val) - :type 'wrong-type-argument)) + (function-put 'subr-tests--some-alias 'prop 'value)) (function-put 'subr-tests--some-fun 'prop nil))) (defun subr-tests--butlast-ref (list &optional n) -- 2.39.5