emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60561: closed ([PATCH] ; * lisp/simple.el: (and (>= ..) (<= ..)) ref


From: GNU bug Tracking System
Subject: bug#60561: closed ([PATCH] ; * lisp/simple.el: (and (>= ..) (<= ..)) refactor to (<= .. ..))
Date: Sat, 07 Jan 2023 09:11:02 +0000

Your message dated Sat, 07 Jan 2023 11:10:50 +0200
with message-id <83bknau2ud.fsf@gnu.org>
and subject line Re: bug#60561: [PATCH] ; * lisp/simple.el: (and (>= ..) (<= 
..)) refactor to (<= .. ..)
has caused the debbugs.gnu.org bug report #60561,
regarding [PATCH] ; * lisp/simple.el: (and (>= ..) (<= ..)) refactor to (<= .. 
..)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
60561: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60561
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] ; * lisp/simple.el: (and (>= ..) (<= ..)) refactor to (<= .. ..) Date: Thu, 5 Jan 2023 05:27:03 +0800
---
 lisp/simple.el | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 63479e9ce0a..121ee8db87d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3795,16 +3795,14 @@ undo-elt-in-region
 because markers can be arbitrarily relocated.  Instead, pass the
 marker adjustment's corresponding (TEXT . POS) element."
   (cond ((integerp undo-elt)
-        (and (>= undo-elt start)
-             (<= undo-elt end)))
+         (<= start undo-elt end))
        ((eq undo-elt nil)
         t)
        ((atom undo-elt)
         nil)
        ((stringp (car undo-elt))
         ;; (TEXT . POSITION)
-        (and (>= (abs (cdr undo-elt)) start)
-             (<= (abs (cdr undo-elt)) end)))
+        (<= start (abs (cdr undo-elt)) end))
        ((and (consp undo-elt) (markerp (car undo-elt)))
         ;; (MARKER . ADJUSTMENT)
          (<= start (car undo-elt) end))
@@ -6419,7 +6417,7 @@ char-uppercase-p
 then gives correct answers only for ASCII characters."
   (cond ((unicode-property-table-internal 'lowercase)
          (characterp (get-char-code-property char 'lowercase)))
-        ((and (>= char ?A) (<= char ?Z)))))
+        ((<= ?A char ?Z))))
 
 (defun zap-to-char (arg char &optional interactive)
   "Kill up to and including ARGth occurrence of CHAR.
@@ -10039,8 +10037,7 @@ event-apply-modifier
            ((eq symbol 'shift)
              ;; FIXME: Should we also apply this "upcase" behavior of shift
              ;; to non-ascii letters?
-            (if (and (<= (downcase event) ?z)
-                     (>= (downcase event) ?a))
+            (if (<= ?a (downcase event) ?z)
                 (upcase event)
               (logior (ash 1 lshiftby) event)))
            (t
-- 
2.39.0




--- End Message ---
--- Begin Message --- Subject: Re: bug#60561: [PATCH] ; * lisp/simple.el: (and (>= ..) (<= ..)) refactor to (<= .. ..) Date: Sat, 07 Jan 2023 11:10:50 +0200
> Cc: Xi Lu <lx@shellcodes.org>
> From: Xi Lu <lx@shellcodes.org>
> Date: Thu,  5 Jan 2023 05:27:03 +0800
> 
> ---
>  lisp/simple.el | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)

Thanks, installed on master, and closing the bug.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]