-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathemacs.patch
37 lines (36 loc) · 1.37 KB
/
emacs.patch
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
32
33
34
35
36
37
# From the Emacs project at
# https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=6a4ed891d84b
--- src/editfns.c
+++ src/editfns.c
@@ -2053,6 +2053,8 @@
code. */
ptrdiff_t del_bytes = (size_t) size_a / CHAR_BIT + 1;
ptrdiff_t ins_bytes = (size_t) size_b / CHAR_BIT + 1;
+ unsigned char *deletions = SAFE_ALLOCA (del_bytes);
+ unsigned char *insertions = SAFE_ALLOCA (ins_bytes);
struct context ctx = {
.buffer_a = a,
.buffer_b = b,
@@ -2060,8 +2062,8 @@
.beg_b = min_b,
.a_unibyte = BUF_ZV (a) == BUF_ZV_BYTE (a),
.b_unibyte = BUF_ZV (b) == BUF_ZV_BYTE (b),
- .deletions = SAFE_ALLOCA (del_bytes),
- .insertions = SAFE_ALLOCA (ins_bytes),
+ .deletions = deletions,
+ .insertions = insertions,
.fdiag = buffer + size_b + 1,
.bdiag = buffer + diags + size_b + 1,
.heuristic = true,
--- test/lisp/autorevert-tests.el
+++ test/lisp/autorevert-tests.el
@@ -131,7 +131,9 @@
(format-message
"Reverting buffer `%s'\\." (buffer-name buffer))
auto-revert--messages)))
- (if (with-current-buffer buffer auto-revert-use-notify)
+ (if (and (or file-notify--library
+ (file-remote-p temporary-file-directory)
+ (with-current-buffer buffer auto-revert-use-notify))
(read-event nil nil 0.1)
(sleep-for 0.1)))))