/[emacs]/emacs/lisp/mh-e/mh-seq.el
ViewVC logotype

Diff of /emacs/lisp/mh-e/mh-seq.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by ttn, Wed May 18 11:01:20 2005 UTC revision 1.9 by wohler, Sat May 28 22:04:54 2005 UTC
# Line 1  Line 1 
1  ;;; mh-seq.el --- MH-E sequences support  ;;; mh-seq.el --- MH-E sequences support
2    
3  ;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.  ;; Copyright (C) 1993, 1995,
4    ;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5    
6  ;; Author: Bill Wohler <wohler@newt.com>  ;; Author: Bill Wohler <wohler@newt.com>
7  ;; Maintainer: Bill Wohler <wohler@newt.com>  ;; Maintainer: Bill Wohler <wohler@newt.com>
# Line 195  redone to get the new thread tree. This Line 196  redone to get the new thread tree. This
196              (insert "\n"))              (insert "\n"))
197            (setq seq-list (cdr seq-list)))            (setq seq-list (cdr seq-list)))
198          (goto-char (point-min))          (goto-char (point-min))
199          (view-mode 1)          (view-mode-enter)
200          (setq view-exit-action 'kill-buffer)          (setq view-exit-action 'kill-buffer)
201          (message "Listing sequences...done")))))          (message "Listing sequences...done")))))
202    
# Line 788  This function can only be used the folde Line 789  This function can only be used the folde
789  If no prefix arg is given, then return DEFAULT."  If no prefix arg is given, then return DEFAULT."
790    (let ((default-string (loop for x in default concat (format " %s" x))))    (let ((default-string (loop for x in default concat (format " %s" x))))
791      (if (or current-prefix-arg (equal default-string ""))      (if (or current-prefix-arg (equal default-string ""))
792          (delete "" (split-string (read-string "Pick expression: "          (mh-pick-args-list (read-string "Pick expression: "
793                                                default-string)))                                          default-string))
794        default)))        default)))
795    
796    (defun mh-pick-args-list (s)
797      "Form list by grouping elements in string S suitable for pick arguments.
798    For example, the string \"-subject a b c -from Joe User <user@domain.com>\"
799    is converted to (\"-subject\" \"a b c\" \"-from\"
800    \"Joe User <user@domain.com>\""
801      (let ((full-list (split-string s))
802            current-arg collection arg-list)
803        (while full-list
804          (setq current-arg (car full-list))
805          (if (null (string-match "^-" current-arg))
806              (setq collection
807                    (if (null collection)
808                        current-arg
809                      (format "%s %s" collection current-arg)))
810            (when collection
811              (setq arg-list (append arg-list (list collection)))
812              (setq collection nil))
813            (setq arg-list (append arg-list (list current-arg))))
814          (setq full-list (cdr full-list)))
815        (when collection
816          (setq arg-list (append arg-list (list collection))))
817        arg-list))
818    
819  ;;;###mh-autoload  ;;;###mh-autoload
820  (defun mh-narrow-to-subject (&optional pick-expr)  (defun mh-narrow-to-subject (&optional pick-expr)
821    "Limit to messages with same subject.    "Limit to messages with same subject.
# Line 1315  All messages after START-POINT are added Line 1339  All messages after START-POINT are added
1339            (old-buffer-modified-flag (buffer-modified-p)))            (old-buffer-modified-flag (buffer-modified-p)))
1340        (delete-region (point-min) (point-max))        (delete-region (point-min) (point-max))
1341        (mh-thread-print-scan-lines thread-tree)        (mh-thread-print-scan-lines thread-tree)
1342          (mh-notate-user-sequences)
1343        (mh-notate-deleted-and-refiled)        (mh-notate-deleted-and-refiled)
1344        (mh-notate-cur)        (mh-notate-cur)
1345        (set-buffer-modified-p old-buffer-modified-flag))))        (set-buffer-modified-p old-buffer-modified-flag))))

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26