Skip to content

Commit

Permalink
Fix bug in webpaste-paste-buffer-or-region when you don't have a region
Browse files Browse the repository at this point in the history
If you use `(interactive "r")` and don't have a region or haven't had
a region active in the buffer it will just fail with the message:

> command-execute: The mark is not set now, so there is no region

This seems to work better :-)
  • Loading branch information
etu committed May 3, 2020
1 parent 7a30602 commit 5e963e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webpaste.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

;; Author: Elis "etu" Hirwing
;; URL: https://github.com/etu/webpaste.el
;; Package-Version: 3.1.0
;; Version: 3.1.0
;; Package-Version: 3.1.1
;; Version: 3.1.1
;; Keywords: convenience, comm, paste
;; Package-Requires: ((emacs "24.4") (request "0.2.0") (cl-lib "0.5"))

Expand Down Expand Up @@ -552,7 +552,7 @@ Argument MARK Current mark."
;;;###autoload
(cl-defun webpaste-paste-buffer-or-region (&optional point mark)
"Paste current buffer or selected region to some paste service"
(interactive "r")
(interactive "p")

;; if region is selected
(if (region-active-p)
Expand Down

0 comments on commit 5e963e8

Please sign in to comment.