Skip to content

Commit 88d0e5b

Browse files
committed
Merge pull request #79 from blaenk/active-region-check
correctly detect if the region is active
2 parents 8219359 + a83cc6a commit 88d0e5b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gist.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ Copies the URL into the kill ring.
253253
254254
With a prefix argument, makes a private paste."
255255
(interactive "P")
256-
(condition-case nil
256+
(if (region-active-p)
257257
(gist-region (point) (mark) private)
258-
(mark-inactive (gist-buffer private))))
258+
(gist-buffer private)))
259259

260260
;;;###autoload
261261
(defun gist-region-or-buffer-private ()
@@ -264,9 +264,9 @@ With a prefix argument, makes a private paste."
264264
265265
Copies the URL into the kill ring."
266266
(interactive)
267-
(condition-case nil
267+
(if (region-active-p)
268268
(gist-region-private (point) (mark))
269-
(mark-inactive (gist-buffer-private))))
269+
(gist-buffer-private)))
270270

271271
;;;###autoload
272272
(defun gist-list-user (username &optional force-reload background)

0 commit comments

Comments
 (0)