]> code.delx.au - gnu-emacs/blobdiff - lisp/mail/mspools.el
Standardize some more license notices
[gnu-emacs] / lisp / mail / mspools.el
index 670439ff953603351224ec410113d71c7f7428aa..6f8c444651c6e3f4af624c53ae2389ae2fcabb94 100644 (file)
@@ -1,7 +1,6 @@
 ;;; 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-2012  Free Software Foundation, Inc.
 
 ;; Author: Stephen Eglen <stephen@gnu.org>
 ;; Maintainer: Stephen Eglen <stephen@gnu.org>
@@ -84,7 +83,7 @@
 ;; Useful settings for VM
 ;; vm-auto-get-new-mail should be t (the default).
 
-;; Acknowledgements
+;; Acknowledgments
 ;; Thanks to jond@mitre.org (Jonathan Doughty) for help with code for
 ;; setting up vm-spool-files.
 
 )
 
 (defcustom mspools-update nil
-  "*Non-nil means update *spools* buffer after visiting any folder."
+  "Non-nil means update *spools* buffer after visiting any folder."
   :type 'boolean
   :group 'mspools)
 
 (defcustom mspools-suffix "spool"
-  "*Extension used for spool files (not including full stop)."
+  "Extension used for spool files (not including full stop)."
   :type 'string
   :group 'mspools)
 
 (defcustom mspools-using-vm  (fboundp 'vm)
-  "*Non-nil if VM is used as mail reader, otherwise RMAIL is used."
+  "Non-nil if VM is used as mail reader, otherwise RMAIL is used."
   :type 'boolean
   :group 'mspools)
 
   (if (boundp 'vm-folder-directory)
       vm-folder-directory
     "~/MAIL/")
-  "*Directory where mail folders are kept.  Ensure it has a trailing /.
+  "Directory where mail folders are kept.  Ensure it has a trailing /.
 Defaults to `vm-folder-directory' if bound else to ~/MAIL/."
   :type 'directory
   :group 'mspools)
@@ -152,7 +151,7 @@ Defaults to `vm-folder-directory' if bound else to ~/MAIL/."
 (defcustom mspools-vm-system-mail (or (getenv "MAIL")
                                      (concat rmail-spool-directory
                                              (user-login-name)))
-  "*Spool file for main mailbox.  Only used by VM.
+  "Spool file for main mailbox.  Only used by VM.
 This needs to be set to your primary mail spool - mspools will not run
 without it.  By default this will be set to the environment variable
 $MAIL.  Otherwise it will use `rmail-spool-directory' to guess where
@@ -216,12 +215,12 @@ your primary spool is.  If this fails, set it to something like
 
     ;; 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
@@ -280,10 +279,7 @@ Buffer is not displayed if SHOW is non-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
@@ -323,11 +319,7 @@ Buffer is not displayed if SHOW is non-nil."
 
 (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
@@ -411,5 +403,4 @@ nil."
 
 (provide 'mspools)
 
-;; arch-tag: 8990b3ee-68c8-4892-98f1-51a735c8bac6
 ;;; mspools.el ends here