next group in a more normal fasion.
* mml.el (mml-boundary-function): New variable.
(mml-compute-boundary): Use it.
* nnmh.el (nnmh-active-number): Skip past files that have buffers
that exist for them.
* gnus-async.el (gnus-async-prefetch-next): Cancel timers.
(gnus-async-timer): New variable.
+1999-12-01 14:28:49 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-sum.el (gnus-summary-catchup-and-goto-next-group): Select
+ next group in a more normal fasion.
+
+ * mml.el (mml-boundary-function): New variable.
+ (mml-compute-boundary): Use it.
+
+ * nnmh.el (nnmh-active-number): Skip past files that have buffers
+ that exist for them.
+
+ * gnus-async.el (gnus-async-prefetch-next): Cancel timers.
+ (gnus-async-timer): New variable.
+
1999-11-30 02:07:18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nnultimate.el (nnultimate-request-list): Be more lenient with
(defvar gnus-async-hashtb nil)
(defvar gnus-async-current-prefetch-group nil)
(defvar gnus-async-current-prefetch-article nil)
+(defvar gnus-async-timer nil)
(defvar gnus-async-prefetch-headers-buffer " *Async Prefetch Headers*")
(defvar gnus-async-header-prefetched nil)
;; do this, which leads to slightly slower article
;; buffer display.
(gnus-async-prefetch-article group next summary)
- (run-with-idle-timer
- 0.1 nil 'gnus-async-prefetch-article group next summary)))))))
+ (when gnus-async-timer
+ (ignore-errors
+ (cancel-timer 'gnus-async-timer)))
+ (setq gnus-async-timer
+ (run-with-idle-timer
+ 0.1 nil 'gnus-async-prefetch-article
+ group next summary))))))))
(defun gnus-async-prefetch-article (group article summary &optional next)
"Possibly prefetch several articles starting with ARTICLE."
(interactive "P")
(gnus-summary-catchup-and-exit t quietly))
-;; Suggested by "Arne Eofsson" <arne@hodgkin.mbi.ucla.edu>.
(defun gnus-summary-catchup-and-goto-next-group (&optional all)
"Mark all articles in this group as read and select the next group.
If given a prefix, mark all articles, unread as well as ticked, as
(interactive "P")
(save-excursion
(gnus-summary-catchup all))
- (gnus-summary-next-group t nil nil))
+ (gnus-summary-next-group))
;; Thread-based commands.
(modify-syntax-entry ?\' " " table)
table))
+(defvar mml-boundary-function 'mml-make-boundary
+ "A function called to suggest a boundary.
+The function may be called several times, and should try to make a new
+suggestion each time. The function is called with one parameter,
+which is a number that says how many times the function has been
+called for this message.")
+
(defun mml-parse ()
"Parse the current buffer as an MML document."
(goto-char (point-min))
(defun mml-compute-boundary (cont)
"Return a unique boundary that does not exist in CONT."
- (let ((mml-boundary (mml-make-boundary)))
+ (let ((mml-boundary (funcall mml-boundary-function
+ (incf mml-multipart-number))))
;; This function tries again and again until it has found
;; a unique boundary.
(while (not (catch 'not-unique
(goto-char (point-min))
(when (re-search-forward (concat "^--" (regexp-quote mml-boundary))
nil t)
- (setq mml-boundary (mml-make-boundary))
+ (setq mml-boundary (funcall mml-boundary-function
+ (incf mml-multipart-number)))
(throw 'not-unique nil))))
((eq (car cont) 'multipart)
(mapcar 'mml-compute-boundary-1 (cddr cont))))
t))
-(defun mml-make-boundary ()
- (concat (make-string (% (incf mml-multipart-number) 60) ?=)
- (if (> mml-multipart-number 17)
- (format "%x" mml-multipart-number)
+(defun mml-make-boundary (number)
+ (concat (make-string (% number 60) ?=)
+ (if (> number 17)
+ (format "%x" number)
"")
mml-base-boundary))
"Compute the next article number in GROUP."
(let ((active (cadr (assoc group nnmh-group-alist)))
(dir (nnmail-group-pathname group nnmh-directory))
- (pathname-coding-system 'binary))
+ (pathname-coding-system 'binary)
+ file)
(unless active
;; The group wasn't known to nnmh, so we just create an active
;; entry for it.
(when files
(setcdr active (car files)))))
(setcdr active (1+ (cdr active)))
- (while (file-exists-p
- (concat (nnmail-group-pathname group nnmh-directory)
- (int-to-string (cdr active))))
+ (while (or
+ ;; See whether the file exists...
+ (file-exists-p
+ (setq file (concat (nnmail-group-pathname group nnmh-directory)
+ (int-to-string (cdr active)))))
+ ;; ... or there is a buffer that will make that file exist
+ ;; in the future.
+ (get-file-buffer file))
+ ;; Skip past that file.
(setcdr active (1+ (cdr active))))
(cdr active)))