Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / lisp / mh-e / mh-limit.el
index 7a90b89..a7da41e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mh-limit.el --- MH-E display limits
 
-;; Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2003, 2006-2012  Free Software Foundation, Inc.
 
 ;; Author: Peter S. Galbraith <psg@debian.org>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -9,10 +9,10 @@
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,9 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -89,7 +87,8 @@ With a prefix argument, edit PICK-EXPR.
 
 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command."
   (interactive
-   (list (mh-edit-pick-expr (mh-current-message-header-field 'cc))))
+   (list (mh-edit-pick-expr
+          (mh-quote-pick-expr (mh-current-message-header-field 'cc)))))
   (mh-narrow-to-header-field 'cc pick-expr))
 
 ;;;###mh-autoload
@@ -99,7 +98,8 @@ With a prefix argument, edit PICK-EXPR.
 
 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command."
   (interactive
-   (list (mh-edit-pick-expr (mh-current-message-header-field 'from))))
+   (list (mh-edit-pick-expr
+          (mh-quote-pick-expr (mh-current-message-header-field 'from)))))
   (mh-narrow-to-header-field 'from pick-expr))
 
 ;;;###mh-autoload
@@ -119,10 +119,16 @@ Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command."
 (defun mh-narrow-to-subject (&optional pick-expr)
   "Limit to messages with same subject.
 With a prefix argument, edit PICK-EXPR.
+The string Re: is removed from the search.
 
 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command."
   (interactive
-   (list (mh-edit-pick-expr (mh-current-message-header-field 'subject))))
+   (list (mh-edit-pick-expr
+          (mh-quote-pick-expr (mh-current-message-header-field 'subject)))))
+  (setq pick-expr
+        (let ((case-fold-search t))
+          (loop for s in pick-expr
+                collect (mh-replace-regexp-in-string "re: *" "" s))))
   (mh-narrow-to-header-field 'subject pick-expr))
 
 ;;;###mh-autoload
@@ -132,7 +138,8 @@ With a prefix argument, edit PICK-EXPR.
 
 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command."
   (interactive
-   (list (mh-edit-pick-expr (mh-current-message-header-field 'to))))
+   (list (mh-edit-pick-expr
+          (mh-quote-pick-expr (mh-current-message-header-field 'to)))))
   (mh-narrow-to-header-field 'to pick-expr))
 
 \f
@@ -326,5 +333,4 @@ The MH command pick is used to do the match."
 ;; sentence-end-double-space: nil
 ;; End:
 
-;; arch-tag: b0d24378-1234-4c42-aa3f-7abad25b40a1
 ;;; mh-limit.el ends here