File: 0002-fix-emacs26.diff

package info (click to toggle)
zzz-to-char 0.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 96 kB
  • sloc: lisp: 102; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 1,019 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Mark Karpov <markkarpov92@gmail.com>
Subject: Apply upstream commits to fix zzz-to-char in Emacs 26.1

Apply 9f08bf94c56a39a2b65f90b852da76dfa6ec2a6f (Fix the call to
‘avy-jump’) and 1ed6d26bcd481d88c6440984c93c248abdea2804 (Use
‘avy-jump’ instead of ‘avy--generic-jump’) upstream commits.

--- a/zzz-to-char.el
+++ b/zzz-to-char.el
@@ -63,15 +63,15 @@ This is an internal function, see also `
   (let ((p (point))
         (avy-all-windows nil))
     (avy-with zzz-to-char
-      (avy--generic-jump
+      (avy-jump
        (if (= 13 char)
            "\n"
          (regexp-quote (string char)))
-       nil
-       (max (- p zzz-to-char-reach)
-            (point-min))
-       (min (+ p zzz-to-char-reach)
-            (point-max))))
+       :window-flip nil
+       :beg (max (- p zzz-to-char-reach)
+                 (point-min))
+       :end (min (+ p zzz-to-char-reach)
+                 (point-max))))
     (let ((n (point)))
       (when (/= n p)
         (cl-destructuring-bind (beg . end)