This commit was generated by cvs2svn to compensate for changes in r1210,
[elisp/gnus.git-] / lisp / gnus-picon.el
index 02a5ad0..a3b5418 100644 (file)
@@ -184,7 +184,11 @@ arguments necessary for the job.")
 
 (defun gnus-get-buffer-name (variable)
   "Returns the buffer name associated with the contents of a variable."
-  (buffer-name (get-buffer (gnus-window-to-buffer-helper variable))))
+  (let ((buf (gnus-get-buffer-create (gnus-window-to-buffer-helper
+                                (cdr 
+                                 (assq variable gnus-window-to-buffer))))))
+    (and buf
+        (buffer-name buf))))
 
 (defun gnus-picons-buffer-name ()
   (cond ((or (stringp gnus-picons-display-where)
@@ -207,10 +211,9 @@ arguments necessary for the job.")
     (save-excursion
       (if (get-buffer name)
          (set-buffer name)
-       (set-buffer (get-buffer-create name))
+       (set-buffer (gnus-get-buffer-create name))
        (buffer-disable-undo)
        (setq buffer-read-only t)
-       (gnus-add-current-to-buffer-list)
        (add-hook 'gnus-summary-prepare-exit-hook 'gnus-picons-kill-buffer))
       (current-buffer))))
 
@@ -463,7 +466,7 @@ none, and whose CDR is the corresponding element of DOMAINS."
                                            'text nil nil nil rightp))))))
 
 (defun gnus-picons-action-toggle (data)
-  "Toggle annotation"
+  "Toggle annotation."
   (interactive "e")
   (let* ((annot (car data))
         (glyph (annotation-glyph annot)))
@@ -471,7 +474,7 @@ none, and whose CDR is the corresponding element of DOMAINS."
     (set-annotation-data annot (cons annot glyph))))
 
 (defun gnus-picons-clear-cache ()
-  "Clear the picons cache"
+  "Clear the picons cache."
   (interactive)
   (setq gnus-picons-glyph-alist nil
        gnus-picons-url-alist nil))
@@ -727,7 +730,7 @@ none, and whose CDR is the corresponding element of DOMAINS."
                     (error "Unknown picon job tag %s" tag)))))))
 
 (defun gnus-picons-next-job ()
-  "Start processing the job queue if it is not in progress"
+  "Start processing the job queue if it is not in progress."
   (unless gnus-picons-job-already-running
     (gnus-picons-next-job-internal)))