Function: readablep

readablep is a byte-compiled function defined in compat-29.el.

Signature

(readablep OBJECT)

Documentation

[Compatibility function for readablep, defined in Emacs 29.1. See (compat)
Emacs 29.1' for more details.]

Say whether OBJECT has a readable syntax. This means that OBJECT can be printed out and then read back again by the Lisp reader. This function returns nil if OBJECT is unreadable, and the printed representation (from prin1) of OBJECT if it is readable.

Source Code

;; Defined in ~/.emacs.d/elpa/compat-30.1.0.1/compat-29.el
(compat-defun readablep (object) ;; <compat-tests:readablep>
  "Say whether OBJECT has a readable syntax.
This means that OBJECT can be printed out and then read back
again by the Lisp reader.  This function returns nil if OBJECT is
unreadable, and the printed representation (from `prin1') of
OBJECT if it is readable."
  (declare (side-effect-free error-free))
  (ignore-errors (equal object (read (prin1-to-string object)))))