*** dist/Makefile.dist Thu Mar 18 18:42:10 1999 --- Makefile Mon Nov 13 01:36:05 2000 *************** *** 55,56 **** --- 55,57 ---- SOURCES = \ + vm-version.el \ vm-delete.el vm-digest.el vm-easymenu.el vm-edit.el vm-folder.el \ *************** *** 61,63 **** vm-toolbar.el vm-undo.el \ ! vm-user.el vm-vars.el vm-version.el vm-virtual.el vm-window.el --- 62,64 ---- vm-toolbar.el vm-undo.el \ ! vm-user.el vm-vars.el vm-virtual.el vm-window.el *** dist/vm-delete.el.dist Tue Feb 25 11:18:10 1997 --- vm-delete.el Tue Nov 14 12:50:30 2000 *************** *** 265,267 **** (vm-set-deleted-flag-of (car mp) 'expunged) ! ;; disable summary any summary update that may have ;; already been scheduled. --- 265,267 ---- (vm-set-deleted-flag-of (car mp) 'expunged) ! ;; disable any summary update that may have ;; already been scheduled. *************** *** 274,275 **** --- 274,276 ---- (set-buffer (vm-buffer-of (vm-real-message-of (car mp)))) + (vm-increment vm-modification-counter) (vm-save-restriction *** dist/vm-folder.el.dist Fri Nov 10 20:50:28 2000 --- vm-folder.el Tue Nov 14 14:25:31 2000 *************** *** 371,372 **** --- 371,373 ---- (setq vm-messages-needing-summary-update nil))) + (vm-do-needed-folders-summary-update) (vm-force-mode-line-update)) *************** *** 1380,1381 **** --- 1381,1405 ---- + (defun vm-compute-totals () + (save-excursion + (vm-select-folder-buffer) + (let ((mp vm-message-list) + (vm-new-count 0) + (vm-unread-count 0) + (vm-deleted-count 0) + (vm-total-count 0)) + (while mp + (vm-increment vm-total-count) + (cond ((vm-deleted-flag (car mp)) + (vm-increment vm-deleted-count)) + ((vm-new-flag (car mp)) + (vm-increment vm-new-count)) + ((vm-unread-flag (car mp)) + (vm-increment vm-unread-count))) + (setq mp (cdr mp))) + (setq vm-totals (list vm-modification-counter + vm-total-count + vm-new-count + vm-unread-count + vm-deleted-count))))) + (defun vm-emit-totals-blurb () *************** *** 1384,1404 **** (if (not (equal (nth 0 vm-totals) vm-modification-counter)) ! (let ((mp vm-message-list) ! (vm-new-count 0) ! (vm-unread-count 0) ! (vm-deleted-count 0) ! (vm-total-count 0)) ! (while mp ! (vm-increment vm-total-count) ! (cond ((vm-deleted-flag (car mp)) ! (vm-increment vm-deleted-count)) ! ((vm-new-flag (car mp)) ! (vm-increment vm-new-count)) ! ((vm-unread-flag (car mp)) ! (vm-increment vm-unread-count))) ! (setq mp (cdr mp))) ! (setq vm-totals (list vm-modification-counter ! vm-total-count ! vm-new-count ! vm-unread-count ! vm-deleted-count)))) (if (equal (nth 1 vm-totals) 0) --- 1408,1410 ---- (if (not (equal (nth 0 vm-totals) vm-modification-counter)) ! (vm-compute-totals)) (if (equal (nth 1 vm-totals) 0) *************** *** 2813,2814 **** --- 2819,2824 ---- (set-buffer mail-buffer) + ;; if folder is selected in the folders summary, force + ;; selcetion of some other folder. + (if buffer-file-name + (vm-mark-for-folders-summary-update buffer-file-name)) (set-buffer-modified-p nil) *************** *** 3021,3022 **** --- 3031,3036 ---- (progn + (if (and vm-folders-summary-database buffer-file-name) + (progn + (vm-compute-totals) + (vm-store-folder-totals buffer-file-name (cdr vm-totals)))) ;; get summary cache up-to-date *************** *** 3042,3043 **** --- 3056,3061 ---- (vm-display nil nil '(vm-save-buffer) '(vm-save-buffer)) + (if (and vm-folders-summary-database buffer-file-name) + (progn + (vm-compute-totals) + (vm-store-folder-totals buffer-file-name (cdr vm-totals)))) (vm-update-summary-and-mode-line) *************** *** 3052,3053 **** --- 3070,3075 ---- (call-interactively 'write-file)) + (if (and vm-folders-summary-database buffer-file-name) + (progn + (vm-compute-totals) + (vm-store-folder-totals buffer-file-name (cdr vm-totals)))) (if (not (equal (buffer-name) old-buffer-name)) *************** *** 3116,3117 **** --- 3138,3143 ---- (vm-write-index-file-maybe) + (if (and vm-folders-summary-database buffer-file-name) + (progn + (vm-compute-totals) + (vm-store-folder-totals buffer-file-name (cdr vm-totals)))) (vm-update-summary-and-mode-line) *************** *** 3693,3694 **** --- 3719,3731 ---- (vm-set-summary-redo-start-point new-messages)) + ;; Only update the folders summary count here if new messages + ;; have arrived, not when we're reading the folder for the + ;; first time, and not if we cannot assume that all the arrived + ;; messages should be considered new. Use gobble-order as a + ;; first time indicator along with the new messages being equal + ;; to the whole message list. + (if (and new-messages dont-read-attributes + (or (not (eq new-messages vm-message-list)) + (null gobble-order))) + (vm-modify-folder-totals buffer-file-name 'arrived + (length new-messages))) ;; copy the new-messages list because sorting might scramble *************** *** 3787,3789 **** (let ((lines vm-startup-message-lines)) ! (message "VM %s, Copyright (C) 1999 Kyle E. Jones; type ? for help" vm-version) --- 3824,3826 ---- (let ((lines vm-startup-message-lines)) ! (message "VM %s, Copyright (C) 2000 Kyle E. Jones; type ? for help" vm-version) *** dist/vm-macro.el.dist Sun Nov 5 22:40:19 2000 --- vm-macro.el Tue Nov 14 14:22:24 2000 *************** *** 36,41 **** (defmacro vm-select-folder-buffer () ! '(and vm-mail-buffer ! (or (buffer-name vm-mail-buffer) ! (error "Folder buffer has been killed.")) ! (set-buffer vm-mail-buffer))) --- 36,47 ---- (defmacro vm-select-folder-buffer () ! '(cond (vm-mail-buffer ! (or (buffer-name vm-mail-buffer) ! (error "Folder buffer has been killed.")) ! (set-buffer vm-mail-buffer)) ! ((not (memq major-mode '(vm-mode vm-virtual-mode))) ! (error "No VM folder buffer associated with this buffer")))) ! ! (defmacro vm-select-folder-buffer-if-possible () ! '(cond (vm-mail-buffer ! (set-buffer vm-mail-buffer)))) *** dist/vm-menu.el.dist Fri Nov 10 20:50:28 2000 --- vm-menu.el Sat Nov 11 14:45:54 2000 *************** *** 390,392 **** (if (null layout) ! (error "foo!") (or (vm-mime-types-match "message/rfc822" --- 390,392 ---- (if (null layout) ! nil (or (vm-mime-types-match "message/rfc822" *** dist/vm-mime.el.dist Fri Nov 10 20:50:28 2000 --- vm-mime.el Mon Nov 13 03:30:16 2000 *************** *** 1574,1576 **** (vm-mime-charset-decode-region charset start end) ! (w3-region start end) ;; remove read-only text properties --- 1574,1588 ---- (vm-mime-charset-decode-region charset start end) ! ;; w3-region apparently deletes all the text in the ! ;; region and then insert new text. This makes the ! ;; end == start. The fix is to move the end marker ! ;; forward with a placeholder character so that when ! ;; w3-region delete all the text, end will still be ! ;; ahead of the insertion point and so will be moved ! ;; forward when the new text is inserted. We'll ! ;; delete the placeholder afterward. ! (goto-char end) ! (insert-before-markers "z") ! (w3-region start (1- end)) ! (goto-char end) ! (delete-char -1) ;; remove read-only text properties *************** *** 2799,2801 **** (let* ((charset (or (vm-mime-get-parameter o "charset") ! "us-ascii"))) (vm-mime-default-face-charset-p charset)) --- 2811,2813 ---- (let* ((charset (or (vm-mime-get-parameter o "charset") ! "us-ascii"))) (vm-mime-default-face-charset-p charset)) *************** *** 3689,3692 **** (jka-compr-compression-info-list nil) - ;; no font-lock - (font-lock-mode nil) ;; don't let buffer-file-coding-system be changed --- 3701,3702 ---- *************** *** 4050,4053 **** (jka-compr-compression-info-list nil) - ;; no font-lock - (font-lock-mode nil) ;; don't let buffer-file-coding-system be --- 4060,4061 ---- *************** *** 4441,4446 **** 'vm-mime-layout) sexp)))) - (cond (vm-display-using-mime - (setcar sexp - (list 'vm-decode-mime-encoded-words-in-string - (car sexp))))) (cond ((and (match-beginning 1) (match-beginning 2)) --- 4449,4450 ---- *************** *** 4474,4479 **** (match-end 4))))))) - (cond (vm-display-using-mime - (setcar sexp - (list 'vm-reencode-mime-encoded-words-in-string - (car sexp))))) (setq sexp-fmt --- 4478,4479 ---- *** dist/vm-misc.el.dist Mon Nov 6 19:22:41 2000 --- vm-misc.el Mon Nov 13 16:13:39 2000 *************** *** 209,211 **** (vm-set-su-end-of (car mp) nil) ! (setq mp (cdr mp)))))) --- 209,214 ---- (vm-set-su-end-of (car mp) nil) ! (setq mp (cdr mp))))) ! (and (bufferp vm-folders-summary-buffer) ! (null (buffer-name vm-folders-summary-buffer)) ! (setq vm-folders-summary-buffer nil))) *************** *** 528,529 **** --- 531,537 ---- + (if (not (fboundp 'vm-extent-object)) + (if (fboundp 'overlay-buffer) + (fset 'vm-extent-object 'overlay-buffer) + (fset 'vm-extent-object 'extent-object))) + (if (not (fboundp 'vm-set-extent-property)) *************** *** 780 **** --- 788,809 ---- (setq buffer-display-table tab))))) + + (defun vm-url-decode-string (string) + (vm-with-string-as-temp-buffer string 'vm-url-decode-buffer)) + + (defun vm-url-decode-buffer () + (let ((case-fold-search nil) + (hex-digit-alist '((?0 . 0) (?1 . 1) (?2 . 2) (?3 . 3) + (?4 . 4) (?5 . 5) (?6 . 6) (?7 . 7) + (?8 . 8) (?9 . 9) (?A . 10) (?B . 11) + (?C . 12) (?D . 13) (?E . 14) (?F . 15))) + char) + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "%[0-9A-F][0-9A-F]" nil t) + (insert-char (+ (* (cdr (assq (char-after (- (point) 2)) + hex-digit-alist)) + 16) + (cdr (assq (char-after (- (point) 1)) + hex-digit-alist))) + 1) + (delete-region (- (point) 1) (- (point) 4)))))) *** dist/vm-motion.el.dist Mon Jan 20 21:20:30 1997 --- vm-motion.el Mon Nov 13 21:32:43 2000 *************** *** 39,40 **** --- 39,41 ---- ((vm-follow-summary-cursor) nil) + ((vm-follow-folders-summary-cursor) nil) (t *** dist/vm-mouse.el.dist Thu Nov 2 09:27:07 2000 --- vm-mouse.el Mon Nov 13 19:26:18 2000 *************** *** 54,55 **** --- 54,59 ---- (call-interactively 'vm-scroll-forward))) + ((eq major-mode 'vm-folders-summary-mode) + (mouse-set-point event) + (beginning-of-line) + (vm-follow-folders-summary-cursor)) ((memq major-mode '(vm-mode vm-virtual-mode vm-presentation-mode)) *** dist/vm-page.el.dist Mon Nov 6 19:22:41 2000 --- vm-page.el Mon Nov 13 20:44:34 2000 *************** *** 117,118 **** --- 117,130 ---- (vm-narrow-to-page) + (goto-char (max (window-start w) + (vm-text-of (car vmp)))) + ;; This is needed because in some cases + ;; the scroll-up call in vm-howl-if-emo + ;; does not signal end-of-buffer when + ;; it should unless we do this. This + ;; sit-for most likely removes the need + ;; for the (scroll-up 0) below, but + ;; since the voodoo has worked this + ;; long, it's probably best to let it + ;; be. + (sit-for 0) ;; This voodoo is required! For some *************** *** 587,588 **** --- 599,601 ---- vm-mime-decode-for-preview + (not (equal vm-preview-lines 0)) (if vm-mail-buffer *************** *** 732,735 **** (defun vm-narrow-to-page () (save-excursion ! (let (min max (omin (point-min)) (omax (point-max))) (if (or (bolp) (not (save-excursion --- 745,767 ---- (defun vm-narrow-to-page () + (cond (vm-fsfemacs-p + (if (not (and vm-page-end-overlay + (overlay-buffer vm-page-end-overlay))) + (let ((g vm-page-continuation-glyph)) + (setq vm-page-end-overlay (make-overlay (point) (point))) + (vm-set-extent-property vm-page-end-overlay 'vm-glyph g) + (vm-set-extent-property vm-page-end-overlay 'before-string g) + (overlay-put vm-page-end-overlay 'evaporate nil)))) + (vm-xemacs-p + (if (not (and vm-page-end-overlay + (extent-end-position vm-page-end-overlay))) + (let ((g vm-page-continuation-glyph)) + (cond ((not (glyphp g)) + (setq g (make-glyph g)) + (set-glyph-face g 'italic))) + (setq vm-page-end-overlay (make-extent (point) (point))) + (vm-set-extent-property vm-page-end-overlay 'vm-glyph g) + (vm-set-extent-property vm-page-end-overlay 'begin-glyph g) + (set-extent-property vm-page-end-overlay 'detachable nil))))) (save-excursion ! (let (min max (e vm-page-end-overlay)) (if (or (bolp) (not (save-excursion *************** *** 740,742 **** (forward-page 1) ! (beginning-of-line) (setq max (point)) --- 772,781 ---- (forward-page 1) ! (if (not (eobp)) ! (beginning-of-line)) ! (cond ((/= (point) (vm-text-end-of (car vm-message-pointer))) ! (vm-set-extent-property e vm-begin-glyph-property ! (vm-extent-property e 'vm-glyph)) ! (vm-set-extent-endpoints e (point) (point))) ! (t ! (vm-set-extent-property e vm-begin-glyph-property nil))) (setq max (point)) *** dist/vm-reply.el.dist Sun Nov 5 22:40:19 2000 --- vm-reply.el Sat Nov 11 22:11:48 2000 *************** *** 1079,1080 **** --- 1079,1081 ---- (let ((address (car (vm-parse url "^mailto:\\(.+\\)")))) + (setq address (vm-url-decode address)) (vm-select-folder-buffer) *** dist/vm-save.el.dist Sun Nov 5 02:08:13 2000 --- vm-save.el Tue Nov 14 12:01:16 2000 *************** *** 331,332 **** --- 331,333 ---- (vm-increment count) + (vm-modify-folder-totals folder 'saved 1 m) (vm-update-summary-and-mode-line) *** dist/vm-startup.el.dist Fri Nov 10 20:50:28 2000 --- vm-startup.el Tue Nov 14 20:41:08 2000 *************** *** 223,226 **** (if full-startup ! ;; save blurb so we can repeat it later as necessary. ! (setq totals-blurb (vm-emit-totals-blurb))) --- 223,229 ---- (if full-startup ! (progn ! ;; save blurb so we can repeat it later as necessary. ! (setq totals-blurb (vm-emit-totals-blurb)) ! (and buffer-file-name ! (vm-store-folder-totals buffer-file-name (cdr vm-totals))))) *************** *** 245,247 **** ;; likely to happen, since recover-file does ! ;; nothing useful in a summary buffer. (not preserve-auto-save-file)) --- 248,250 ---- ;; likely to happen, since recover-file does ! ;; not work in a summary buffer. (not preserve-auto-save-file)) *************** *** 267,269 **** (if vm-message-list ! (vm-preview-current-message)) --- 270,276 ---- (if vm-message-list ! ;; don't decode MIME if recover-file is ! ;; likely to happen, since recover-file does ! ;; not work in a presentation buffer. ! (let ((vm-auto-decode-mime-messages (not preserve-auto-save-file))) ! (vm-preview-current-message))) *************** *** 288,290 **** (message "Checking for new mail for %s..." ! (or buffer-file-name (buffer-name))) (if (and (vm-get-spooled-mail t) (vm-assimilate-new-messages t)) --- 295,297 ---- (message "Checking for new mail for %s..." ! (or buffer-file-name (buffer-name))) (if (and (vm-get-spooled-mail t) (vm-assimilate-new-messages t)) *************** *** 338,340 **** ! This is VM 6.82. --- 345,347 ---- ! This is VM 6.83. *************** *** 513,514 **** --- 520,524 ---- vm-folder-read-only + vm-folders-summary-database + vm-folders-summary-directories + vm-folders-summary-format vm-follow-summary-cursor *************** *** 523,524 **** --- 533,535 ---- vm-frame-per-folder + vm-frame-per-folders-summary vm-frame-per-help *************** *** 547,548 **** --- 558,560 ---- vm-keep-sent-messages + vm-lynx-program vm-mail-check-interval *************** *** 601,602 **** --- 613,615 ---- vm-netscape-program-switches + vm-page-continuation-glyph vm-paragraph-fill-column *************** *** 660,661 **** --- 673,675 ---- vm-url-browser + vm-url-retrieval-methods vm-url-search-limit *************** *** 669,670 **** --- 683,685 ---- vm-warp-mouse-to-new-frame + vm-wget-program vm-window-configuration-file *************** *** 692,694 **** (vm-check-for-killed-folder) ! (vm-select-folder-buffer) (let ((default-directory (if vm-folder-directory --- 707,709 ---- (vm-check-for-killed-folder) ! (vm-select-folder-buffer-if-possible) (let ((default-directory (if vm-folder-directory *************** *** 709,711 **** (vm-check-for-killed-folder) ! (vm-select-folder-buffer) (vm-check-for-killed-summary) --- 724,726 ---- (vm-check-for-killed-folder) ! (vm-select-folder-buffer-if-possible) (vm-check-for-killed-summary) *************** *** 723,725 **** (vm-check-for-killed-folder) ! (vm-select-folder-buffer) (let ((default-directory (if vm-folder-directory --- 738,740 ---- (vm-check-for-killed-folder) ! (vm-select-folder-buffer-if-possible) (let ((default-directory (if vm-folder-directory *************** *** 754,756 **** (vm-check-for-killed-folder) ! (vm-select-folder-buffer) (let ((default-directory (if vm-folder-directory --- 769,771 ---- (vm-check-for-killed-folder) ! (vm-select-folder-buffer-if-possible) (let ((default-directory (if vm-folder-directory *************** *** 940,942 **** (vm-check-for-killed-folder) ! (vm-select-folder-buffer) (vm-check-for-killed-summary) --- 955,957 ---- (vm-check-for-killed-folder) ! (vm-select-folder-buffer-if-possible) (vm-check-for-killed-summary) *************** *** 986,988 **** ;; stuff to the reports. ! (let ((reporter-mailer '(vm-mail))) (delete-other-windows) --- 1001,1004 ---- ;; stuff to the reports. ! (let ((reporter-mailer '(vm-mail)) ! (mail-user-agent '(vm-user-agent))) (delete-other-windows) *************** *** 1030,1031 **** --- 1046,1050 ---- 'vm-folder-read-only + 'vm-folders-summary-database + 'vm-folders-summary-directories + 'vm-folders-summary-format 'vm-follow-summary-cursor *************** *** 1040,1041 **** --- 1059,1061 ---- 'vm-frame-per-folder + 'vm-frame-per-folders-summary 'vm-frame-per-help *************** *** 1066,1067 **** --- 1086,1088 ---- 'vm-keep-sent-messages + 'vm-lynx-program 'vm-mail-header-from *************** *** 1123,1124 **** --- 1144,1146 ---- 'vm-netscape-program-switches + 'vm-page-continuation-glyph 'vm-paragraph-fill-column *************** *** 1187,1188 **** --- 1209,1211 ---- 'vm-url-browser + 'vm-url-retrieval-methods 'vm-url-search-limit *************** *** 1196,1197 **** --- 1219,1221 ---- 'vm-warp-mouse-to-new-frame + 'vm-wget-program 'vm-window-configuration-file *** dist/vm-summary.el.dist Fri Nov 10 20:50:28 2000 --- vm-summary.el Tue Nov 14 12:28:29 2000 *************** *** 290,310 **** (defun vm-summary-highlight-region (start end face) ! (cond (vm-fsfemacs-p ! (if (and vm-summary-overlay (overlay-buffer vm-summary-overlay)) ! (move-overlay vm-summary-overlay start end) ! (setq vm-summary-overlay (make-overlay start end)) ! (overlay-put vm-summary-overlay 'evaporate nil) ! (overlay-put vm-summary-overlay 'face face))) ! (vm-xemacs-p ! (if (and vm-summary-overlay (extent-end-position vm-summary-overlay)) ! (set-extent-endpoints vm-summary-overlay start end) ! (setq vm-summary-overlay (make-extent start end)) ! ;; the reason this isn't needed under FSF Emacs is ! ;; that insert-before-markers also inserts before ! ;; overlays! so a summary update of an entry just ! ;; before this overlay in the summary buffer won't ! ;; leak into the overlay, but it _will_ leak into an ! ;; XEmacs extent. ! (set-extent-property vm-summary-overlay 'start-open t) ! (set-extent-property vm-summary-overlay 'detachable nil) ! (set-extent-property vm-summary-overlay 'face face))))) --- 290,320 ---- (defun vm-summary-highlight-region (start end face) ! (vm-summary-xxxx-highlight-region start end face 'vm-summary-overlay)) ! ! (defun vm-folders-summary-highlight-region (start end face) ! (vm-summary-xxxx-highlight-region start end face ! 'vm-folders-summary-overlay)) ! ! (defun vm-summary-xxxx-highlight-region (start end face var) ! (let ((ooo (symbol-value var))) ! (cond (vm-fsfemacs-p ! (if (and ooo (overlay-buffer ooo)) ! (move-overlay ooo start end) ! (setq ooo (make-overlay start end)) ! (set var ooo) ! (overlay-put ooo 'evaporate nil) ! (overlay-put ooo 'face face))) ! (vm-xemacs-p ! (if (and ooo (extent-end-position ooo)) ! (set-extent-endpoints ooo start end) ! (setq ooo (make-extent start end)) ! (set var ooo) ! ;; the reason this isn't needed under FSF Emacs is ! ;; that insert-before-markers also inserts before ! ;; overlays! so a summary update of an entry just ! ;; before this overlay in the summary buffer won't ! ;; leak into the overlay, but it _will_ leak into an ! ;; XEmacs extent. ! (set-extent-property ooo 'start-open t) ! (set-extent-property ooo 'detachable nil) ! (set-extent-property ooo 'face face)))))) *************** *** 1115,1116 **** ! --- 1125,1606 ---- ! (defun vm-make-folder-summary () ! (make-vector vm-folder-summary-vector-length nil)) ! ! (defun vm-fs-folder-of (fs) (aref fs 0)) ! (defun vm-fs-total-count-of (fs) (aref fs 1)) ! (defun vm-fs-new-count-of (fs) (aref fs 2)) ! (defun vm-fs-unread-count-of (fs) (aref fs 3)) ! (defun vm-fs-deleted-count-of (fs) (aref fs 4)) ! (defun vm-fs-start-of (fs) (aref fs 5)) ! (defun vm-fs-end-of (fs) (aref fs 6)) ! (defun vm-fs-folder-key-of (fs) (aref fs 7)) ! (defun vm-fs-mouse-track-overlay-of (fs) (aref fs 8)) ! (defun vm-fs-short-folder-of (fs) (aref fs 9)) ! (defun vm-fs-modflag-of (fs) (aref fs 10)) ! ! (defun vm-set-fs-folder-of (fs x) (aset fs 0 x)) ! (defun vm-set-fs-total-count-of (fs x) (aset fs 1 x)) ! (defun vm-set-fs-new-count-of (fs x) (aset fs 2 x)) ! (defun vm-set-fs-unread-count-of (fs x) (aset fs 3 x)) ! (defun vm-set-fs-deleted-count-of (fs x) (aset fs 4 x)) ! (defun vm-set-fs-start-of (fs x) (aset fs 5 x)) ! (defun vm-set-fs-end-of (fs x) (aset fs 6 x)) ! (defun vm-set-fs-folder-key-of (fs x) (aset fs 7 x)) ! (defun vm-set-fs-mouse-track-overlay-of (fs x) (aset fs 8 x)) ! (defun vm-set-fs-short-folder-of (fs x) (aset fs 9 x)) ! (defun vm-set-fs-modflag-of (fs x) (aset fs 10 x)) ! ! (defun vm-make-folders-summary-key (folder &optional dir) ! (concat "folder-summary0:" ! (file-truename (expand-file-name folder ! (or dir vm-folder-directory))))) ! ! (defun vm-open-folders-summary-database (mode) ! (condition-case data ! (open-database vm-folders-summary-database 'berkeley-db 'hash mode) ! (error (message "open-database signaled: %S" data) ! (sleep-for 2) ! nil ))) ! ! (defun vm-store-folder-totals (folder totals) ! (let (fs db key data) ! (catch 'done ! (if (null vm-folders-summary-database) ! (throw 'done nil)) ! (if (not (featurep 'berkeley-db)) ! (throw 'done nil)) ! (if (null (setq db (vm-open-folders-summary-database "rw+"))) ! (throw 'done nil)) ! (setq key (vm-make-folders-summary-key folder) ! data (prin1-to-string totals)) ! (put-database key data db t) ! (close-database db) ! (if (null vm-folders-summary-hash) ! nil ! (setq fs (intern-soft key vm-folders-summary-hash) ! fs (symbol-value fs)) ! (if (null fs) ! nil ! (vm-set-fs-total-count-of fs (int-to-string (car totals))) ! (vm-set-fs-new-count-of fs (int-to-string (nth 1 totals))) ! (vm-set-fs-unread-count-of fs (int-to-string (nth 2 totals))) ! (vm-set-fs-deleted-count-of fs (int-to-string (nth 3 totals))))) ! (vm-mark-for-folders-summary-update folder)))) ! ! (defun vm-modify-folder-totals (folder action &rest objects) ! (let (fs db totals key data) ! (catch 'done ! (if (null vm-folders-summary-database) ! (throw 'done nil)) ! (if (not (featurep 'berkeley-db)) ! (throw 'done nil)) ! (if (null (setq db (vm-open-folders-summary-database "r"))) ! (throw 'done nil)) ! (setq key (vm-make-folders-summary-key folder)) ! (setq totals (get-database key db)) ! (close-database db) ! (if (null totals) ! (throw 'done nil)) ! (setq totals (read totals)) ! (cond ((eq action 'arrived) ! (let ((arrived (car objects)) c n) ! (setcar totals (+ (car totals) arrived)) ! (setq c (cdr totals)) ! (setcar c (+ (car c) arrived)))) ! ((eq action 'saved) ! (let ((arrived (car objects)) ! (m (nth 1 objects)) c n) ! (setcar totals (+ (car totals) arrived)) ! ;; increment new and unread counts if necessary. ! ;; messages are never saved with the deleted flag ! ;; set no need to check that. ! (setq c (cdr totals)) ! (if (vm-new-flag m) ! (setcar c (+ (car c) arrived))) ! (setq c (cdr totals)) ! (if (vm-unread-flag m) ! (setcar c (+ (car c) arrived)))))) ! (setq data (prin1-to-string totals)) ! (if (null (setq db (vm-open-folders-summary-database "rw+"))) ! (throw 'done nil)) ! (put-database key data db t) ! (close-database db) ! (if (null vm-folders-summary-hash) ! nil ! (setq fs (intern-soft key vm-folders-summary-hash) ! fs (symbol-value fs)) ! (if (null fs) ! nil ! (vm-set-fs-total-count-of fs (int-to-string (car totals))) ! (vm-set-fs-new-count-of fs (int-to-string (nth 1 totals))) ! (vm-set-fs-unread-count-of fs (int-to-string (nth 2 totals))) ! (vm-set-fs-deleted-count-of fs (int-to-string (nth 3 totals))))) ! (vm-mark-for-folders-summary-update folder)))) ! ! (defun vm-folders-summary-sprintf (format layout) ! ;; compile the format into an eval'able s-expression ! ;; if it hasn't been compiled already. ! (let ((match (assoc format vm-folders-summary-compiled-format-alist))) ! (if (null match) ! (progn ! (vm-folders-summary-compile-format format) ! (setq match ! (assoc format vm-folders-summary-compiled-format-alist)))) ! ;; The local variable name `vm-folder-summary' is mandatory here for ! ;; the format s-expression to work. ! (let ((vm-folder-summary layout)) ! (eval (cdr match))))) ! ! (defun vm-folders-summary-compile-format (format) ! (let ((return-value (vm-folders-summary-compile-format-1 format 0))) ! (setq vm-folders-summary-compiled-format-alist ! (cons (cons format (nth 1 return-value)) ! vm-folders-summary-compiled-format-alist)))) ! ! (defun vm-folders-summary-compile-format-1 (format start-index) ! (let ((case-fold-search nil) ! (done nil) ! (sexp nil) ! (sexp-fmt nil) ! (last-match-end start-index) ! new-match-end conv-spec) ! (store-match-data nil) ! (while (not done) ! (while ! (and (not done) ! (string-match ! "%\\(-\\)?\\([0-9]+\\)?\\(\\.\\(-?[0-9]+\\)\\)?\\([()dfntu%]\\)" ! format last-match-end)) ! (setq conv-spec (aref format (match-beginning 5))) ! (setq new-match-end (match-end 0)) ! (if (memq conv-spec '(?\( ?d ?f ?n ?t ?u)) ! (progn ! (cond ((= conv-spec ?\() ! (save-match-data ! (let ((retval ! (vm-folder-summary-compile-format-1 ! format ! (match-end 5)))) ! (setq sexp (cons (nth 1 retval) sexp) ! new-match-end (car retval))))) ! ((= conv-spec ?d) ! (setq sexp (cons (list 'vm-fs-deleted-count-of ! 'vm-folder-summary) sexp))) ! ((= conv-spec ?f) ! (setq sexp (cons (list 'vm-fs-short-folder-of ! 'vm-folder-summary) sexp))) ! ((= conv-spec ?n) ! (setq sexp (cons (list 'vm-fs-new-count-of ! 'vm-folder-summary) sexp))) ! ((= conv-spec ?t) ! (setq sexp (cons (list 'vm-fs-total-count-of ! 'vm-folder-summary) sexp))) ! ((= conv-spec ?u) ! (setq sexp (cons (list 'vm-fs-unread-count-of ! 'vm-folder-summary) sexp)))) ! (cond ((and (match-beginning 1) (match-beginning 2)) ! (setcar sexp ! (list ! (if (eq (aref format (match-beginning 2)) ?0) ! 'vm-numeric-left-justify-string ! 'vm-left-justify-string) ! (car sexp) ! (string-to-int ! (substring format ! (match-beginning 2) ! (match-end 2)))))) ! ((match-beginning 2) ! (setcar sexp ! (list ! (if (eq (aref format (match-beginning 2)) ?0) ! 'vm-numeric-right-justify-string ! 'vm-right-justify-string) ! (car sexp) ! (string-to-int ! (substring format ! (match-beginning 2) ! (match-end 2))))))) ! (cond ((match-beginning 3) ! (setcar sexp ! (list 'vm-truncate-string (car sexp) ! (string-to-int ! (substring format ! (match-beginning 4) ! (match-end 4))))))) ! (setq sexp-fmt ! (cons "%s" ! (cons (substring format ! last-match-end ! (match-beginning 0)) ! sexp-fmt)))) ! (setq sexp-fmt ! (cons (if (eq conv-spec ?\)) ! (prog1 "" (setq done t)) ! "%%") ! (cons (substring format ! (or last-match-end 0) ! (match-beginning 0)) ! sexp-fmt)))) ! (setq last-match-end new-match-end)) ! (if (not done) ! (setq sexp-fmt ! (cons (substring format last-match-end (length format)) ! sexp-fmt) ! done t)) ! (setq sexp-fmt (apply 'concat (nreverse sexp-fmt))) ! (if sexp ! (setq sexp (cons 'format (cons sexp-fmt (nreverse sexp)))) ! (setq sexp sexp-fmt))) ! (list last-match-end sexp))) ! ! (defun vm-update-folders-summary-entry (fs) ! (if (and (vm-fs-start-of fs) ! (marker-buffer (vm-fs-start-of fs))) ! (let ((modified (buffer-modified-p)) ! (do-mouse-track ! (and vm-mouse-track-summary ! (vm-mouse-support-possible-p))) ! summary) ! (save-excursion ! (set-buffer (marker-buffer (vm-fs-start-of fs))) ! (let ((buffer-read-only nil)) ! (unwind-protect ! (save-excursion ! (goto-char (vm-fs-start-of fs)) ! ;; We do a little dance to update the text in ! ;; order to make the markers in the text do ! ;; what we want. ! ;; ! ;; 1. We need to avoid having the start ! ;; and end markers clumping together at ! ;; the start position. ! ;; ! ;; 2. We want the window point marker (w->pointm ! ;; in the Emacs display code) to move to the ! ;; start of the summary entry if it is ! ;; anywhere within the su-start-of to ! ;; su-end-of region. ! ;; ! ;; We achieve (2) by deleting before inserting. ! ;; Reversing the order of insertion/deletion ! ;; pushes the point marker into the next ! ;; summary entry. We achieve (1) by inserting a ! ;; placeholder character at the end of the ! ;; summary entry before deleting the region. ! (goto-char (vm-fs-end-of fs)) ! (insert-before-markers "z") ! (goto-char (vm-fs-start-of fs)) ! (delete-region (point) (1- (vm-fs-end-of fs))) ! (insert ! (vm-folders-summary-sprintf vm-folders-summary-format fs)) ! (delete-char 1) ! (and do-mouse-track ! (vm-mouse-set-mouse-track-highlight ! (vm-fs-start-of fs) ! (vm-fs-end-of fs) ! (vm-fs-mouse-track-overlay-of fs)))) ! (set-buffer-modified-p modified))))))) ! ! (defun vm-folders-summary-mode-internal () ! (setq mode-name "VM Folders Summary" ! major-mode 'vm-folders-summary-mode ! mode-line-format '(" %b") ! ;; must come after the setting of major-mode ! mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3 ! (vm-menu-support-possible-p) ! (vm-menu-mode-menu)) ! buffer-read-only t ! buffer-offer-save nil ! truncate-lines t) ! (and vm-xemacs-p (featurep 'scrollbar) ! (set-specifier scrollbar-height (cons (current-buffer) 0))) ! (use-local-map vm-folders-summary-mode-map) ! (and (vm-menu-support-possible-p) ! (vm-menu-install-menus)) ! (if (and vm-mutable-frames vm-frame-per-folders-summary) ! (vm-set-hooks-for-frame-deletion))) ! ! (fset 'vm-folders-summary-mode 'vm-mode) ! (put 'vm-folders-summary-mode 'mode-class 'special) ! ! (defun vm-folders-summarize (&optional display raise) ! "Generate a summary of the folders in your folder directories. ! Set `vm-folders-summary-directories' to specify the folder directories. ! Press RETURN or click mouse button 2 on an entry in the folders ! summary buffer to select a folder." ! (interactive "p\np") ! (vm-session-initialization) ! (vm-select-folder-buffer) ! (vm-check-for-killed-summary) ! (if (not (featurep 'berkeley-db)) ! (error "Berkeley DB support needed to run this command")) ! (if (null vm-folders-summary-database) ! (error "'vm-folders-summary-database' must be non-nil to run this command")) ! (if (null vm-folders-summary-buffer) ! (let ((buffer-read-only nil) ! (folder-buffer (and (eq major-mode 'vm-mode) ! (current-buffer)))) ! (setq vm-folders-summary-buffer ! (let ((default-enable-multibyte-characters t)) ! (get-buffer-create "VM Folders Summary"))) ! (save-excursion ! (set-buffer vm-folders-summary-buffer) ! (abbrev-mode 0) ! (auto-fill-mode 0) ! (vm-fsfemacs-nonmule-display-8bit-chars) ! (if (fboundp 'buffer-disable-undo) ! (buffer-disable-undo (current-buffer)) ! ;; obfuscation to make the v19 compiler not whine ! ;; about obsolete functions. ! (let ((x 'buffer-flush-undo)) ! (funcall x (current-buffer)))) ! (setq vm-mail-buffer folder-buffer) ! (vm-folders-summary-mode-internal)) ! (vm-do-folders-summary))) ! (if display ! (save-excursion ! (vm-goto-new-folders-summary-frame-maybe) ! (vm-display vm-folders-summary-buffer t ! '(vm-folders-summarize) ! (list this-command) (not raise)) ! ;; need to do this after any frame creation because the ! ;; toolbar sets frame-specific height and width specifiers. ! (set-buffer vm-folders-summary-buffer) ! (and (vm-toolbar-support-possible-p) vm-use-toolbar ! (vm-toolbar-install-toolbar))) ! (vm-display nil nil '(vm-folders-summarize) ! (list this-command))) ! (vm-update-summary-and-mode-line)) ! ! (defun vm-do-folders-summary () ! (catch 'done ! (let ((fs-hash (make-vector 89 0)) db dp fp f key fs totals ! (format vm-folders-summary-format) ! (do-mouse-track (and vm-mouse-track-summary ! (vm-mouse-support-possible-p)))) ! (save-excursion ! (set-buffer vm-folders-summary-buffer) ! (erase-buffer) ! (let ((buffer-read-only nil)) ! (if (null vm-folders-summary-database) ! (throw 'done nil)) ! (if (not (featurep 'berkeley-db)) ! (throw 'done nil)) ! (if (null (setq db (vm-open-folders-summary-database "r"))) ! (throw 'done nil)) ! (setq dp vm-folders-summary-directories) ! (while dp ! (if (cdr vm-folders-summary-directories) ! (insert (car dp) ":\n")) ! (setq fp (sort (vm-delete-backup-file-names ! (vm-delete-auto-save-file-names ! (vm-delete-index-file-names ! (directory-files (car dp))))) ! (function string-lessp))) ! (while fp ! (setq f (car fp) ! key (vm-make-folders-summary-key f (car dp)) ! totals (get-database key db)) ! (if (null totals) ! nil ! (setq totals (read totals)) ! (setq fs (vm-make-folder-summary)) ! (vm-set-fs-folder-of fs (expand-file-name f (car dp))) ! (vm-set-fs-short-folder-of fs f) ! (vm-set-fs-total-count-of fs (int-to-string (car totals))) ! (vm-set-fs-new-count-of fs (int-to-string (nth 1 totals))) ! (vm-set-fs-unread-count-of fs (int-to-string (nth 2 totals))) ! (vm-set-fs-deleted-count-of fs (int-to-string (nth 3 totals))) ! (vm-set-fs-folder-key-of fs key) ! (vm-set-fs-start-of fs (vm-marker (point))) ! (insert (vm-folders-summary-sprintf format fs)) ! (vm-set-fs-end-of fs (vm-marker (point))) ! (and do-mouse-track ! (vm-set-fs-mouse-track-overlay-of ! fs ! (vm-mouse-set-mouse-track-highlight ! (vm-fs-start-of fs) ! (vm-fs-end-of fs)))) ! (set (intern key fs-hash) fs)) ! (setq fp (cdr fp))) ! (setq dp (cdr dp))) ! (close-database db) ! (setq vm-folders-summary-hash fs-hash)) ! (goto-char (point-min)))))) ! ! (defun vm-update-folders-summary-highlight () ! (if (or (null vm-mail-buffer) ! (null (buffer-file-name vm-mail-buffer)) ! (null vm-folders-summary-hash)) ! (progn ! (and vm-folders-summary-overlay ! (vm-set-extent-endpoints vm-folders-summary-overlay 1 1)) ! (setq vm-mail-buffer nil)) ! (let ((ooo vm-folders-summary-overlay) ! (fs (symbol-value (intern (vm-make-folders-summary-key ! (buffer-file-name vm-mail-buffer)) ! vm-folders-summary-hash)))) ! (if (and fs ! (or (null ooo) ! (null (vm-extent-object ooo)) ! (/= (vm-extent-end-position ooo) ! (vm-fs-end-of fs)))) ! (vm-folders-summary-highlight-region ! (vm-fs-start-of fs) (vm-fs-end-of fs) ! vm-summary-highlight-face))))) ! ! (defun vm-do-needed-folders-summary-update () ! (if (null vm-folders-summary-buffer) ! nil ! (save-excursion ! (set-buffer vm-folders-summary-buffer) ! (if (or (eq vm-modification-counter vm-flushed-modification-counter) ! (null vm-folders-summary-hash)) ! nil ! (mapatoms ! (function ! (lambda (sym) ! (let ((fs (symbol-value sym))) ! (vm-update-folders-summary-entry fs) ! (vm-set-fs-modflag-of fs nil)))) ! vm-folders-summary-hash) ! (vm-update-folders-summary-highlight) ! (setq vm-flushed-modification-counter vm-modification-counter))))) ! ! (defun vm-mark-for-folders-summary-update (folder) ! (let ((key (vm-make-folders-summary-key folder)) ! (hash vm-folders-summary-hash) ! fs ) ! (setq fs (symbol-value (intern-soft key hash))) ! (if (not fs) ! nil ! (vm-set-fs-modflag-of fs t) ! (if vm-folders-summary-buffer ! (save-excursion ! (set-buffer vm-folders-summary-buffer) ! (vm-increment vm-modification-counter)))))) ! ! (defun vm-follow-folders-summary-cursor () ! (if (or (not (eq major-mode 'vm-folders-summary-mode)) ! (null vm-folders-summary-hash)) ! nil ! (catch 'done ! (mapatoms ! (function ! (lambda (sym) ! (let ((fs (symbol-value sym))) ! (if (and (>= (point) (vm-fs-start-of fs)) ! (< (point) (vm-fs-end-of fs)) ! (or (null vm-mail-buffer) ! (not (eq vm-mail-buffer ! (vm-get-file-buffer (vm-fs-folder-of fs)))))) ! (progn ! (setq vm-mail-buffer ! (save-excursion ! (vm-visit-folder (vm-fs-folder-of fs)) ! (current-buffer))) ! (vm-increment vm-modification-counter) ! (vm-update-summary-and-mode-line) ! (throw 'done t)))))) ! vm-folders-summary-hash) ! nil ))) *** dist/vm-toolbar.el.dist Thu Nov 2 09:27:08 2000 --- vm-toolbar.el Tue Nov 14 10:41:11 2000 *************** *** 204,206 **** (vm-check-for-killed-folder) ! (vm-select-folder-buffer) vm-message-list) --- 204,206 ---- (vm-check-for-killed-folder) ! (vm-select-folder-buffer-if-possible) vm-message-list) *************** *** 225,227 **** (vm-check-for-killed-folder) ! (vm-select-folder-buffer) (and vm-message-pointer --- 225,227 ---- (vm-check-for-killed-folder) ! (vm-select-folder-buffer-if-possible) (and vm-message-pointer *** dist/vm-user.el.dist Sat Mar 8 12:57:00 1997 --- vm-user.el Tue Nov 14 08:59:22 2000 *************** *** 24,26 **** ! Nil is returned if the current buffer is not assocaited with any VM folder. --- 24,26 ---- ! Nil is returned if the current buffer is not associated with any VM folder. *** dist/vm-vars.el.dist Fri Nov 10 20:50:28 2000 --- vm-vars.el Tue Nov 14 20:40:26 2000 *************** *** 622,627 **** (defvar vm-mime-decode-for-preview t ! "*Non-nil value causes MIME decoding to happen when a message ! is previewed, instead of when it is displayed in full. ! `vm-auto-decode-mime-messages' must also be set non-nil for ! this variable to have effect.") --- 622,629 ---- (defvar vm-mime-decode-for-preview t ! "*Non-nil value causes partial MIME decoding to happen when a message ! is previewed, instead of when it is displayed in full. The point of ! this is if `vm-preview-lines' is set to a non-nil, non-zero ! value you can see readable text instead of a potentially inscrutable ! MIME jumble. `vm-auto-decode-mime-messages' must also be set non-nil ! for this variable to have effect.") *************** *** 1175,1177 **** "*Non-nil value causes VM to honor page delimiters (as specified by the ! Emacs page-delimiter variable) when scrolling through a message.") --- 1177,1199 ---- "*Non-nil value causes VM to honor page delimiters (as specified by the ! Emacs page-delimiter variable) when scrolling through a message. ! This means that when VM encounters a page delimiter when displaying a ! message all the screen lines below that delimiter will be blank until ! you scroll past that delimiter. When you scroll past the delimiter ! the text lines between the delimiter and the next delimiter will be ! displayed. Scrolling backward past a page delimiter reverses this ! process. ! ! A nil value means ignore page-delimiters.") ! ! (defvar vm-page-continuation-glyph "...hit SPACE to see more..." ! "*Glyph VM uses to indicate there is more text on the next page. ! When VM honors page delimiters (see `vm-honor-page-delimiters') ! and when VM is previewing a message (see `vm-preview-lines') VM ! indicates that there is more text by placing the glyph specified ! by this variable at the end of the displayed text. ! ! Under XEmacs, the value of `vm-page-continuation-glyph' can be a ! string or a glyph object. ! ! Under FSF Emacs, `vm-page-continuation-glyph' must be a string.") *************** *** 1216,1217 **** --- 1238,1244 ---- ((nil nil nil t) (nil nil nil nil)))))) + (vm-folders-summarize + ((((top . 70) (left . 70))) + (((- (0 0 80 10) (0 10 80 40)) + ((nil folders-summary) (nil message)) + ((nil nil nil t) (nil nil nil nil)))))) ) *************** *** 2143,2144 **** --- 2170,2214 ---- + (defvar vm-folders-summary-database "~/.vm.folders.db" + "*Name of Berkeley DB file used to store summary information about folders. + This file is consulted to produce the folders summary.") + + (defvar vm-folders-summary-format " %12f %4t total, %n new, %u unread\n" + "*String which specifies the folders summary format. + The string may contain the printf-like `%' conversion specifiers which + substitute information about the folder into the final summary line. + + Recognized specifiers are: + d - the number of deleted messages in the folder + f - the name of the folder without the directory part + n - the number of new messages in the folder + t - the total number of messages in the folder + u - the number of old but still unread messages in the folder + ( - starts a group, terminated by %). Useful for specifying + the field width and precision for the concatentation of + group of format specifiers. Example: \"%.35(%d, %t, %f%)\" + specifies a maximum display width of 35 characters for the + concatenation of the content description, content type and + suggested file name. + ) - ends a group. + + Use %% to get a single %. + + A numeric field width may be given between the `%' and the specifier; + this causes right justification of the substituted string. A negative field + width causes left justification. + + The field width may be followed by a `.' and a number specifying + the maximum allowed length of the substituted string. If the + string is longer than this value the right end of the string is + truncated. If the value is negative, the string is truncated on + the left instead of the right. + + The summary format need not be one line per message but it must end with + a newline, otherwise the message pointer will not be displayed correctly + in the summary window.") + + (defvar vm-folders-summary-directories nil + "*List of directories containing folders to be listed in the folders summary. + List the directories in the order you wish them to appear in the summary.") + (defvar vm-mutable-windows pop-up-windows *************** *** 2198,2199 **** --- 2268,2278 ---- + (defvar vm-frame-per-folders-summary nil + "*Non-nil value causes VM to display the 'all folders' summary in its own frame. + Nil means the `vm-folders-summarize' command will use the current frame. + + This variable has no meaning if you're not running under an Emacs + capable of displaying multiple real or virtual frames. Note that + Emacs supports multiple virtual frames on dumb terminals, and + VM will use them.") + (defvar vm-frame-per-composition t *************** *** 2269,2270 **** --- 2348,2351 ---- ``vm-visit-'' commands. + ``folders-summary'' specifies parameters for frames created by the + ``vm-folder-summarize'' command. ``primary-folder'' specifies parameters for the frame created by running *************** *** 2916,2917 **** --- 2997,2999 ---- (define-key map "h" 'vm-summarize) + (define-key map "H" 'vm-folders-summarize) (define-key map "\M-n" 'vm-next-unread-message) *************** *** 3056,3057 **** --- 3138,3142 ---- + (defvar vm-folders-summary-mode-map vm-mode-map + "Keymap for VM Folders Summary mode") + (defvar vm-mail-mode-map *************** *** 3123,3124 **** --- 3208,3211 ---- (make-variable-buffer-local 'vm-last-message-pointer) + (defvar vm-folders-summary-hash nil) + (defvar vm-folders-summary-buffer nil) (defvar vm-mail-buffer nil) *************** *** 3345,3346 **** --- 3432,3434 ---- ("vm-submit-bug-report") + ("vm-folders-summarize") ("vm-summarize") *************** *** 3503,3504 **** --- 3591,3593 ---- (defconst vm-mirror-data-vector-length 5) + (defconst vm-folder-summary-vector-length 15) (defconst vm-startup-message-lines *************** *** 3646,3650 **** (defvar vm-summary-overlay nil) (defvar vm-summary-tokenized-compiled-format-alist nil) (defvar vm-summary-untokenized-compiled-format-alist nil) ! (make-variable-buffer-local 'vm-summary-overlay) (defvar vm-thread-loop-obarray (make-vector 29 0)) --- 3735,3746 ---- (defvar vm-summary-overlay nil) + (make-variable-buffer-local 'vm-summary-overlay) (defvar vm-summary-tokenized-compiled-format-alist nil) (defvar vm-summary-untokenized-compiled-format-alist nil) ! (defvar vm-folders-summary-compiled-format-alist nil) ! (defvar vm-folders-summary-overlay nil) ! (defvar vm-page-end-overlay nil) ! (make-variable-buffer-local 'vm-page-end-overlay) ! (defvar vm-begin-glyph-property (if (fboundp 'extent-property) ! 'begin-glyph ! 'before-string)) (defvar vm-thread-loop-obarray (make-vector 29 0)) *** dist/vm-version.el.dist Fri Nov 10 20:50:28 2000 --- vm-version.el Tue Nov 14 20:41:08 2000 *************** *** 4,6 **** ! (defconst vm-version "6.82" "Version number of VM.") --- 4,6 ---- ! (defconst vm-version "6.83" "Version number of VM.") *** dist/vm-window.el.dist Tue Sep 5 12:19:41 2000 --- vm-window.el Mon Nov 13 21:27:00 2000 *************** *** 159,161 **** (selected-frame (vm-selected-frame)) ! summary message composition edit config) (while (and tags (null config)) --- 159,161 ---- (selected-frame (vm-selected-frame)) ! folders-summary summary message composition edit config) (while (and tags (null config)) *************** *** 172,173 **** --- 172,178 ---- (setq message vm-mail-buffer))) + ((eq major-mode 'vm-folders-summary-mode) + (if (or (null vm-mail-buffer) (null (buffer-name vm-mail-buffer))) + (throw 'done nil) + (setq folders-summary (current-buffer)) + (setq message vm-mail-buffer))) ((eq major-mode 'vm-mode) *************** *** 196,197 **** --- 201,204 ---- (vm-check-for-killed-summary) + (or folders-summary (setq folders-summary (or vm-folders-summary-buffer + nonexistent))) (or summary (setq summary (or vm-summary-buffer nonexistent-summary))) *************** *** 270,271 **** --- 277,280 ---- 'summary) + ((eq major-mode 'vm-folders-summary-mode) + 'folders-summary) ((eq major-mode 'mail-mode) *************** *** 519,520 **** --- 528,542 ---- (vm-goto-new-frame 'summary) + (vm-set-hooks-for-frame-deletion)) + (save-excursion + (select-window w) + (and vm-warp-mouse-to-new-frame + (vm-warp-mouse-to-frame-maybe (vm-window-frame w)))))))) + + (defun vm-goto-new-folders-summary-frame-maybe () + (if (and vm-mutable-frames vm-frame-per-folders-summary + (vm-multiple-frames-possible-p)) + (let ((w (vm-get-buffer-window vm-folders-summary-buffer))) + (if (null w) + (progn + (vm-goto-new-frame 'folders-summary) (vm-set-hooks-for-frame-deletion))