Merge from gnus--rel--5.10
[gnus] / lisp / gnus-sieve.el
index 99e8f6b..7483c8b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-sieve.el --- Utilities to manage sieve scripts for Gnus
 
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: NAGY Andras <nagya@inf.elte.hu>,
 ;;     Simon Josefsson <simon@josefsson.org>
@@ -107,7 +107,7 @@ See the documentation for these variables and functions for details."
   (find-file gnus-sieve-file)
   (goto-char (point-min))
   (if (re-search-forward (regexp-quote gnus-sieve-region-start) nil t)
-      (delete-region (match-end 0)
+      (delete-region (match-beginning 0)
                     (or (re-search-forward (regexp-quote
                                             gnus-sieve-region-end) nil t)
                         (point)))