Skip to content

Commit 9606d69

Browse files
committed
Fix gist-kill-current; minor API cleanups
1 parent 46431eb commit 9606d69

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

gist.el

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ With a prefix argument, makes a private paste."
203203

204204
(defun gist-created-callback (gist)
205205
(let ((location (oref gist :html-url)))
206-
(gist-list-reload "" t)
206+
(gist-list-reload 'current-user t)
207207
(message "Paste created: %s" location)
208208
(when gist-view-gist
209209
(browse-url location))
@@ -259,7 +259,7 @@ Copies the URL into the kill ring."
259259
;;;###autoload
260260
(defun gist-list-user (username &optional force-reload background)
261261
"Displays a list of a user's gists in a new buffer. When called from
262-
a program, pass a blank string as the username to view the user's own
262+
a program, pass 'current-user as the username to view the user's own
263263
gists, or nil for the username and a non-nil value for force-reload to
264264
reload the gists for the current buffer."
265265
(interactive
@@ -276,13 +276,15 @@ Copies the URL into the kill ring."
276276
(buffer-name))
277277
(format "*%s:%sgists*"
278278
gh-profile-current-profile
279-
(if (string= "" username)
279+
(if (or (equal "" username)
280+
(eq 'current-user username))
280281
""
281282
(format "%s's-" username)))))
282283
(api (gist-get-api nil))
283284
(username (or (and (null username) gist-list-buffer-user)
284285
(and (not (or (null username)
285-
(string= "" username)))
286+
(equal "" username)
287+
(eq 'current-user username)))
286288
username)
287289
(gh-api-get-username api))))
288290
(when force-reload
@@ -309,7 +311,7 @@ Copies the URL into the kill ring."
309311
(defun gist-list (&optional force-reload background)
310312
"Displays a list of all of the current user's gists in a new buffer."
311313
(interactive "P")
312-
(gist-list-user "" force-reload background))
314+
(gist-list-user 'current-user force-reload background))
313315

314316
(defun gist-list-reload (&optional username background)
315317
(interactive)
@@ -496,6 +498,7 @@ for the gist."
496498
(gist-list-reload)))))
497499

498500
(defun gist-kill-current ()
501+
(interactive)
499502
(let* ((id (tabulated-list-get-id))
500503
(gist (gist-list-db-get-gist id))
501504
(api (gist--check-perms-and-get-api

0 commit comments

Comments
 (0)