;ELC   
;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May  2 20:19:56 1995
;;; from file /gd/gnu/emacs/19.0/lisp/cust-print.el
;;; emacs version 19.28.90.69.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19")))
    (error "`/gd/gnu/emacs/19.0/lisp/cust-print.el' was compiled for Emacs 19"))


(byte-code "ÀÁ!ˆÂÃ!„ ÃÄMˆÀ‡" [require backquote fboundp defalias fset] 2)
#@492 *Controls how many levels deep a nested data object will print.  

If nil, printing proceeds recursively and may lead to
max-lisp-eval-depth being exceeded or an error may occur:
`Apparently circular structure being printed.'
Also see `print-length' and `print-circle'.

If non-nil, components at levels equal to or greater than `print-level'
are printed simply as `#'.  The object to be printed is at level 0,
and if the object is a list or vector, its top-level components are at
level 1.
(defvar print-level nil (#$ . -565))
#@618 *Controls the printing of recursive structures.  

If nil, printing proceeds recursively and may lead to
`max-lisp-eval-depth' being exceeded or an error may occur:
"Apparently circular structure being printed."  Also see
`print-length' and `print-level'.

If non-nil, shared substructures anywhere in the structure are printed
with `#N=' before the first occurrence (in the order of the print
representation) and `#N#' in place of each subsequent occurrence,
where N is a positive decimal integer.

There is no way to read this representation in standard Emacs,
but if you need to do so, try the cl-read.el package.
(defvar print-circle nil (#$ . -1100))
#@238 *Non-nil if printing of vectors should obey print-level and print-length.

For Emacs 18, setting print-level, or adding custom print list or
vector handling will make this happen anyway.  Emacs 19 obeys
print-level, but not for vectors.
(defvar custom-print-vectors nil (#$ . -1763))
#@461 An alist for custom printing of any type.
Pairs are of the form (PREDICATE . PRINTER).  If PREDICATE is true
for an object, then PRINTER is called with the object.
PRINTER should print to `standard-output' using cust-print-original-princ
if the standard printer is sufficient, or cust-print-prin for complex things.
The PRINTER should return the object being printed.

Don't modify this variable directly.  Use `add-custom-printer' and
`delete-custom-printer'
(defconst custom-printers nil (#$ . 2054))
#@114 Add a pair of PREDICATE and PRINTER to `custom-printers'.
Any pair that has the same PREDICATE is first removed.
(defalias 'add-custom-printer #[(pred printer) "	BÂž\"BÄ ‡" [pred printer delq custom-printers cust-print-update-custom-printers] 4 (#$ . 2564)])
#@54 Delete the custom printer associated with PREDICATE.
(defalias 'delete-custom-printer #[(pred) "À	\nž\n\"Ã ‡" [delq pred custom-printers cust-print-update-custom-printers] 3 (#$ . 2834)])
(defalias 'cust-print-use-custom-printer #[(object) "À‡" [nil] 1])
(defalias 'cust-print-update-custom-printers #[nil "ÀÁÂÃÄÅÆÇ\"É\"BE\"‡" [defalias cust-print-use-custom-printer lambda (object) cond append mapcar #[(pair) "@ÁBAÂBD‡" [pair (object) (object)] 3] custom-printers ((t nil))] 9])
(defalias 'cust-print-set-function-cell #[(symbol-pair) "À	@	A@K\"‡" [defalias symbol-pair] 3])
(defalias 'cust-print-original-princ #[(object &optional stream) "À‡" [nil] 1])
(byte-code "ÀÁ!„ ÂÃÄ\"ˆÀ‡" [fboundp cust-print-original-prin1 mapcar cust-print-set-function-cell ((cust-print-original-prin1 prin1) (cust-print-original-princ princ) (cust-print-original-print print) (cust-print-original-prin1-to-string prin1-to-string) (cust-print-original-format format) (cust-print-original-message message) (cust-print-original-error error))] 3)
#@170 Replace print functions with general, customizable, Lisp versions.
The emacs subroutines are saved away, and you can reinstall them
by running `custom-print-uninstall'.
(defalias 'custom-print-install #[nil "ÀÁÂ\"ˆÃ‡" [mapcar cust-print-set-function-cell ((prin1 custom-prin1) (princ custom-princ) (print custom-print) (prin1-to-string custom-prin1-to-string) (format custom-format) (message custom-message) (error custom-error)) t] 3 (#$ . 3872) nil])
#@51 Reset print functions to their emacs subroutines.
(defalias 'custom-print-uninstall #[nil "ÀÁÂ\"ˆÃ‡" [mapcar cust-print-set-function-cell ((prin1 cust-print-original-prin1) (princ cust-print-original-princ) (print cust-print-original-print) (prin1-to-string cust-print-original-prin1-to-string) (format cust-print-original-format) (message cust-print-original-message) (error cust-print-original-error)) t] 3 (#$ . 4331) nil])
(defalias (quote custom-print-funcs-installed-p) (quote custom-print-installed-p))
#@65 Return t if custom-print is currently installed, nil otherwise.
(defalias 'custom-print-installed-p #[nil "ÀKÁK=‡" [custom-prin1 prin1] 2 (#$ . 4847)])
(byte-code "ÀÁÂÃ#ˆÀÄÂÅ#ˆÆÁÄ\"‡" [put with-custom-print-funcs edebug-form-spec (body) with-custom-print (body) defalias] 4)
#@68 Temporarily install the custom print package while executing BODY.
(defalias 'with-custom-print '(macro . #[(&rest body) "ÀÁÂBBÄBB‡" [unwind-protect progn (custom-print-install) body ((custom-print-uninstall))] 4 (#$ . 5128)]))
#@410 Output the printed representation of OBJECT, any Lisp object.
Quoting characters are printed when needed to make output that `read'
can handle, whenever this is possible.
Output stream is STREAM, or value of `standard-output' (which see).

This is the custom-print replacement for the standard `prin1'.  It
uses the appropriate printer depending on the values of `print-level'
and `print-circle' (which see).
(defalias 'custom-prin1 #[(object &optional stream) "À	\nÃ#‡" [cust-print-top-level object stream cust-print-original-prin1] 4 (#$ . 5364)])
#@285 Output the printed representation of OBJECT, any Lisp object.
No quoting characters are used; no delimiters are printed around
the contents of strings.
Output stream is STREAM, or value of `standard-output' (which see).

This is the custom-print replacement for the standard `princ'.
(defalias 'custom-princ #[(object &optional stream) "À	\nÃ#‡" [cust-print-top-level object stream cust-print-original-princ] 4 (#$ . 5921)])
#@264 Return a string containing the printed representation of OBJECT,
any Lisp object.  Quoting characters are used when needed to make output
that `read' can handle, whenever this is possible.

This is the custom-print replacement for the standard `prin1-to-string'.
(defalias 'custom-prin1-to-string #[(object) "ÀÁ!Š\nqˆÃ ˆ)Ä\n\"ˆŠ\nqˆÆ *‡" [get-buffer-create " *custom-print-temp*" buf erase-buffer custom-prin1 object buffer-string] 3 (#$ . 6353)])
#@312 Output the printed representation of OBJECT, with newlines around it.
Quoting characters are printed when needed to make output that `read'
can handle, whenever this is possible.
Output stream is STREAM, or value of `standard-output' (which see).

This is the custom-print replacement for the standard `print'.
(defalias 'custom-print #[(object &optional stream) "ÀÁ\n\"ˆÃ\f\n\"ˆÀÁ\n\"‡" [cust-print-original-princ "\n" stream custom-prin1 object] 3 (#$ . 6810)])
#@850 Format a string out of a control-string and arguments.  
The first argument is a control string.  It, and subsequent arguments
substituted into it, become the value, which is a string.
It may contain %s or %d or %c to substitute successive following arguments.
%s means print an argument as a string, %d means print as number in decimal,
%c means print a number as a single character.
The argument used by %s must be a string or a symbol;
the argument used by %d, %b, %o, %x or %c must be a number.

This is the custom-print replacement for the standard `format'.  It
calls the emacs `format' after first making strings for list,
vector, or symbol args.  The format specification for such args should
be `%s' in any case, so a string argument will also work.  The string
is generated with `custom-prin1-to-string', which quotes quotable
characters.
(defalias 'custom-format #[(fmt &rest args) "ÀÁ\nÃÄ\"#‡" [apply cust-print-original-format fmt mapcar #[(arg) "<„ Á!„ 9ƒ Â!‡‡" [arg vectorp custom-prin1-to-string] 2] args] 6 (#$ . 7281)])
#@495 Print a one-line message at the bottom of the screen.
The first argument is a control string.
It may contain %s or %d or %c to print successive following arguments.
%s means print an argument as a string, %d means print as number in decimal,
%c means print a number as a single character.
The argument used by %s must be a string or a symbol;
the argument used by %d or %c must be a number.

This is the custom-print replacement for the standard `message'.
See `custom-format' for the details.
(defalias 'custom-message #[(fmt &rest args) "ÀÁ\nÃÄ\"#‡" [apply cust-print-original-message fmt mapcar #[(arg) "<„ Á!„ 9ƒ Â!‡‡" [arg vectorp custom-prin1-to-string] 2] args] 6 (#$ . 8335)])
#@173 Signal an error, making error message by passing all args to `format'.

This is the custom-print replacement for the standard `error'.
See `custom-format' for the details.
(defalias 'custom-error #[(fmt &rest args) "ÀÁÂÃ\f#C\"‡" [signal error apply custom-format fmt args] 6 (#$ . 9036)])
(byte-code "À	BÂ	BÀ‡" [circle-table current-load-list cust-print-current-level] 2)
(defalias 'cust-print-original-printer #[(object) "À‡" [nil] 1])
(defalias 'cust-print-low-level-prin #[(object) "À‡" [nil] 1])
(defalias 'cust-print-prin #[(object) "À‡" [nil] 1])
(defalias 'cust-print-top-level #[(object stream emacs-printer) "† 	\n…\f Ã\f!† ÆÉÊ\"ˆÉÌ„: „: „: ƒ> „: ƒ> Ð‚? Ê\"ˆÉÑƒL Ò‚M Ì\"ˆÑ\f!ˆ\f+‡" [stream standard-output print-circle cust-print-preprocess-circle-tree object print-level -1 cust-print-current-level circle-table defalias cust-print-original-printer emacs-printer cust-print-low-level-prin custom-printers custom-print-vectors print-length cust-print-print-object cust-print-prin cust-print-print-circular] 3])
(defalias 'cust-print-print-object #[(object) "„ Á!‡Â!ƒ ‡:ƒ Ã!‡Ä!ƒ# Å!‡Á!‡" [object cust-print-original-printer cust-print-use-custom-printer cust-print-list vectorp cust-print-vector] 2])
(defalias 'cust-print-print-circular #[(object) "	ž‰ƒ8 \nA‰ÄVƒ ÅÆ!ˆÅ!ˆÅÆ!‚4 \n[¡ˆÅÆ!ˆÅ[!ˆÅÇ!ˆÈ!)‚; È!)‡" [object circle-table tag id 0 cust-print-original-princ "#" "=" cust-print-low-level-prin] 3])
(defalias 'cust-print-list #[(list) "ÁUƒ ÂÃ!ˆ‚� SÂÄ!ˆ† ÁÇ@!ˆA‰ƒ. ÂÉ!ˆSƒx ÁU„x <ƒ[ \nž„[ Ç@!ˆA‚g ÂË!ˆÇ!ˆÌSƒ3 ÂÉ!ˆ‚3 ƒˆ ÁUƒˆ ÂÍ!ˆÂÎ!ˆ*‡" [cust-print-current-level 0 cust-print-original-princ "#" "(" print-length length cust-print-prin list " " circle-table ". " nil "..." ")"] 3])
(defalias 'cust-print-vector #[(vector) "ÁUƒ ÂÃ!ˆ‚V SÁ\fGÂÇ!ˆƒ$ ^WƒE É\fH!ˆT‰\fGWƒ$ ÂÊ!ˆ‚$ \fGWƒQ ÂË!ˆÂÌ!ˆ+\f‡" [cust-print-current-level 0 cust-print-original-princ "#" vector len i "[" print-length cust-print-prin " " "..." "]"] 4])
(defalias 'cust-print-preprocess-circle-tree #[(object) "ÀCÂ!ˆ	‰AŸ¡ˆ	ÄAƒ> A@‰Aƒ3 ¡ˆSA‚: ‰AA¡ˆ)‚ *	A)‡" [nil circle-table cust-print-walk-circle-tree object -1 id rest tag] 3])
(defalias 'cust-print-walk-circle-tree #[(object) "À‰…� §† 9… ÄÅ!!=‰?…$ Až‰ƒ0 	Ç¡ˆ‚> \n„> CAB¡ˆ	ƒF À‚{ :ƒU È@!ˆA‚{ É!…{ GÊ\f\fW…z ÈH!ˆT‰‚d *‰„ À*‡" [nil tag read-equivalent-p object intern-soft symbol-name circle-table t cust-print-walk-circle-tree vectorp 0 j i] 5])
(provide (quote cust-print))
