GNU bug report logs -
#41934
reverse-region no longer works
Previous Next
Full log
View this message in rfc822 format
> From: Richard Copley <rcopley <at> gmail.com>
> Date: Thu, 18 Jun 2020 17:41:19 +0100
>
> Insert text in a buffer:
>
> abc
> def
> ghi
>
> Position the mark before the 'a' and point before the 'g'.
> Do 'M-x reverse-region'.
>
> An error is signalled, 'There are no full lines in the region'.
Thanks. Does the patch below look good?
diff --git a/lisp/sort.el b/lisp/sort.el
index de0e1b9..6640c8f 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -554,8 +554,8 @@ reverse-region
(if (> beg end)
(let (mid) (setq mid end end beg beg mid)))
(save-excursion
- (when (or (< (line-beginning-position) beg)
- (< end (line-end-position)))
+ (when (< (- end beg)
+ (- (line-end-position) (line-beginning-position)))
(user-error "There are no full lines in the region"))
;; Put beg at the start of a line and end and the end of one --
;; the largest possible region which fits this criteria.
This bug report was last modified 5 years and 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.