Make cl-print respect print-level and print-length (bug#31559)
authorGemini Lasswell <gazally@runbox.com>
Sun, 27 May 2018 18:38:00 +0000 (11:38 -0700)
committerGemini Lasswell <gazally@runbox.com>
Mon, 4 Jun 2018 15:57:10 +0000 (08:57 -0700)
commit5d448ca98cd59287b2c20175e2e6638f1922db57
treec7db77439fede92045ab369392acd046d6824b96
parent03697e648c080f6b007b6ef8443fd4448bc52364
Make cl-print respect print-level and print-length (bug#31559)

* lisp/emacs-lisp/cl-print.el (cl-print--depth): New variable.
(cl-print-object) <cons>: Print ellipsis if printing depth greater
than 'print-level' or length of list greater than 'print-length'.
(cl-print-object) <vector>: Truncate printing with ellipsis if
vector is longer than 'print-length'.
(cl-print-object) <cl-structure-object>: Truncate printing with
ellipsis if structure has more slots than 'print-length'.
(cl-print-object) <:around>: Bind 'cl-print--depth'.
* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-3, cl-print-tests-4): New tests.

(cherry picked from commit 0f48d18fd2a30f29cc3592a835d2a2254c9b0afb)
lisp/emacs-lisp/cl-print.el
test/lisp/emacs-lisp/cl-print-tests.el