emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mh-e/mh-seq.el


From: Bill Wohler
Subject: [Emacs-diffs] Changes to emacs/lisp/mh-e/mh-seq.el
Date: Sat, 28 May 2005 18:04:59 -0400

Index: emacs/lisp/mh-e/mh-seq.el
diff -c emacs/lisp/mh-e/mh-seq.el:1.8 emacs/lisp/mh-e/mh-seq.el:1.9
*** emacs/lisp/mh-e/mh-seq.el:1.8       Wed May 18 11:01:20 2005
--- emacs/lisp/mh-e/mh-seq.el   Sat May 28 22:04:54 2005
***************
*** 1,6 ****
  ;;; mh-seq.el --- MH-E sequences support
  
! ;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
  
  ;; Author: Bill Wohler <address@hidden>
  ;; Maintainer: Bill Wohler <address@hidden>
--- 1,7 ----
  ;;; mh-seq.el --- MH-E sequences support
  
! ;; Copyright (C) 1993, 1995,
! ;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
  
  ;; Author: Bill Wohler <address@hidden>
  ;; Maintainer: Bill Wohler <address@hidden>
***************
*** 195,201 ****
              (insert "\n"))
            (setq seq-list (cdr seq-list)))
          (goto-char (point-min))
!         (view-mode 1)
          (setq view-exit-action 'kill-buffer)
          (message "Listing sequences...done")))))
  
--- 196,202 ----
              (insert "\n"))
            (setq seq-list (cdr seq-list)))
          (goto-char (point-min))
!         (view-mode-enter)
          (setq view-exit-action 'kill-buffer)
          (message "Listing sequences...done")))))
  
***************
*** 788,797 ****
  If no prefix arg is given, then return DEFAULT."
    (let ((default-string (loop for x in default concat (format " %s" x))))
      (if (or current-prefix-arg (equal default-string ""))
!         (delete "" (split-string (read-string "Pick expression: "
!                                               default-string)))
        default)))
  
  ;;;###mh-autoload
  (defun mh-narrow-to-subject (&optional pick-expr)
    "Limit to messages with same subject.
--- 789,821 ----
  If no prefix arg is given, then return DEFAULT."
    (let ((default-string (loop for x in default concat (format " %s" x))))
      (if (or current-prefix-arg (equal default-string ""))
!         (mh-pick-args-list (read-string "Pick expression: "
!                                         default-string))
        default)))
  
+ (defun mh-pick-args-list (s)
+   "Form list by grouping elements in string S suitable for pick arguments.
+ For example, the string \"-subject a b c -from Joe User <address@hidden>\"
+ is converted to (\"-subject\" \"a b c\" \"-from\"
+ \"Joe User <address@hidden>\""
+   (let ((full-list (split-string s))
+         current-arg collection arg-list)
+     (while full-list
+       (setq current-arg (car full-list))
+       (if (null (string-match "^-" current-arg))
+           (setq collection
+                 (if (null collection)
+                     current-arg
+                   (format "%s %s" collection current-arg)))
+         (when collection
+           (setq arg-list (append arg-list (list collection)))
+           (setq collection nil))
+         (setq arg-list (append arg-list (list current-arg))))
+       (setq full-list (cdr full-list)))
+     (when collection
+       (setq arg-list (append arg-list (list collection))))
+     arg-list))
+ 
  ;;;###mh-autoload
  (defun mh-narrow-to-subject (&optional pick-expr)
    "Limit to messages with same subject.
***************
*** 1315,1320 ****
--- 1339,1345 ----
            (old-buffer-modified-flag (buffer-modified-p)))
        (delete-region (point-min) (point-max))
        (mh-thread-print-scan-lines thread-tree)
+       (mh-notate-user-sequences)
        (mh-notate-deleted-and-refiled)
        (mh-notate-cur)
        (set-buffer-modified-p old-buffer-modified-flag))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]