Skip to content

Commit 6d391ea

Browse files
author
Mitchel Humpherys
committed
make the `Paste created' message customizable
Which allows for the following useful customization: (setq gist-created-fmt "%s") The default behavior is unchanged.
1 parent 65db1c2 commit 6d391ea

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

gist.el

+8-1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@
9191
:type 'boolean
9292
:group 'gist)
9393

94+
(defcustom gist-created-fmt "Paste created: %s"
95+
"Format for the message that gets shown upon successful gist
96+
creation. Must contain a single %s for the location of the newly
97+
created gist."
98+
:type 'string
99+
:group 'gist)
100+
94101
(defcustom gist-supported-modes-alist '((action-script-mode . "as")
95102
(c-mode . "c")
96103
(c++-mode . "cpp")
@@ -196,7 +203,7 @@ With a prefix argument, makes a private paste."
196203
(defun gist-created-callback (gist)
197204
(let ((location (oref gist :html-url)))
198205
(gist-list-reload t)
199-
(message "Paste created: %s" location)
206+
(message gist-created-fmt location)
200207
(when gist-view-gist
201208
(browse-url location))
202209
(kill-new location)))

0 commit comments

Comments
 (0)