]> code.delx.au - gnu-emacs/blobdiff - lisp/mh-e/mh-seq.el
Go back to grave quoting in source-code docstrings etc.
[gnu-emacs] / lisp / mh-e / mh-seq.el
index 2953a35854216171a23878777dc8b16976260953..259f60de2d5b952bce3bd505ec4cd4048a48981c 100644 (file)
@@ -1,7 +1,6 @@
 ;;; mh-seq.el --- MH-E sequences support
 
-;; Copyright (C) 1993, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008, 2009  Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -145,8 +144,7 @@ The list appears in a buffer named \"*MH-E Sequences*\"."
         (seq-list mh-seq-list)
         (max-len 0))
     (with-output-to-temp-buffer temp-buffer
-      (save-excursion
-        (set-buffer temp-buffer)
+      (with-current-buffer temp-buffer
         (erase-buffer)
         (message "Listing sequences ...")
         (insert "Sequences in folder " folder ":\n")
@@ -200,7 +198,8 @@ MESSAGE appears."
                         " "))))
 
 ;; Shush compiler.
-(defvar tool-bar-mode)                  ; XEmacs
+(mh-do-in-xemacs
+  (defvar tool-bar-mode))
 (defvar tool-bar-map)
 
 ;;;###mh-autoload
@@ -391,7 +390,7 @@ then a non-empty sequence is read."
   "Read and return a sequence name.
 Prompt with PROMPT, raise an error if the sequence is empty and
 the NOT-EMPTY flag is non-nil, and supply an optional DEFAULT
-sequence. A reply of '%' defaults to the first sequence
+sequence. A reply of `%' defaults to the first sequence
 containing the current message."
   (let* ((input (completing-read (format "%s sequence%s: " prompt
                                          (if default
@@ -745,9 +744,10 @@ completion is over."
                   "-norecurse" folder "-sequence" (symbol-name mh-unseen-seq))
     (goto-char (point-min))
     (multiple-value-bind (folder unseen total)
-        (mh-parse-flist-output-line
-         (buffer-substring (point) (mh-line-end-position)))
-      (values total unseen folder))))
+        (values-list
+         (mh-parse-flist-output-line
+          (buffer-substring (point) (mh-line-end-position))))
+      (list total unseen folder))))
 
 (defun mh-folder-size-folder (folder)
   "Find size of FOLDER using \"folder\"."
@@ -758,15 +758,15 @@ completion is over."
                     "-norecurse" folder)
       (goto-char (point-min))
       (if (re-search-forward " has \\([0-9]+\\) " nil t)
-          (values (string-to-number (match-string 1)) u folder)
-        (values 0 u folder)))))
+          (list (string-to-number (match-string 1)) u folder)
+        (list 0 u folder)))))
 
 ;;;###mh-autoload
 (defun mh-parse-flist-output-line (line &optional current-folder)
   "Parse LINE to generate folder name, unseen messages and total messages.
 If CURRENT-FOLDER is non-nil then it contains the current folder
 name and it is used to avoid problems in corner cases involving
-folders whose names end with a '+' character."
+folders whose names end with a `+' character."
   (with-temp-buffer
     (insert line)
     (goto-char (point-max))
@@ -787,7 +787,7 @@ folders whose names end with a '+' character."
             (when (and (equal (aref folder (1- (length folder))) ?+)
                        (equal current-folder folder))
               (setq folder (substring folder 0 (1- (length folder)))))
-            (values (format "+%s" folder) unseen total)))))))
+            (list (format "+%s" folder) unseen total)))))))
 
 ;;;###mh-autoload
 (defun mh-read-folder-sequences (folder save-refiles)
@@ -818,7 +818,7 @@ that note messages to be refiled."
   "Return a list of message numbers from point to the end of the line.
 Expands ranges into set of individual numbers."
   (let ((msgs ())
-        (end-of-line (save-excursion (end-of-line) (point)))
+        (end-of-line (point-at-eol))
         num)
     (while (re-search-forward "[0-9]+" end-of-line t)
       (setq num (string-to-number (buffer-substring (match-beginning 0)
@@ -1016,5 +1016,4 @@ removed."
 ;; sentence-end-double-space: nil
 ;; End:
 
-;; arch-tag: 8e952711-01a2-485b-bf21-c9e3ad4de942
 ;;; mh-seq.el ends here