;;; mh-seq.el --- MH-E sequences support
-;; Copyright (C) 1993, 1995,
-;; 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 2001-2011 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Macros
-(defmacro mh-make-seq (name msgs)
+(defsubst mh-make-seq (name msgs)
"Create sequence NAME with the given MSGS."
- (list 'cons name msgs))
+ (cons name msgs))
-(defmacro mh-seq-name (sequence)
+(defsubst mh-seq-name (sequence)
"Extract sequence name from the given SEQUENCE."
- (list 'car sequence))
+ (car sequence))
\f
(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")
" "))))
;; Shush compiler.
-(defvar tool-bar-mode) ; XEmacs
+(mh-do-in-xemacs
+ (defvar tool-bar-mode))
+(defvar tool-bar-map)
;;;###mh-autoload
(defun mh-narrow-to-seq (sequence)
"-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\"."
"-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)
(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)
"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)
;; sentence-end-double-space: nil
;; End:
-;; arch-tag: 8e952711-01a2-485b-bf21-c9e3ad4de942
;;; mh-seq.el ends here