Function: hattr:report
hattr:report is a byte-compiled function defined in hbut.el.
Signature
(hattr:report ATTRIB-LIST)
Documentation
Pretty print to standard-output attribute-value pairs from ATTRIB-LIST.
Ignore nil valued attributes. Return t unless no attributes are printed.
Aliases
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbut.el
(defun hattr:report (attrib-list)
"Pretty print to `standard-output' attribute-value pairs from ATTRIB-LIST.
Ignore nil valued attributes. Return t unless no attributes are printed."
(let ((has-attr) attr val len)
(unless (or (null attrib-list) (not (listp attrib-list))
;; odd number of elements?
(= (% (length attrib-list) 2) 1))
(while (setq attr (car attrib-list))
(setq val (car (cdr attrib-list))
attrib-list (cdr (cdr attrib-list)))
(when val
(setq has-attr t
attr (symbol-name attr)
len (number-to-string (max (- 16 (length attr)) 1)))
(princ (format (concat " %s:%" len "s%S\n") attr " "
(let (str)
(cond ((string-match "time" attr)
(htz:date-unix val (and (>= (aref val 0) ?0)
(<= (aref val 0) ?9)
"GMT") htz:local))
((and (setq str (if (stringp val)
val
(prin1-to-string val)))
(string-match "\\`actypes::" str))
(intern (substring str (match-end 0))))
(t val)))))))
has-attr)))