From f5802da979adddf7952cbbc1c6983639c88d6218 Mon Sep 17 00:00:00 2001 From: defanor Date: Tue, 26 Dec 2017 06:20:45 +0300 Subject: Put pancake-uri-at-point URIs into the kill ring When called interactively. --- pancake.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pancake.el b/pancake.el index 199121c..413eee5 100644 --- a/pancake.el +++ b/pancake.el @@ -199,14 +199,15 @@ while avoiding code duplication." (symbol-name attr)))) (defun pancake-uri-at-point (&optional print-uri) - "Returns an absolute URI at point. Prints it when called -interactively." + "Returns an absolute URI at point. Prints it and puts into the +kill ring when called interactively." (interactive "p") (let* ((button (button-at (point))) (uri (and button (button-get button 'pancake-absolute-uri)))) (when print-uri (if uri - (message "%s" uri) + (progn (message "%s" uri) + (kill-new uri)) (message "No URI found at point."))) uri)) -- cgit v1.2.3