Function: tramp-cache-print

tramp-cache-print is an autoloaded and byte-compiled function defined in tramp-cache.el.gz.

Signature

(tramp-cache-print TABLE)

Documentation

Print hash table TABLE.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-cache.el.gz
;;;###tramp-autoload
(defun tramp-cache-print (table)
  "Print hash table TABLE."
  ;; (declare (tramp-suppress-trace t))
  (when (hash-table-p table)
    (let (result)
      (maphash
       (lambda (key value)
	 ;; Remove text properties from KEY and VALUE.
	 (when (tramp-file-name-p key)
           (dolist
               (slot
                (mapcar #'car (cdr (cl-struct-slot-info 'tramp-file-name))))
             (when (stringp (cl-struct-slot-value 'tramp-file-name slot key))
               (setf (cl-struct-slot-value 'tramp-file-name slot key)
                     (substring-no-properties
                      (cl-struct-slot-value 'tramp-file-name slot key))))))
         (when (stringp key)
	   (setq key (substring-no-properties key)))
	 (when (stringp value)
	   (setq value (substring-no-properties value)))
	 ;; Dump.
	 (let ((tmp (format
		     "(%s %s)"
		     (if (processp key)
			 (prin1-to-string (prin1-to-string key))
		       (prin1-to-string key))
		     (if (hash-table-p value)
			 (tramp-cache-print value)
		       (if (bufferp value)
			   (prin1-to-string (prin1-to-string value))
			 (prin1-to-string value))))))
	   (setq result (if result (concat result " " tmp) tmp))))
       table)
      result)))