Commit 7c730dd6 authored by Deepak Goel's avatar Deepak Goel
Browse files

m-v: use lists to pass things around rather than values.

parent 4537363c
2009-03-13 D. Goel <>
* 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 <>
* mh-funcs.el (mh-pack-folder): Fix docstring.
......@@ -717,7 +717,7 @@ parsed."
((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 @@ parsed."
(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))
......@@ -746,9 +746,10 @@ completion is over."
"-norecurse" folder "-sequence" (symbol-name mh-unseen-seq))
(goto-char (point-min))
(multiple-value-bind (folder unseen total)
(buffer-substring (point) (mh-line-end-position)))
(values total unseen folder))))
(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 @@ 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)))))
(defun mh-parse-flist-output-line (line &optional current-folder)
......@@ -788,7 +789,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)))))))
(defun mh-read-folder-sequences (folder save-refiles)
......@@ -455,7 +455,8 @@ be handled next."
(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))
(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))
......@@ -493,8 +493,8 @@ not put into a single thread."
(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))
......@@ -618,7 +618,7 @@ Only information about messages in MSG-LIST are added to the tree."
(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)
......@@ -76,7 +76,8 @@ in this order is used."
(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 @@ elements of the list are nil."
(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)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment