;;; Code:
-(require 'gnus-load)
+(require 'gnus)
(require 'xpm)
(require 'annotations)
(defun gnus-picons-remove (plist)
(let ((listitem (car plist)))
(while (setq listitem (car plist))
- (if (annotationp listitem)
- (delete-annotation listitem))
+ (when (annotationp listitem)
+ (delete-annotation listitem))
(setq plist (cdr plist)))))
(defun gnus-picons-remove-all ()
(setq gnus-article-annotations nil
gnus-group-annotations nil
gnus-x-face-annotations nil)
- (if (bufferp gnus-picons-buffer)
- (kill-buffer gnus-picons-buffer)))
+ (when (bufferp gnus-picons-buffer)
+ (kill-buffer gnus-picons-buffer)))
(defun gnus-get-buffer-name (variable)
"Returns the buffer name associated with the contents of a variable."
(sit-for 0))
(let ((first t)
from at-idx databases)
- (when (and (featurep 'xpm)
+ (when (and (featurep 'xpm)
(or (not (fboundp 'device-type)) (equal (device-type) 'x))
(setq from (mail-fetch-field "from"))
(setq from (downcase
;; let display catch up so far
(when gnus-picons-refresh-before-display
(sit-for 0))
- (when (and (featurep 'xpm)
+ (when (and (featurep 'xpm)
(or (not (fboundp 'device-type)) (equal (device-type) 'x)))
(save-excursion
(set-buffer (get-buffer-create
(goto-char (point-min))
(if (and (eq gnus-picons-display-where 'article)
gnus-picons-display-article-move-p)
- (if (search-forward "\n\n" nil t)
- (forward-line -1))
+ (when (search-forward "\n\n" nil t)
+ (forward-line -1))
(unless (eolp)
(push (make-annotation "\n" (point) 'text)
gnus-group-annotations)))
(cond
((listp gnus-group-annotations)
- (mapc #'(lambda (ext) (if (extent-live-p ext) (delete-annotation ext)))
+ (mapc #'(lambda (ext) (when (extent-live-p ext)
+ (delete-annotation ext)))
gnus-group-annotations)
(setq gnus-group-annotations nil))
((annotationp gnus-group-annotations)
database "/"))
(domainp (and gnus-picons-display-as-address dots))
picons found bar-ann cur first)
- (if (string-match "/MISC" database)
- (setq addrs '("")))
+ (when (string-match "/MISC" database)
+ (setq addrs '("")))
(while (and addrs
(file-accessible-directory-p path))
(setq cur (pop addrs)
(setq picons (nconc (when (and domainp first)
(list (make-annotation
"." (point) 'text
- nil nil nil t) picons))
+ nil nil nil t)
+ picons))
(gnus-picons-try-to-find-face
found nil (if domainp cur filename))
picons)))
(when domainp
(setq picons
(nconc (list (make-annotation (if first (concat cur ".") cur)
- (point) 'text nil nil nil t))
+ (point) 'text nil nil nil t))
picons))))
(setq first t))
(when (and addrs domainp)