Function: gnus-button-push

gnus-button-push is a byte-compiled function defined in gnus-art.el.gz.

Signature

(gnus-button-push MARKER-AND-ENTRY)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun gnus-button-push (marker-and-entry)
  ;; Push button starting at MARKER.
  (save-excursion
    (let* ((marker (car marker-and-entry))
           (entry (cadr marker-and-entry))
           (regexp (car entry)))
      (goto-char marker)
      ;; This is obviously true, or something bad is happening :)
      ;; But we need it to have the match-data
      (when (looking-at (or (if (symbolp regexp)
                                (symbol-value regexp)
                              regexp)))
        (let ((fun (nth 3 entry))
              (args (or (and (eq (car entry) 'gnus-button-url-regexp)
                             (get-char-property marker 'gnus-button-url))
                        (mapcar (lambda (group)
                                  (let ((string (match-string group)))
                                    (set-text-properties
                                     0 (length string) nil string)
                                    string))
                                (nthcdr 4 entry)))))

          (cond
           ((fboundp fun)
            (apply fun args))
           ((and (boundp fun)
                 (fboundp (symbol-value fun)))
            (apply (symbol-value fun) args))
           (t
            (gnus-message 1 "You must define `%S' to use this button"
                          (cons fun args)))))))))