]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "function-put: signal error with non-symbol"
authorEli Zaretskii <eliz@gnu.org>
Sat, 28 Jun 2025 09:01:13 +0000 (12:01 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 20:07:25 +0000 (22:07 +0200)
This reverts commit a4ec9ca12969018cdf15b8cc713b3ba054326f99.
It caused unnecessary errors, see bug#78593.

(cherry picked from commit b4d3ac1e041347081f0843e0b47ad86516cd9cc9)

lisp/subr.el
test/lisp/subr-tests.el

index 26c2e82fc9a5b03c0e993a05a7eb0d8a987bf12b..728b3761a9a8e84bfece1c44ea2aa41bfff65183 100644 (file)
@@ -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)))
index f598ee57f8d98344d54a0692c306d3b4461cc75d..de2c59b9c25e45fdae7763ca00f4e24d20b0f397 100644 (file)
@@ -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)