aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/sort.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/sort.el b/lisp/sort.el
index de0e1b9519d..f878db24a3c 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -554,9 +554,6 @@ is the one that ends before END."
554 (if (> beg end) 554 (if (> beg end)
555 (let (mid) (setq mid end end beg beg mid))) 555 (let (mid) (setq mid end end beg beg mid)))
556 (save-excursion 556 (save-excursion
557 (when (or (< (line-beginning-position) beg)
558 (< end (line-end-position)))
559 (user-error "There are no full lines in the region"))
560 ;; Put beg at the start of a line and end and the end of one -- 557 ;; Put beg at the start of a line and end and the end of one --
561 ;; the largest possible region which fits this criteria. 558 ;; the largest possible region which fits this criteria.
562 (goto-char beg) 559 (goto-char beg)
@@ -568,6 +565,8 @@ is the one that ends before END."
568 ;; reversal; it isn't difficult to add it afterward. 565 ;; reversal; it isn't difficult to add it afterward.
569 (or (and (eolp) (not (bolp))) (progn (forward-line -1) (end-of-line))) 566 (or (and (eolp) (not (bolp))) (progn (forward-line -1) (end-of-line)))
570 (setq end (point-marker)) 567 (setq end (point-marker))
568 (when (<= end beg)
569 (user-error "There are no full lines in the region"))
571 ;; The real work. This thing cranks through memory on large regions. 570 ;; The real work. This thing cranks through memory on large regions.
572 (let (ll (do t)) 571 (let (ll (do t))
573 (while do 572 (while do