Function: reporter-dump-variable
reporter-dump-variable is a byte-compiled function defined in
reporter.el.gz.
Signature
(reporter-dump-variable VARSYM MAILBUF)
Documentation
Pretty-print the value of the variable in symbol VARSYM.
MAILBUF is the mail buffer being composed.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/reporter.el.gz
(defun reporter-dump-variable (varsym mailbuf)
"Pretty-print the value of the variable in symbol VARSYM.
MAILBUF is the mail buffer being composed."
(reporter-update-status)
(condition-case nil
(let ((val (with-current-buffer reporter-eval-buffer
(symbol-value varsym)))
(sym (symbol-name varsym))
(print-escape-newlines t)
(maxwidth (1- (window-width)))
(here (point)))
(insert " " sym " "
(cond
((memq val '(t nil)) "")
((listp val) "'")
((symbolp val) "'")
(t ""))
(prin1-to-string val))
(lisp-indent-line)
;; clean up lists, but only if the line as printed was long
;; enough to wrap
(if (and val ;nil is a list, but short
(listp val)
(<= maxwidth (current-column)))
(save-excursion
(let ((compact-p (not (memq varsym reporter-dont-compact-list)))
(lisp-indent-function #'reporter-lisp-indent))
(goto-char here)
(reporter-beautify-list maxwidth compact-p))))
(insert "\n"))
(void-variable
(with-current-buffer mailbuf
(save-excursion
(mail-position-on-field "X-Reporter-Void-Vars-Found")
(end-of-line)
(insert (symbol-name varsym) " "))))
(error
(error ""))))