Skip to content

Commit

Permalink
Added defcustom for users to disable autoload cookie.
Browse files Browse the repository at this point in the history
  • Loading branch information
ComedyTomedy committed Mar 31, 2021
1 parent 38a7df4 commit fbd161c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lispy.el
Expand Up @@ -197,6 +197,11 @@
:group 'lispy)
(make-variable-buffer-local 'lispy-no-space)

(defcustom lispy-insert-autoload t
"When non-nil, repeated use of `lispy-comment' in emacs-lisp-mode inserts an autoload cookie."
:type 'boolean
:group 'lispy)

(defcustom lispy-lax-eval t
"When non-nil, fix \"unbound variable\" error by setting the it to nil.
This is useful when hacking functions with &optional arguments.
Expand Down Expand Up @@ -3924,7 +3929,8 @@ When SILENT is non-nil, don't issue messages."
(when (lispy--in-string-or-comment-p)
(lispy--out-backward 1)))
((lispy--in-string-or-comment-p)
(cond ((and (eq major-mode 'emacs-lisp-mode)
(cond ((and lispy-insert-autoload
(eq major-mode 'emacs-lisp-mode)
(lispy-after-string-p ";;; "))
(delete-char -1)
(insert "###autoload")
Expand Down

0 comments on commit fbd161c

Please sign in to comment.