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

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

[elpa] externals/gpastel fbccc7c 13/15: Use an override advice instead o


From: Stefan Monnier
Subject: [elpa] externals/gpastel fbccc7c 13/15: Use an override advice instead of replacing the variable's value
Date: Wed, 19 Dec 2018 12:31:39 -0500 (EST)

branch: externals/gpastel
commit fbccc7cc50a5587c8b492094bed052eb4f32bfa5
Author: Damien Cassou <address@hidden>
Commit: Damien Cassou <address@hidden>

    Use an override advice instead of replacing the variable's value
    
    This makes it simpler to go back to the state before
    `gpastel-start-listening` was called.
---
 gpastel.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gpastel.el b/gpastel.el
index 185318c..98f9592 100644
--- a/gpastel.el
+++ b/gpastel.el
@@ -125,7 +125,7 @@ all text in the GPaste clipboard."
   (when (gpastel--start-gpaste-daemon)
     ;; No need for `interprogram-paste-function' because GPaste will
     ;; tell us as soon as text is added to clipboard:
-    (setq interprogram-paste-function (lambda ()))
+    (advice-add interprogram-paste-function :override #'ignore)
     ;; No need to save the system clipboard before killing in
     ;; Emacs because Emacs already knows about its content:
     (setq save-interprogram-paste-before-kill nil)



reply via email to

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