Function: gnus-uu-choose-action

gnus-uu-choose-action is a byte-compiled function defined in gnus-uu.el.gz.

Signature

(gnus-uu-choose-action FILE-NAME FILE-ACTION-LIST &optional NO-IGNORE)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-uu.el.gz
;; `gnus-uu-choose-action' chooses what action to perform given the name
;; and FILE-ACTION-LIST.  Return either nil if no action is
;; found, or the name of the command to run if such a rule is found.
(defun gnus-uu-choose-action (file-name file-action-list &optional no-ignore)
  (let ((action-list (copy-sequence file-action-list))
	(case-fold-search t)
	rule action)
    (and
     (unless no-ignore
       (and (not
	     (and gnus-uu-ignore-files-by-name
		  (string-match gnus-uu-ignore-files-by-name file-name)))
	    (not
	     (and gnus-uu-ignore-files-by-type
		  (string-match gnus-uu-ignore-files-by-type
				(or (gnus-uu-choose-action
				     file-name gnus-uu-ext-to-mime-list t)
				    ""))))))
     (while (not (or (eq action-list ()) action))
       (setq rule (car action-list))
       (setq action-list (cdr action-list))
       (when (string-match (car rule) file-name)
	 (setq action (cadr rule)))))
    action))