From 7a6ed72bf583f023a515e12ad43c131b6c7795ee Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 16 Jan 2020 19:18:11 +0000 Subject: [PATCH] Allow message overrides in clipboard/{copy,paste} In case libraries consuming this would like a way to control the message that's output. --- configs/shared/.emacs.d/wpc/clipboard.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/shared/.emacs.d/wpc/clipboard.el b/configs/shared/.emacs.d/wpc/clipboard.el index c73db7252..603afc90a 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)