changeset 102537:6837adfb2772

m-v: use lists to pass things around rather than values.
author Deepak Goel <deego@gnufans.org>
date Fri, 13 Mar 2009 20:28:15 +0000
parents 97eebd9d88a8
children d1b49e289bbf
files lisp/mh-e/ChangeLog lisp/mh-e/mh-search.el lisp/mh-e/mh-seq.el lisp/mh-e/mh-speed.el lisp/mh-e/mh-thread.el lisp/mh-e/mh-xface.el
diffstat 6 files changed, 40 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mh-e/ChangeLog	Fri Mar 13 20:04:11 2009 +0000
+++ b/lisp/mh-e/ChangeLog	Fri Mar 13 20:28:15 2009 +0000
@@ -1,3 +1,25 @@
+2009-03-13  D. Goel  <deego3@gmail.com>
+
+	* mh-seq.el (mh-folder-size-flist): Use (values-list) in m-v call
+	to list. 
+
+	* mh-speed.el (mh-speed-parse-flists-output): Ditto.
+	* mh-xface.el (mh-face-display-function): Ditto.
+	* mh-search.el (mh-index-parse-search-regexp): Ditto.
+
+
+	* mh-thread.el (mh-thread-generate): Ditto.
+
+	* mh-seq.el (mh-parse-flist-output-line): Return list rather than values. We
+						  want to avoid emacs using m-v facilities.
+	(mh-folder-size-folder):  Ditto.
+	(mh-parse-flist-output-line): Ditto.
+	* mh-thread.el (mh-thread-prune-subject): Ditto.
+	* mh-xface.el (mh-picon-get-image): Ditto.
+	(mh-picon-file-contents): Ditto.
+	* mh-search.el (mh-index-evaluate): Ditto.
+
+
 2009-01-27  Bill Wohler  <wohler@newt.com>
 
 	* mh-funcs.el (mh-pack-folder): Fix docstring.
--- a/lisp/mh-e/mh-search.el	Fri Mar 13 20:04:11 2009 +0000
+++ b/lisp/mh-e/mh-search.el	Fri Mar 13 20:28:15 2009 +0000
@@ -717,7 +717,7 @@
               ((equal token "and") (push 'and op-stack))
               ((equal token ")")
                (multiple-value-setq (op-stack operand-stack)
-                 (mh-index-evaluate op-stack operand-stack))
+                 (values-list (mh-index-evaluate op-stack operand-stack)))
                (when (eq (car op-stack) 'not)
                  (setq op-stack (cdr op-stack))
                  (push `(not ,(pop operand-stack)) operand-stack))
@@ -767,7 +767,7 @@
       (while op-stack
         (setq op (pop op-stack))
         (cond ((eq op 'paren)
-               (return-from mh-index-evaluate (values op-stack operand-stack)))
+               (return-from mh-index-evaluate (list op-stack operand-stack)))
               ((eq op 'not)
                (push `(not ,(pop operand-stack)) operand-stack))
               ((or (eq op 'and) (eq op 'or))
--- a/lisp/mh-e/mh-seq.el	Fri Mar 13 20:04:11 2009 +0000
+++ b/lisp/mh-e/mh-seq.el	Fri Mar 13 20:28:15 2009 +0000
@@ -746,9 +746,10 @@
                   "-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\"."
@@ -759,8 +760,8 @@
                     "-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)
@@ -788,7 +789,7 @@
             (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)
--- a/lisp/mh-e/mh-speed.el	Fri Mar 13 20:04:11 2009 +0000
+++ b/lisp/mh-e/mh-speed.el	Fri Mar 13 20:28:15 2009 +0000
@@ -455,7 +455,8 @@
                              (substring output position line-end))
                 mh-speed-partial-line "")
           (multiple-value-setq (folder unseen total)
-            (mh-parse-flist-output-line line mh-speed-current-folder))
+            (values-list 
+             (mh-parse-flist-output-line line mh-speed-current-folder)))
           (when (and folder unseen total
                      (let ((old-pair (gethash folder mh-speed-flists-cache)))
                        (or (not (equal (car old-pair) unseen))
--- a/lisp/mh-e/mh-thread.el	Fri Mar 13 20:04:11 2009 +0000
+++ b/lisp/mh-e/mh-thread.el	Fri Mar 13 20:28:15 2009 +0000
@@ -493,8 +493,8 @@
       (setq subject-pruned-flag t)
       (setq subject (substring subject 0 (match-beginning 0))))
     ;; Canonicalize subject only if it is non-empty
-    (cond ((equal subject "") (values subject subject-pruned-flag))
-          (t (values
+    (cond ((equal subject "") (list subject subject-pruned-flag))
+          (t (list
               (or (gethash subject mh-thread-subject-hash)
                   (setf (gethash subject mh-thread-subject-hash) subject))
               subject-pruned-flag)))))
@@ -618,7 +618,7 @@
                 (return-from process-message))
               (unless (integerp index) (return)) ;Error message here
               (multiple-value-setq (subject subject-re-p)
-                (mh-thread-prune-subject subject))
+                (values-list (mh-thread-prune-subject subject)))
               (setq in-reply-to (mh-thread-process-in-reply-to in-reply-to))
               (setq refs (loop for x in (append (split-string refs) in-reply-to)
                                when (string-match mh-message-id-regexp x)
--- a/lisp/mh-e/mh-xface.el	Fri Mar 13 20:04:11 2009 +0000
+++ b/lisp/mh-e/mh-xface.el	Fri Mar 13 20:28:15 2009 +0000
@@ -76,7 +76,8 @@
             (x-face (setq raw (mh-uncompface x-face)
                           type 'pbm))
             (url (setq type 'url))
-            (t (multiple-value-setq (type raw) (mh-picon-get-image))))
+            (t (multiple-value-setq (type raw) 
+                 (values-list (mh-picon-get-image)))))
       (when type
         (goto-char (point-min))
         (when (re-search-forward "^from:" (point-max) t)
@@ -275,8 +276,8 @@
         (let ((type (and (string-match ".*\\.\\(...\\)$" file)
                          (intern (match-string 1 file)))))
           (insert-file-contents-literally file)
-          (values type (buffer-string))))
-    (values nil nil)))
+          (list type (buffer-string))))
+    (list nil nil)))