;;; mspools.el --- show mail spools waiting to be read
-;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org>
;; Maintainer: Stephen Eglen <stephen@gnu.org>
(define-key map "q" 'mspools-quit)
(define-key map "n" 'next-line)
(define-key map "p" 'previous-line)
- (define-key map "g" 'revert-buffer))
+ (define-key map "g" 'revert-buffer)
+ map)
"Keymap for the *spools* buffer.")
;;; Code
;; Mailing list inboxes
;; must have VM already loaded to get vm-folder-directory.
- (mapcar '(lambda (s)
- "make the appropriate entry for vm-spool-files"
- (list
- (concat mspools-folder-directory s)
- (concat mspools-folder-directory s "." mspools-suffix)
- (concat mspools-folder-directory s ".crash")))
+ (mapcar (lambda (s)
+ "make the appropriate entry for vm-spool-files"
+ (list
+ (concat mspools-folder-directory s)
+ (concat mspools-folder-directory s "." mspools-suffix)
+ (concat mspools-folder-directory s ".crash")))
;; So I create a vm-spool-files entry for each of those mail drops
(mapcar 'file-name-sans-extension
(directory-files mspools-folder-directory nil
))
(message "folder %s spool %s" folder-name spool-name)
- (if (eq (count-lines (point-min)
- (save-excursion
- (end-of-line)
- (point)))
+ (if (eq (count-lines (point-min) (point-at-eol))
mspools-files-len)
(forward-line (- 1 mspools-files-len)) ;back to top of list
;; else just on to next line
(defun mspools-get-spool-name ()
"Return the name of the spool on the current line."
- (let ((line-num (1- (count-lines (point-min)
- (save-excursion
- (end-of-line)
- (point))
- ))))
+ (let ((line-num (1- (count-lines (point-min) (point-at-eol)))))
(car (nth line-num mspools-files))))
;;; Spools mode functions
(provide 'mspools)
-;; arch-tag: 8990b3ee-68c8-4892-98f1-51a735c8bac6
;;; mspools.el ends here