2004-05-23 Paul Stodghill <stodghil@cs.cornell.edu>
[gnus] / lisp / gnus-salt.el
index df58313..b0329d1 100644 (file)
@@ -128,7 +128,7 @@ It accepts the same format specs that `gnus-summary-line-format' does."
       ;; Set up the menu.
       (when (gnus-visual-p 'pick-menu 'menu)
        (gnus-pick-make-menu-bar))
-      (gnus-add-minor-mode 'gnus-pick-mode " Pick" gnus-pick-mode-map
+      (add-minor-mode 'gnus-pick-mode " Pick" gnus-pick-mode-map
                           nil 'gnus-pick-mode)
       (gnus-run-hooks 'gnus-pick-mode-hook))))
 
@@ -361,14 +361,14 @@ This must be bound to a button-down mouse event."
       ;; Set up the menu.
       (when (gnus-visual-p 'binary-menu 'menu)
        (gnus-binary-make-menu-bar))
-      (gnus-add-minor-mode 'gnus-binary-mode " Binary"
+      (add-minor-mode 'gnus-binary-mode " Binary"
                           gnus-binary-mode-map nil 'gnus-binary-mode)
       (gnus-run-hooks 'gnus-binary-mode-hook))))
 
 (defun gnus-binary-display-article (article &optional all-header)
   "Run ARTICLE through the binary decode functions."
   (when (gnus-summary-goto-subject article)
-    (let ((gnus-view-pseudos 'automatic))
+    (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
       (gnus-uu-decode-uu))))
 
 (defun gnus-binary-show-article (&optional arg)
@@ -670,6 +670,8 @@ Two predefined functions are available:
             (default gnus-summary-default-score)
             (default-high gnus-summary-default-high-score)
             (default-low gnus-summary-default-low-score)
+             (uncached (memq article gnus-newsgroup-undownloaded))
+             (downloaded (not uncached))
             (mark (or (gnus-summary-article-mark article) gnus-unread-mark)))
        ;; Eval the cars of the lists until we find a match.
        (while (and list
@@ -723,7 +725,7 @@ Two predefined functions are available:
        (unless (zerop level)
          (gnus-tree-indent level)
          (insert (cadr gnus-tree-parent-child-edges))
-         (setq col (- (setq beg (point)) (gnus-point-at-bol) 1))
+         (setq col (- (setq beg (point)) (point-at-bol) 1))
          ;; Draw "|" lines upwards.
          (while (progn
                   (forward-line -1)
@@ -747,7 +749,7 @@ Two predefined functions are available:
 
 (defsubst gnus-tree-indent-vertical ()
   (let ((len (- (* (1+ gnus-tree-node-length) gnus-tmp-indent)
-               (- (point) (gnus-point-at-bol)))))
+               (- (point) (point-at-bol)))))
     (when (> len 0)
       (insert (make-string len ? )))))
 
@@ -839,6 +841,13 @@ Two predefined functions are available:
 (defun gnus-tree-close (group)
   (gnus-kill-buffer gnus-tree-buffer))
 
+(defun gnus-tree-perhaps-minimize ()
+  (when (and gnus-tree-minimize-window
+            (get-buffer gnus-tree-buffer))
+    (save-excursion
+      (set-buffer gnus-tree-buffer)
+      (gnus-tree-minimize))))
+
 (defun gnus-highlight-selected-tree (article)
   "Highlight the selected article in the tree."
   (let ((buf (current-buffer))
@@ -1018,11 +1027,11 @@ The following commands are available:
            (setq button (car buttons)
                  buttons (cdr buttons))
            (if (stringp button)
-               (gnus-set-text-properties
+               (set-text-properties
                 (point)
                 (prog2 (insert button) (point) (insert " "))
                 (list 'face gnus-carpal-header-face))
-             (gnus-set-text-properties
+             (set-text-properties
               (point)
               (prog2 (insert (car button)) (point) (insert " "))
               (list 'gnus-callback (cdr button)
@@ -1053,4 +1062,5 @@ The following commands are available:
 
 (provide 'gnus-salt)
 
+;;; arch-tag: 35449164-77b3-4398-bcbd-a2e3e998f810
 ;;; gnus-salt.el ends here