about summary refs log tree commit diff
path: root/configs/shared/.emacs.d/wpc/clipboard.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-01-16T19·18+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-17T10·56+0000
commit7a6ed72bf583f023a515e12ad43c131b6c7795ee (patch)
tree74598cddad652bb0083a25229aa60b42301cf3c1 /configs/shared/.emacs.d/wpc/clipboard.el
parent106f62e4f107926c2cd22f2e400e12f144825d55 (diff)
Allow message overrides in clipboard/{copy,paste}
In case libraries consuming this would like a way to control the message that's
output.
Diffstat (limited to 'configs/shared/.emacs.d/wpc/clipboard.el')
-rw-r--r--configs/shared/.emacs.d/wpc/clipboard.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/configs/shared/.emacs.d/wpc/clipboard.el b/configs/shared/.emacs.d/wpc/clipboard.el
index c73db7252eca..603afc90af85 100644
--- a/configs/shared/.emacs.d/wpc/clipboard.el
+++ b/configs/shared/.emacs.d/wpc/clipboard.el
@@ -26,15 +26,15 @@
 ;; Library
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defun clipboard/copy (x)
+(cl-defun clipboard/copy (x &key (message "[clipboard.el] Copied!"))
   "Copy string, X, to X11's clipboard."
   (kill-new x)
-  (message "Copied!"))
+  (message message))
 
-(defun clipboard/paste ()
+(cl-defun clipboard/paste (&key (message "[clipboard.el] Pasted!"))
   "Paste contents of X11 clipboard."
   (yank)
-  (message "Pasted!"))
+  (message message))
 
 (exwm-input-set-key
  (kbd "C-M-v") #'ivy-clipmenu/copy)