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

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

[nongnu] elpa/webpaste b4cd028 005/298: Added function to paste entire b


From: ELPA Syncer
Subject: [nongnu] elpa/webpaste b4cd028 005/298: Added function to paste entire buffer
Date: Thu, 9 Dec 2021 18:59:33 -0500 (EST)

branch: elpa/webpaste
commit b4cd028606a702b0c583e2a49e1d3016b283dcf3
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>

    Added function to paste entire buffer
---
 webpaste.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/webpaste.el b/webpaste.el
index 610d53a..d259c70 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -40,6 +40,15 @@
   (let ((text (buffer-substring (mark) (point))))
     (message text)))
 
+;; The function to paste a buffer
+(defun webpaste-paste-buffer ()
+  "Paste current buffer to some paste service."
+  (interactive)
+
+  (save-mark-and-excursion
+   (set-mark (point-min))               ; Set mark on point-min
+   (goto-char (point-max))              ; Go to point-max
+   (webpaste-paste-region)))            ; Paste region
 
 (provide 'webpaste)
 



reply via email to

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