]> code.delx.au - gnu-emacs-elpa/commitdiff
xsel.el - respect arg for DISPLAY prompt in main copy/paste funcs.
authorKen Manheimer <ken.manheimer@gmail.com>
Sun, 4 Oct 2015 15:37:09 +0000 (11:37 -0400)
committerKen Manheimer <ken.manheimer@gmail.com>
Sun, 4 Oct 2015 15:37:09 +0000 (11:37 -0400)
xsel.el

diff --git a/xsel.el b/xsel.el
index 2d7d7d81988f835805f404e9c0086d2fc312d603..8e958d9040a9f00e9ae59b22e281cb1f12e3f35f 100644 (file)
--- a/xsel.el
+++ b/xsel.el
@@ -34,9 +34,12 @@ Returns the resulting value for DISPLAY."
   )
 
 (defun klm:xsel-copy (from to)
-  "Place contents of region in X copy/paste buffer, using shell command."
+  "Place contents of region in X copy/paste buffer, using shell command.
+
+With universal argument, prompt to set DISPLAY."
+
   (interactive "r")
-  (when (klm:xsel-check-get-DISPLAY)
+  (when (klm:xsel-check-get-DISPLAY current-prefix-arg)
     (let ((command (cond ((eq system-type 'darwin) "pbcopy")
                          ((eq system-type 'cygwin) "putclip")
                          ;; Linux &c:
@@ -48,7 +51,7 @@ Returns the resulting value for DISPLAY."
 (defun klm:xsel-paste ()
   "Place contents of region in X copy/paste buffer, using shell command."
   (interactive "")
-  (when (klm:xsel-check-get-DISPLAY)
+  (when (klm:xsel-check-get-DISPLAY current-prefix-arg)
     (let ((command (cond ((eq system-type 'darwin) "pbpaste")
                          ((eq system-type 'cygwin) "getclip")
                          ;; Linux &c: