Function: newsticker--do-print-extra-element

newsticker--do-print-extra-element is a byte-compiled function defined in newst-reader.el.gz.

Signature

(newsticker--do-print-extra-element EXTRA-ELEMENT WIDTH KEYMAP HTMLISH)

Documentation

Actually print an EXTRA-ELEMENT using the given WIDTH.

KEYMAP is applied. If HTMLISH is non-nil then HTML-markup is used for formatting.

Source Code

;; Defined in /usr/src/emacs/lisp/net/newst-reader.el.gz
(defun newsticker--do-print-extra-element (extra-element width keymap htmlish)
  "Actually print an EXTRA-ELEMENT using the given WIDTH.
KEYMAP is applied.  If HTMLISH is non-nil then HTML-markup is used
for formatting."
  (let ((name (symbol-name (car extra-element))))
    (if htmlish
        (insert (format "<li>%s: " name))
      (insert (format "%s: " name))
      (insert (make-string (- width (length name)) ? ))))
  (let (;;(attributes (cadr extra-element)) ;FIXME!!!!
        (contents (cddr extra-element)))
    (cond ((listp contents)
           (mapc (lambda (i)
                   (if (and (stringp i)
                            (string-match "^http://.*" i))
                       (let ((pos (point)))
                         (insert i " ") ; avoid self-reference from the
                                        ; nt-link thing
                         (add-text-properties
                          pos (point)
                          (list 'mouse-face 'highlight
                                'nt-link i
                                'help-echo
                                (format "mouse-2: visit (%s)" i)
                                'keymap keymap)))
                         (insert (format "%s" i))))
                 contents))
          (t
           (insert (format "%s" contents))))
    (if htmlish
        (insert "</li>")
      (insert "\n"))))