comparison lisp/gnus/gnus-art.el @ 111424:e8807c0f5742

Silence gnus-art compilation. * lisp/gnus/gnus-art.el (gnus-treat-article): Give dynamic local variables `condition', `type', `length' a prefix. (gnus-treat-predicate): Update for above name changes.
author Glenn Morris <rgm@gnu.org>
date Sat, 06 Nov 2010 12:35:19 -0700
parents 3d7a1caabf14
children eb9988805a37
comparison
equal deleted inserted replaced
111423:e0d9a22430d9 111424:e8807c0f5742
8255 ;;; Treatment top-level handling. 8255 ;;; Treatment top-level handling.
8256 ;;; 8256 ;;;
8257 8257
8258 (defvar gnus-inhibit-article-treatments nil) 8258 (defvar gnus-inhibit-article-treatments nil)
8259 8259
8260 (defun gnus-treat-article (condition &optional part-number total-parts type) 8260 (defun gnus-treat-article (gnus-treat-condition
8261 (let ((length (- (point-max) (point-min))) 8261 &optional part-number total-parts gnus-treat-type)
8262 (let ((gnus-treat-length (- (point-max) (point-min)))
8262 (alist gnus-treatment-function-alist) 8263 (alist gnus-treatment-function-alist)
8263 (article-goto-body-goes-to-point-min-p t) 8264 (article-goto-body-goes-to-point-min-p t)
8264 (treated-type 8265 (treated-type
8265 (or (not type) 8266 (or (not gnus-treat-type)
8266 (catch 'found 8267 (catch 'found
8267 (let ((list gnus-article-treat-types)) 8268 (let ((list gnus-article-treat-types))
8268 (while list 8269 (while list
8269 (when (string-match (pop list) type) 8270 (when (string-match (pop list) gnus-treat-type)
8270 (throw 'found t))))))) 8271 (throw 'found t)))))))
8271 (highlightp (gnus-visual-p 'article-highlight 'highlight)) 8272 (highlightp (gnus-visual-p 'article-highlight 'highlight))
8272 val elem) 8273 val elem)
8273 (gnus-run-hooks 'gnus-part-display-hook) 8274 (gnus-run-hooks 'gnus-part-display-hook)
8274 (dolist (elem alist) 8275 (dolist (elem alist)
8278 (set-buffer gnus-summary-buffer)) 8279 (set-buffer gnus-summary-buffer))
8279 (symbol-value (car elem)))) 8280 (symbol-value (car elem))))
8280 (when (and (or (consp val) 8281 (when (and (or (consp val)
8281 treated-type) 8282 treated-type)
8282 (or (not gnus-inhibit-article-treatments) 8283 (or (not gnus-inhibit-article-treatments)
8283 (eq condition 'head)) 8284 (eq gnus-treat-condition 'head))
8284 (gnus-treat-predicate val) 8285 (gnus-treat-predicate val)
8285 (or (not (get (car elem) 'highlight)) 8286 (or (not (get (car elem) 'highlight))
8286 highlightp)) 8287 highlightp))
8287 (save-restriction 8288 (save-restriction
8288 (funcall (cadr elem))))))) 8289 (funcall (cadr elem)))))))
8289 8290
8290 ;; Dynamic variables. 8291 ;; Dynamic variables.
8291 (defvar part-number) 8292 (defvar part-number)
8292 (defvar total-parts) 8293 (defvar total-parts)
8293 (defvar type) 8294 (defvar gnus-treat-type)
8294 (defvar condition) 8295 (defvar gnus-treat-condition)
8295 (defvar length) 8296 (defvar gnus-treat-length)
8296 8297
8297 (defun gnus-treat-predicate (val) 8298 (defun gnus-treat-predicate (val)
8298 (cond 8299 (cond
8299 ((null val) 8300 ((null val)
8300 nil) 8301 nil)
8301 (condition 8302 (gnus-treat-condition
8302 (eq condition val)) 8303 (eq gnus-treat-condition val))
8303 ((and (listp val) 8304 ((and (listp val)
8304 (stringp (car val))) 8305 (stringp (car val)))
8305 (apply 'gnus-or (mapcar `(lambda (s) 8306 (apply 'gnus-or (mapcar `(lambda (s)
8306 (string-match s ,(or gnus-newsgroup-name ""))) 8307 (string-match s ,(or gnus-newsgroup-name "")))
8307 val))) 8308 val)))
8313 ((eq pred 'and) 8314 ((eq pred 'and)
8314 (apply 'gnus-and (mapcar 'gnus-treat-predicate val))) 8315 (apply 'gnus-and (mapcar 'gnus-treat-predicate val)))
8315 ((eq pred 'not) 8316 ((eq pred 'not)
8316 (not (gnus-treat-predicate (car val)))) 8317 (not (gnus-treat-predicate (car val))))
8317 ((eq pred 'typep) 8318 ((eq pred 'typep)
8318 (equal (car val) type)) 8319 (equal (car val) gnus-treat-type))
8319 (t 8320 (t
8320 (error "%S is not a valid predicate" pred))))) 8321 (error "%S is not a valid predicate" pred)))))
8321 ((eq val t) 8322 ((eq val t)
8322 t) 8323 t)
8323 ((eq val 'head) 8324 ((eq val 'head)
8325 ((eq val 'first) 8326 ((eq val 'first)
8326 (eq part-number 1)) 8327 (eq part-number 1))
8327 ((eq val 'last) 8328 ((eq val 'last)
8328 (eq part-number total-parts)) 8329 (eq part-number total-parts))
8329 ((numberp val) 8330 ((numberp val)
8330 (< length val)) 8331 (< gnus-treat-length val))
8331 (t 8332 (t
8332 (error "%S is not a valid value" val)))) 8333 (error "%S is not a valid value" val))))
8333 8334
8334 (defun gnus-article-encrypt-body (protocol &optional n) 8335 (defun gnus-article-encrypt-body (protocol &optional n)
8335 "Encrypt the article body." 8336 "Encrypt the article body."