(sort-regexp-fields): pass noerror to
authorKarl Berry <karl@gnu.org>
Thu, 9 Jan 2003 23:28:25 +0000 (23:28 +0000)
committerKarl Berry <karl@gnu.org>
Thu, 9 Jan 2003 23:28:25 +0000 (23:28 +0000)
re-search-forward, so that we don't fail if no
records match record-regexp.

lisp/sort.el

index ebcea99..09123f4 100644 (file)
@@ -1,6 +1,6 @@
 ;;; sort.el --- commands to sort text in an Emacs buffer
 
-;; Copyright (C) 1986, 1987, 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1987, 1994, 1995, 2003 Free Software Foundation, Inc.
 
 ;; Author: Howie Kaye
 ;; Maintainer: FSF
@@ -441,7 +441,7 @@ sRegexp specifying key within record: \nr")
       (goto-char (point-min))
       (let (sort-regexp-record-end
            (sort-regexp-fields-regexp record-regexp))
-       (re-search-forward sort-regexp-fields-regexp)
+       (re-search-forward sort-regexp-fields-regexp nil t)
        (setq sort-regexp-record-end (point))
        (goto-char (match-beginning 0))
        (sort-subr reverse