Skip to content

Commit 53d700b

Browse files
committed
fix: add wrapper func for autoload
see #35
1 parent 2a0d451 commit 53d700b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

leetcode.el

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,22 @@ Return a list of rows, each row is a vector:
417417
(tabulated-list-print t)
418418
(leetcode--loading-mode -1))))
419419

420-
;;;###autoload (autoload 'leetcode "leetcode" t t)
421-
(aio-defun leetcode ()
420+
(aio-defun leetcode-1 ()
422421
"Show leetcode problems buffer."
423-
(interactive)
424422
(if (get-buffer leetcode--buffer-name)
425423
(switch-to-buffer leetcode--buffer-name)
426424
(unless (leetcode--login-p)
427425
(aio-await (leetcode--login)))
428426
(aio-await (leetcode-refresh))
429427
(switch-to-buffer leetcode--buffer-name)))
430428

429+
;;;###autoload
430+
(defun leetcode ()
431+
"A wrapper for leetcode-1, because emacs-aio can not be
432+
autoloaded."
433+
(interactive)
434+
(leetcode-1))
435+
431436
(defun leetcode--buffer-content (buf)
432437
"Get content without text properties of BUF."
433438
(with-current-buffer buf

0 commit comments

Comments
 (0)