aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Lu2023-01-05 05:27:03 +0800
committerEli Zaretskii2023-01-07 11:08:17 +0200
commit5636f14856982f6ee342fd45edd460ffaa73a7e3 (patch)
tree818f309c7133768cddfe2a5704190ca310fedeb7
parentabeb29bfcc68c578f11d59dcc1522738d493770a (diff)
downloademacs-5636f14856982f6ee342fd45edd460ffaa73a7e3.tar.gz
emacs-5636f14856982f6ee342fd45edd460ffaa73a7e3.zip
; Use a single '<=' for range comparisons
* lisp/simple.el (undo-elt-in-region, char-uppercase-p) (event-apply-modifier): Use a single '<='. (Bug#60561)
-rw-r--r--lisp/simple.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 7910454e2f6..690968ca938 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3795,16 +3795,14 @@ whether (MARKER . ADJUSTMENT) undo elements are in the region,
3795because markers can be arbitrarily relocated. Instead, pass the 3795because markers can be arbitrarily relocated. Instead, pass the
3796marker adjustment's corresponding (TEXT . POS) element." 3796marker adjustment's corresponding (TEXT . POS) element."
3797 (cond ((integerp undo-elt) 3797 (cond ((integerp undo-elt)
3798 (and (>= undo-elt start) 3798 (<= start undo-elt end))
3799 (<= undo-elt end)))
3800 ((eq undo-elt nil) 3799 ((eq undo-elt nil)
3801 t) 3800 t)
3802 ((atom undo-elt) 3801 ((atom undo-elt)
3803 nil) 3802 nil)
3804 ((stringp (car undo-elt)) 3803 ((stringp (car undo-elt))
3805 ;; (TEXT . POSITION) 3804 ;; (TEXT . POSITION)
3806 (and (>= (abs (cdr undo-elt)) start) 3805 (<= start (abs (cdr undo-elt)) end))
3807 (<= (abs (cdr undo-elt)) end)))
3808 ((and (consp undo-elt) (markerp (car undo-elt))) 3806 ((and (consp undo-elt) (markerp (car undo-elt)))
3809 ;; (MARKER . ADJUSTMENT) 3807 ;; (MARKER . ADJUSTMENT)
3810 (<= start (car undo-elt) end)) 3808 (<= start (car undo-elt) end))
@@ -6419,7 +6417,7 @@ If the Unicode tables are not yet available, e.g. during bootstrap,
6419then gives correct answers only for ASCII characters." 6417then gives correct answers only for ASCII characters."
6420 (cond ((unicode-property-table-internal 'lowercase) 6418 (cond ((unicode-property-table-internal 'lowercase)
6421 (characterp (get-char-code-property char 'lowercase))) 6419 (characterp (get-char-code-property char 'lowercase)))
6422 ((and (>= char ?A) (<= char ?Z))))) 6420 ((<= ?A char ?Z))))
6423 6421
6424(defun zap-to-char (arg char &optional interactive) 6422(defun zap-to-char (arg char &optional interactive)
6425 "Kill up to and including ARGth occurrence of CHAR. 6423 "Kill up to and including ARGth occurrence of CHAR.
@@ -10049,8 +10047,7 @@ PREFIX is the string that represents this modifier in an event type symbol."
10049 ((eq symbol 'shift) 10047 ((eq symbol 'shift)
10050 ;; FIXME: Should we also apply this "upcase" behavior of shift 10048 ;; FIXME: Should we also apply this "upcase" behavior of shift
10051 ;; to non-ascii letters? 10049 ;; to non-ascii letters?
10052 (if (and (<= (downcase event) ?z) 10050 (if (<= ?a (downcase event) ?z)
10053 (>= (downcase event) ?a))
10054 (upcase event) 10051 (upcase event)
10055 (logior (ash 1 lshiftby) event))) 10052 (logior (ash 1 lshiftby) event)))
10056 (t 10053 (t