emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/go-mode c833b77 094/495: Fix cache invalidation for dangli


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode c833b77 094/495: Fix cache invalidation for dangling operator cache
Date: Sat, 7 Aug 2021 09:04:50 -0400 (EDT)

branch: elpa/go-mode
commit c833b77fbb85ae4a2fe8b5e623c5fcb29a1e8c2b
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    Fix cache invalidation for dangling operator cache
    
    We made two mistakes here:
    1) we didn't add the hook correctly, which caused it to be lost when 
syntax-ppss installed its hook
    2) we didn't correctly create a new hash and instead set it back to itself
---
 go-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index 3d2ea7b..4a5935e 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -316,8 +316,8 @@ recommended that you look at goflymake
   (if (boundp 'syntax-propertize-function)
       (set (make-local-variable 'syntax-propertize-function) 
'go-propertize-syntax))
 
-  (set (make-local-variable 'go-dangling-cache) #s(hash-table test eql))
-  (add-to-list 'before-change-functions (lambda (x y) (setq go-dangling-cache 
#s(hash-table test eql))))
+  (set (make-local-variable 'go-dangling-cache) (make-hash-table :test 'eql))
+  (add-hook 'before-change-functions (lambda (x y) (setq go-dangling-cache 
(make-hash-table :test 'eql))) t t)
 
 
   (setq imenu-generic-expression



reply via email to

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