*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 03:19:23 +0000 (03:19 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 03:19:23 +0000 (03:19 +0000)
lisp/ChangeLog
lisp/gnus-ems.el
lisp/gnus-kill.el
lisp/gnus-uu.el
lisp/gnus.el
lisp/nnmail.el

index 67dac0e..29b49e2 100644 (file)
@@ -1,3 +1,20 @@
+Mon Aug 21 20:47:08 1995  Lars Magne Ingebrigtsen  <lingebri@sunsci4.cern.ch>
+
+       * gnus.el (gnus-group-list-groups): Didn't use default-list-level.
+
+       * nntp.el (nntp-retrieve-groups): Did not delete error messages. 
+
+       * gnus.el (gnus-offer-save-summaries): Use `map-y-or-n-p'. 
+       (gnus-update-group-mark-positions): Bind "dummy.group" in the
+       active hashtb.
+       (gnus-gnus-to-newsrc-format): Avoid `set-visited-file-name'.
+       (gnus-save-newsrc-file): Ditto.
+       (gnus-window-top-edge): Renamed from `gnus-window-left-corner'. 
+       (gnus-remove-some-windows): Don't rely on `frame-height'.
+
+       * nnmail.el (nnmail-move-inbox): Make sure the directory we move
+       to exists. 
+
 Sun Aug 20 16:04:20 1995  Lars Magne Ingebrigtsen  <lingebri@sunsci4.cern.ch>
 
        * gnus.el: 0.99.15 is released.
index f8820cc..cfe4a5e 100644 (file)
@@ -484,7 +484,7 @@ call it with the value of the `gnus-data' text property."
                        (and data (list 'gnus-data data))
                        (list 'highlight t))))
 
-(defun gnus-window-left-corner-xemacs (&optional window)
+(defun gnus-window-top-edge-xemacs (&optional window)
   (nth 1 (window-pixel-edges window)))
 
 (defun gnus-ems-redefine ()
@@ -505,7 +505,7 @@ call it with the value of the `gnus-data' text property."
     (fset 'gnus-article-push-button 'gnus-article-push-button-xemacs)
     (fset 'gnus-rebuild-thread 'gnus-rebuild-thread-xemacs)
     (fset 'gnus-article-add-button 'gnus-article-add-button-xemacs)
-    (fset 'gnus-window-left-corner 'gnus-window-left-corner-xemacs)
+    (fset 'gnus-window-top-edge 'gnus-window-top-edge-xemacs)
 
     (if (not gnus-visual)
        ()
index a504f9e..ec5eb74 100644 (file)
@@ -371,29 +371,30 @@ Returns the number of articles marked as read."
          (setq files (cdr files)))))
     (if (not gnus-newsgroup-kill-headers)
        ()
-      (save-excursion
-       (while kill-files
-         (if (not (file-exists-p (car kill-files)))
-             ()
-           (message "Processing kill file %s..." (car kill-files))
-           (find-file (car kill-files))
-           (gnus-add-current-to-buffer-list)
-           (goto-char (point-min))
-
-           (if (consp (condition-case nil (read (current-buffer)) 
-                        (error nil)))
-               (gnus-kill-parse-gnus-kill-file)
-             (gnus-kill-parse-rn-kill-file))
+      (save-window-excursion
+       (save-excursion
+         (while kill-files
+           (if (not (file-exists-p (car kill-files)))
+               ()
+             (message "Processing kill file %s..." (car kill-files))
+             (find-file (car kill-files))
+             (gnus-add-current-to-buffer-list)
+             (goto-char (point-min))
+
+             (if (consp (condition-case nil (read (current-buffer)) 
+                          (error nil)))
+                 (gnus-kill-parse-gnus-kill-file)
+               (gnus-kill-parse-rn-kill-file))
            
-           (message "Processing kill file %s...done" (car kill-files)))
-         (setq kill-files (cdr kill-files)))))
+             (message "Processing kill file %s...done" (car kill-files)))
+           (setq kill-files (cdr kill-files)))))
 
