diff options
| author | Deepak Goel | 2009-03-13 20:28:15 +0000 |
|---|---|---|
| committer | Deepak Goel | 2009-03-13 20:28:15 +0000 |
| commit | 7c730dd6e1f4a7bd904aee53d295d8352b48b328 (patch) | |
| tree | 1b87623f342ac4b515471672450569f2989c2d9c | |
| parent | 4537363ca5f2b030f14549ba25608d367ce7d2f1 (diff) | |
| download | emacs-7c730dd6e1f4a7bd904aee53d295d8352b48b328.tar.gz emacs-7c730dd6e1f4a7bd904aee53d295d8352b48b328.zip | |
m-v: use lists to pass things around rather than values.
| -rw-r--r-- | lisp/mh-e/ChangeLog | 22 | ||||
| -rw-r--r-- | lisp/mh-e/mh-search.el | 4 | ||||
| -rw-r--r-- | lisp/mh-e/mh-seq.el | 13 | ||||
| -rw-r--r-- | lisp/mh-e/mh-speed.el | 3 | ||||
| -rw-r--r-- | lisp/mh-e/mh-thread.el | 6 | ||||
| -rw-r--r-- | lisp/mh-e/mh-xface.el | 7 |
6 files changed, 40 insertions, 15 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 29238ff424d..51123442480 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2009-03-13 D. Goel <deego3@gmail.com> | ||
| 2 | |||
| 3 | * mh-seq.el (mh-folder-size-flist): Use (values-list) in m-v call | ||
| 4 | to list. | ||
| 5 | |||
| 6 | * mh-speed.el (mh-speed-parse-flists-output): Ditto. | ||
| 7 | * mh-xface.el (mh-face-display-function): Ditto. | ||
| 8 | * mh-search.el (mh-index-parse-search-regexp): Ditto. | ||
| 9 | |||
| 10 | |||
| 11 | * mh-thread.el (mh-thread-generate): Ditto. | ||
| 12 | |||
| 13 | * mh-seq.el (mh-parse-flist-output-line): Return list rather than values. We | ||
| 14 | want to avoid emacs using m-v facilities. | ||
| 15 | (mh-folder-size-folder): Ditto. | ||
| 16 | (mh-parse-flist-output-line): Ditto. | ||
| 17 | * mh-thread.el (mh-thread-prune-subject): Ditto. | ||
| 18 | * mh-xface.el (mh-picon-get-image): Ditto. | ||
| 19 | (mh-picon-file-contents): Ditto. | ||
| 20 | * mh-search.el (mh-index-evaluate): Ditto. | ||
| 21 | |||
| 22 | |||
| 1 | 2009-01-27 Bill Wohler <wohler@newt.com> | 23 | 2009-01-27 Bill Wohler <wohler@newt.com> |
| 2 | 24 | ||
| 3 | * mh-funcs.el (mh-pack-folder): Fix docstring. | 25 | * mh-funcs.el (mh-pack-folder): Fix docstring. |
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el index 1d5433e950a..975fd62a458 100644 --- a/lisp/mh-e/mh-search.el +++ b/lisp/mh-e/mh-search.el | |||
| @@ -717,7 +717,7 @@ parsed." | |||
| 717 | ((equal token "and") (push 'and op-stack)) | 717 | ((equal token "and") (push 'and op-stack)) |
| 718 | ((equal token ")") | 718 | ((equal token ")") |
| 719 | (multiple-value-setq (op-stack operand-stack) | 719 | (multiple-value-setq (op-stack operand-stack) |
| 720 | (mh-index-evaluate op-stack operand-stack)) | 720 | (values-list (mh-index-evaluate op-stack operand-stack))) |
| 721 | (when (eq (car op-stack) 'not) | 721 | (when (eq (car op-stack) 'not) |
| 722 | (setq op-stack (cdr op-stack)) | 722 | (setq op-stack (cdr op-stack)) |
| 723 | (push `(not ,(pop operand-stack)) operand-stack)) | 723 | (push `(not ,(pop operand-stack)) operand-stack)) |
| @@ -767,7 +767,7 @@ parsed." | |||
| 767 | (while op-stack | 767 | (while op-stack |
| 768 | (setq op (pop op-stack)) | 768 | (setq op (pop op-stack)) |
| 769 | (cond ((eq op 'paren) | 769 | (cond ((eq op 'paren) |
| 770 | (return-from mh-index-evaluate (values op-stack operand-stack))) | 770 | (return-from mh-index-evaluate (list op-stack operand-stack))) |
| 771 | ((eq op 'not) | 771 | ((eq op 'not) |
| 772 | (push `(not ,(pop operand-stack)) operand-stack)) | 772 | (push `(not ,(pop operand-stack)) operand-stack)) |
| 773 | ((or (eq op 'and) (eq op 'or)) | 773 | ((or (eq op 'and) (eq op 'or)) |
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index 15363505fb0..dc7154adf2a 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el | |||
| @@ -746,9 +746,10 @@ completion is over." | |||
| 746 | "-norecurse" folder "-sequence" (symbol-name mh-unseen-seq)) | 746 | "-norecurse" folder "-sequence" (symbol-name mh-unseen-seq)) |
| 747 | (goto-char (point-min)) | 747 | (goto-char (point-min)) |
| 748 | (multiple-value-bind (folder unseen total) | 748 | (multiple-value-bind (folder unseen total) |
| 749 | (mh-parse-flist-output-line | 749 | (values-list |
| 750 | (buffer-substring (point) (mh-line-end-position))) | 750 | (mh-parse-flist-output-line |
| 751 | (values total unseen folder)))) | 751 | (buffer-substring (point) (mh-line-end-position)))) |
| 752 | (list total unseen folder)))) | ||
| 752 | 753 | ||
| 753 | (defun mh-folder-size-folder (folder) | 754 | (defun mh-folder-size-folder (folder) |
| 754 | "Find size of FOLDER using \"folder\"." | 755 | "Find size of FOLDER using \"folder\"." |
| @@ -759,8 +760,8 @@ completion is over." | |||
| 759 | "-norecurse" folder) | 760 | "-norecurse" folder) |
| 760 | (goto-char (point-min)) | 761 | (goto-char (point-min)) |
| 761 | (if (re-search-forward " has \\([0-9]+\\) " nil t) | 762 | (if (re-search-forward " has \\([0-9]+\\) " nil t) |
| 762 | (values (string-to-number (match-string 1)) u folder) | 763 | (list (string-to-number (match-string 1)) u folder) |
| 763 | (values 0 u folder))))) | 764 | (list 0 u folder))))) |
| 764 | 765 | ||
| 765 | ;;;###mh-autoload | 766 | ;;;###mh-autoload |
| 766 | (defun mh-parse-flist-output-line (line &optional current-folder) | 767 | (defun mh-parse-flist-output-line (line &optional current-folder) |
| @@ -788,7 +789,7 @@ folders whose names end with a '+' character." | |||
| 788 | (when (and (equal (aref folder (1- (length folder))) ?+) | 789 | (when (and (equal (aref folder (1- (length folder))) ?+) |
| 789 | (equal current-folder folder)) | 790 | (equal current-folder folder)) |
| 790 | (setq folder (substring folder 0 (1- (length folder))))) | 791 | (setq folder (substring folder 0 (1- (length folder))))) |
| 791 | (values (format "+%s" folder) unseen total))))))) | 792 | (list (format "+%s" folder) unseen total))))))) |
| 792 | 793 | ||
| 793 | ;;;###mh-autoload | 794 | ;;;###mh-autoload |
| 794 | (defun mh-read-folder-sequences (folder save-refiles) | 795 | (defun mh-read-folder-sequences (folder save-refiles) |
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index 588df7229c0..f806fb43e72 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el | |||
| @@ -455,7 +455,8 @@ be handled next." | |||
| 455 | (substring output position line-end)) | 455 | (substring output position line-end)) |
| 456 | mh-speed-partial-line "") | 456 | mh-speed-partial-line "") |
| 457 | (multiple-value-setq (folder unseen total) | 457 | (multiple-value-setq (folder unseen total) |
| 458 | (mh-parse-flist-output-line line mh-speed-current-folder)) | 458 | (values-list |
| 459 | (mh-parse-flist-output-line line mh-speed-current-folder))) | ||
| 459 | (when (and folder unseen total | 460 | (when (and folder unseen total |
| 460 | (let ((old-pair (gethash folder mh-speed-flists-cache))) | 461 | (let ((old-pair (gethash folder mh-speed-flists-cache))) |
| 461 | (or (not (equal (car old-pair) unseen)) | 462 | (or (not (equal (car old-pair) unseen)) |
diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el index 4a691511d73..1a9ad8f6558 100644 --- a/lisp/mh-e/mh-thread.el +++ b/lisp/mh-e/mh-thread.el | |||
| @@ -493,8 +493,8 @@ not put into a single thread." | |||
| 493 | (setq subject-pruned-flag t) | 493 | (setq subject-pruned-flag t) |
| 494 | (setq subject (substring subject 0 (match-beginning 0)))) | 494 | (setq subject (substring subject 0 (match-beginning 0)))) |
| 495 | ;; Canonicalize subject only if it is non-empty | 495 | ;; Canonicalize subject only if it is non-empty |
| 496 | (cond ((equal subject "") (values subject subject-pruned-flag)) | 496 | (cond ((equal subject "") (list subject subject-pruned-flag)) |
| 497 | (t (values | 497 | (t (list |
| 498 | (or (gethash subject mh-thread-subject-hash) | 498 | (or (gethash subject mh-thread-subject-hash) |
| 499 | (setf (gethash subject mh-thread-subject-hash) subject)) | 499 | (setf (gethash subject mh-thread-subject-hash) subject)) |
| 500 | subject-pruned-flag))))) | 500 | subject-pruned-flag))))) |
| @@ -618,7 +618,7 @@ Only information about messages in MSG-LIST are added to the tree." | |||
| 618 | (return-from process-message)) | 618 | (return-from process-message)) |
| 619 | (unless (integerp index) (return)) ;Error message here | 619 | (unless (integerp index) (return)) ;Error message here |
| 620 | (multiple-value-setq (subject subject-re-p) | 620 | (multiple-value-setq (subject subject-re-p) |
| 621 | (mh-thread-prune-subject subject)) | 621 | (values-list (mh-thread-prune-subject subject))) |
| 622 | (setq in-reply-to (mh-thread-process-in-reply-to in-reply-to)) | 622 | (setq in-reply-to (mh-thread-process-in-reply-to in-reply-to)) |
| 623 | (setq refs (loop for x in (append (split-string refs) in-reply-to) | 623 | (setq refs (loop for x in (append (split-string refs) in-reply-to) |
| 624 | when (string-match mh-message-id-regexp x) | 624 | when (string-match mh-message-id-regexp x) |
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el index bbe974ccf4d..b63a1966266 100644 --- a/lisp/mh-e/mh-xface.el +++ b/lisp/mh-e/mh-xface.el | |||
| @@ -76,7 +76,8 @@ in this order is used." | |||
| 76 | (x-face (setq raw (mh-uncompface x-face) | 76 | (x-face (setq raw (mh-uncompface x-face) |
| 77 | type 'pbm)) | 77 | type 'pbm)) |
| 78 | (url (setq type 'url)) | 78 | (url (setq type 'url)) |
| 79 | (t (multiple-value-setq (type raw) (mh-picon-get-image)))) | 79 | (t (multiple-value-setq (type raw) |
| 80 | (values-list (mh-picon-get-image))))) | ||
| 80 | (when type | 81 | (when type |
| 81 | (goto-char (point-min)) | 82 | (goto-char (point-min)) |
| 82 | (when (re-search-forward "^from:" (point-max) t) | 83 | (when (re-search-forward "^from:" (point-max) t) |
| @@ -275,8 +276,8 @@ elements of the list are nil." | |||
| 275 | (let ((type (and (string-match ".*\\.\\(...\\)$" file) | 276 | (let ((type (and (string-match ".*\\.\\(...\\)$" file) |
| 276 | (intern (match-string 1 file))))) | 277 | (intern (match-string 1 file))))) |
| 277 | (insert-file-contents-literally file) | 278 | (insert-file-contents-literally file) |
| 278 | (values type (buffer-string)))) | 279 | (list type (buffer-string)))) |
| 279 | (values nil nil))) | 280 | (list nil nil))) |
| 280 | 281 | ||
| 281 | 282 | ||
| 282 | 283 | ||