Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added defcustom for users to disable autoload cookie. #585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lispy.el
Original file line number Diff line number Diff line change
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