-    (if beg
-       (let ((nunreads (- unreads (length gnus-newsgroup-unreads))))
-         (or (eq nunreads 0)
-             (message "Marked %d articles as read" nunreads))
-         nunreads)
-      0)))
+      (if beg
+         (let ((nunreads (- unreads (length gnus-newsgroup-unreads))))
+           (or (eq nunreads 0)
+               (message "Marked %d articles as read" nunreads))
+           nunreads)
+       0))))
 
 ;; Parse a Gnus killfile.
 (defun gnus-score-insert-help (string alist idx)
@@ -478,54 +479,56 @@ If optional 2nd argument ALL is non-nil, articles marked are also applied to.
 If FIELD is an empty string (or nil), entire article body is searched for.
 COMMAND must be a lisp expression or a string representing a key sequence."
   ;; We don't want to change current point nor window configuration.
-  (save-excursion
-    (save-window-excursion
-      ;; Selected window must be summary buffer to execute keyboard
-      ;; macros correctly. See command_loop_1.
-      (switch-to-buffer gnus-summary-buffer 'norecord)
-      (goto-char (point-min))          ;From the beginning.
-      (let ((kill-list regexp)
-           (date (current-time-string))
-           (command (or exe-command '(gnus-summary-mark-as-read 
-                                      nil gnus-kill-file-mark)))
-           kill kdate prev)
-       (if (listp kill-list)
-           ;; It is a list.
-           (if (not (consp (cdr kill-list)))
-               ;; It's on the form (regexp . date).
-               (if (zerop (gnus-execute field (car kill-list) 
-                                        command nil (not all)))
-                   (if (> (gnus-days-between date (cdr kill-list))
-                          gnus-kill-expiry-days)
-                       (setq regexp nil))
-                 (setcdr kill-list date))
-             (while (setq kill (car kill-list))
-               (if (consp kill)
-                   ;; It's a temporary kill.
-                   (progn
-                     (setq kdate (cdr kill))
-                     (if (zerop (gnus-execute 
-                                 field (car kill) command nil (not all)))
-                         (if (> (gnus-days-between date kdate)
-                                gnus-kill-expiry-days)
-                             ;; Time limit has been exceeded, so we
-                             ;; remove the match.
-                             (if prev
-                                 (setcdr prev (cdr kill-list))
-                               (setq regexp (cdr regexp))))
-                       ;; Successful kill. Set the date to today.
-                       (setcdr kill date)))
-                 ;; It's a permanent kill.
-                 (gnus-execute field kill command nil (not all)))
-               (setq prev kill-list)
-               (setq kill-list (cdr kill-list))))
-         (gnus-execute field kill-list command nil (not all))))))
-  (if (and (eq major-mode 'gnus-kill-file-mode) regexp (not silent))
-      (gnus-pp-gnus-kill
-       (nconc (list 'gnus-kill field 
-                   (if (consp regexp) (list 'quote regexp) regexp))
-             (if (or exe-command all) (list (list 'quote exe-command)))
-             (if all (list t) nil)))))
+  (let ((old-buffer (current-buffer)))
+    (save-excursion
+      (save-window-excursion
+       ;; Selected window must be summary buffer to execute keyboard
+       ;; macros correctly. See command_loop_1.
+       (switch-to-buffer gnus-summary-buffer 'norecord)
+       (goto-char (point-min))         ;From the beginning.
+       (let ((kill-list regexp)
+             (date (current-time-string))
+             (command (or exe-command '(gnus-summary-mark-as-read 
+                                        nil gnus-kill-file-mark)))
+             kill kdate prev)
+         (if (listp kill-list)
+             ;; It is a list.
+             (if (not (consp (cdr kill-list)))
+                 ;; It's on the form (regexp . date).
+                 (if (zerop (gnus-execute field (car kill-list) 
+                                          command nil (not all)))
+                     (if (> (gnus-days-between date (cdr kill-list))
+                            gnus-kill-expiry-days)
+                         (setq regexp nil))
+                   (setcdr kill-list date))
+               (while (setq kill (car kill-list))
+                 (if (consp kill)
+                     ;; It's a temporary kill.
+                     (progn
+                       (setq kdate (cdr kill))
+                       (if (zerop (gnus-execute 
+                                   field (car kill) command nil (not all)))
+                           (if (> (gnus-days-between date kdate)
+                                  gnus-kill-expiry-days)
+                               ;; Time limit has been exceeded, so we
+                               ;; remove the match.
+                               (if prev
+                                   (setcdr prev (cdr kill-list))
+                                 (setq regexp (cdr regexp))))
+                         ;; Successful kill. Set the date to today.
+                         (setcdr kill date)))
+                   ;; It's a permanent kill.
+                   (gnus-execute field kill command nil (not all)))
+                 (setq prev kill-list)
+                 (setq kill-list (cdr kill-list))))
+           (gnus-execute field kill-list command nil (not all))))))
+    (switch-to-buffer old-buffer)
+    (if (and (eq major-mode 'gnus-kill-file-mode) regexp (not silent))
+       (gnus-pp-gnus-kill
+        (nconc (list 'gnus-kill field 
+                     (if (consp regexp) (list 'quote regexp) regexp))
+               (if (or exe-command all) (list (list 'quote exe-command)))
+               (if all (list t) nil))))))
 
 (defun gnus-pp-gnus-kill (object)
   (if (or (not (consp (nth 2 object)))
index 6a5b76c..3604467 100644 (file)
@@ -271,7 +271,7 @@ The headers will be included in the sequence they are matched.")
 (defvar gnus-uu-mark-map nil)
 
 (define-prefix-command 'gnus-uu-mark-map)
-(define-key gnus-summary-mark-map "p" 'gnus-uu-mark-map)
+(define-key gnus-summary-mark-map "P" 'gnus-uu-mark-map)
 (define-key gnus-uu-mark-map "p" 'gnus-summary-mark-as-processable)
 (define-key gnus-uu-mark-map "u" 'gnus-summary-unmark-as-processable)
 (define-key gnus-uu-mark-map "U" 'gnus-summary-unmark-all-processable)
index 8f718be..4388ea6 100644 (file)
@@ -520,7 +520,7 @@ variable to nil.")
 (defvar gnus-interactive-exit t
   "*If non-nil, require your confirmation when exiting Gnus.")
 
-(defvar gnus-kill-killed nil
+(defvar gnus-kill-killed t
   "*If non-nil, Gnus will apply kill files to already killed articles.
 If it is nil, Gnus will never apply kill files to articles that have
 already been through the scoring process, which might very well save lots
@@ -1316,7 +1316,7 @@ variable (string, integer, character, etc).")
   "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
   "The mail address of the Gnus maintainers.")
 
-(defconst gnus-version "(ding) Gnus v0.99.15"
+(defconst gnus-version "(ding) Gnus v0.99.16"
   "Version number for this version of Gnus.")
 
 (defvar gnus-info-nodes
@@ -1910,6 +1910,7 @@ Thank you for your help in stamping out bugs.
   (save-excursion
     (let ((gnus-process-mark 128)
          (gnus-group-marked '("dummy.group")))
+      (gnus-sethash "dummy.group" '(0 . 0) gnus-active-hashtb)
       (gnus-set-work-buffer)
       (gnus-group-insert-group-line nil "dummy.group" 0 nil 0 nil)
       (goto-char (point-min))
@@ -2568,13 +2569,12 @@ If optional argument RE-ONLY is non-nil, strip `Re:' only."
        (setq hor (cdr hor))))
     (and (not invisible) jump-buffer)))
 
-(defun gnus-window-left-corner (&optional window)
+(defun gnus-window-top-edge (&optional window)
   (nth 1 (window-edges window)))
 
 (defun gnus-remove-some-windows ()
   (let ((buffers gnus-window-to-buffer)
-       (lowest (frame-height))
-       buf bufs lowest-buf)
+       buf bufs lowest-buf lowest)
     (save-excursion
       ;; Remove windows on all known Gnus buffers.
       (while buffers
@@ -2586,9 +2586,10 @@ If optional argument RE-ONLY is non-nil, strip `Re:' only."
             (progn
               (setq bufs (cons buf bufs))
               (pop-to-buffer buf)
-              (if (< (gnus-window-left-corner) lowest)
+              (if (or (not lowest)
+                      (< (gnus-window-top-edge) lowest))
                   (progn
-                    (setq lowest (gnus-window-left-corner))
+                    (setq lowest (gnus-window-top-edge))
                     (setq lowest-buf buf)))))
        (setq buffers (cdr buffers)))
       ;; Remove windows on *all* summary buffers.
@@ -2600,10 +2601,11 @@ If optional argument RE-ONLY is non-nil, strip `Re:' only."
             (progn
               (setq bufs (cons buf bufs))
               (pop-to-buffer buf)
-              (if (< (gnus-window-left-corner) lowest)
+              (if (or (not lowest)
+                      (< (gnus-window-top-edge) lowest))
                   (progn
                     (setq lowest-buf buf)
-                    (setq lowest (gnus-window-left-corner))))))))))
+                    (setq lowest (gnus-window-top-edge))))))))))
       (and lowest-buf 
           (progn
             (pop-to-buffer lowest-buf)
@@ -2770,24 +2772,6 @@ If nothing is specified, use the variable gnus-overload-functions."
       (setq name (concat leaf "<" (int-to-string (setq num (1+ num))) ">")))
     name))
 
-(defun gnus-find-file-noselect (file &optional force)
-  "Does vaguely the same as find-file-noselect. No hooks are run."
-  (let (buf insert)
-    (if (setq buf (get-file-buffer file))
-       (setq insert force)
-      (setq buf (create-file-buffer file))
-      (setq insert t))
-    (if (not insert)
-       buf
-      (save-excursion
-       (set-buffer buf)
-       (erase-buffer)
-       (and (file-readable-p file)
-            (insert-file-contents file))
-       (set-visited-file-name file)
-       (set-buffer-modified-p nil)
-       (current-buffer)))))
-
 ;;; List and range functions
 
 (defun gnus-last-element (list)
@@ -3363,7 +3347,8 @@ listed."
                         (prefix-numeric-value current-prefix-arg)
                       (or
                        (gnus-group-default-level nil t)
-                       gnus-level-subscribed))))
+                       gnus-group-default-list-level
+                       level-subscribed))))
   (or level
       (setq level (car gnus-group-list-mode)
            unread (cdr gnus-group-list-mode)))
@@ -4925,30 +4910,21 @@ The hook `gnus-exit-gnus-hook' is called before actually exiting."
        (gnus-clear-system))))
 
 (defun gnus-offer-save-summaries ()
-  (let ((buffers (buffer-list))
-       answer)
-    (save-excursion
-      (while (and buffers (not (eq answer ?q)))
-       (and 
-        ;; We look for buffers with "Summary" in the name.
-        (string-match "Summary" (or (buffer-name (car buffers)) ""))
-        (progn
-          (set-buffer (car buffers))
-          ;; We check that this is, indeed, a summary buffer.
-          (eq major-mode 'gnus-summary-mode)) 
-        ;; We ask the user whether she wants to save the info.
-        (or (eq answer ?!)
-            (progn
-              (setq answer nil)
-              (while (not (memq answer '(?y ?n ?! ?q)))
-                (message (format "%sUpdate summary buffer %s? (y, n, !, q)"
-                                 (if answer "Illegal char. " "")
-                                 (buffer-name)))
-                (setq answer (read-char)))
-              (or (eq answer ?y) (eq answer ?!))))
-        ;; We do it by simply exiting.
-        (gnus-summary-exit))
-       (setq buffers (cdr buffers))))))
+  (save-excursion
+    (let ((buflist (buffer-list)) buffers bufname)
+      (while buflist
+       (and (setq bufname (buffer-name (car buflist)))
+            (string-match "Summary" bufname)
+            (setq buffers (cons bufname buffers)))
+       (setq buflist (cdr buflist)))
+      (map-y-or-n-p "Update summary buffer %s? "
+                   (lambda (buf)
+                     (set-buffer buf)
+                     (and
+                      ;; We check that this is, indeed, a summary buffer.
+                      (eq major-mode 'gnus-summary-mode)
+                      (gnus-summary-exit)))
+                   buffers))))
 
 (defun gnus-group-describe-briefly ()
   "Give a one line description of the group mode commands."
@@ -8589,9 +8565,6 @@ article. If BACKWARD (the prefix) is non-nil, search backward instead."
   "Force re-fetching of the current article."
   (interactive)
   (gnus-set-global-variables)
-  (or gnus-current-article
-      (error "There is no current article"))
-  (gnus-summary-goto-subject gnus-current-article)
   (gnus-summary-select-article nil 'force)
   (gnus-configure-windows 'article)
   (gnus-summary-position-cursor))
@@ -13357,7 +13330,7 @@ If FORCE is non-nil, the .newsrc file is read."
                                 gnus-current-startup-file)))
             ;; Quickly loadable .newsrc.
             (set-buffer (get-buffer-create " *Gnus-newsrc*"))
-            (set-visited-file-name (concat gnus-current-startup-file ".eld"))
+            (setq buffer-file-name (concat gnus-current-startup-file ".eld"))
             (gnus-add-current-to-buffer-list)
             (buffer-disable-undo (current-buffer))
             (erase-buffer)
@@ -13399,7 +13372,7 @@ If FORCE is non-nil, the .newsrc file is read."
        info ranges range)
     (save-excursion
       (set-buffer (create-file-buffer gnus-current-startup-file))
-      (set-visited-file-name gnus-current-startup-file)
+      (setq buffer-file-name gnus-current-startup-file)
       (buffer-disable-undo (current-buffer))
       (erase-buffer)
       ;; Write options.
index d18b282..e9f2cbf 100644 (file)
@@ -350,6 +350,10 @@ perfomed.")
                             (file-name-nondirectory tofile))))
     ;; Make the filename unique.
     (setq tofile (nnmail-make-complex-temp-name (expand-file-name tofile)))
+    ;; We create the directory the tofile is to reside in if it
+    ;; doesn't exist.
+    (or (file-exists-p (file-name-directory tofile))
+       (make-directory tofile 'parents))
     ;; If getting from mail spool directory,
     ;; use movemail to move rather than just renaming,
     ;; so as to interlock with the mailer.