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

Consistently use keyword arguments when defining minor modes #614

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion contrib/sly-autodoc.el
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ If it's not in the cache, the cache will be updated asynchronously."

(define-minor-mode sly-autodoc-mode
"Toggle echo area display of Lisp objects at point."
nil nil nil
:global nil
(cond (sly-autodoc-mode
(set (make-local-variable 'eldoc-documentation-function) 'sly-autodoc)
(set (make-local-variable 'eldoc-minor-mode-string) "")
Expand Down
4 changes: 2 additions & 2 deletions contrib/sly-trace-dialog.el
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ inspecting details of traced functions. Invoke this dialog with C-c T."

(define-minor-mode sly-trace-dialog-hide-details-mode
"Hide details in `sly-trace-dialog-mode'"
nil " Brief"
:lighter " Brief"
:group 'sly-trace-dialog
(unless (derived-mode-p 'sly-trace-dialog-mode)
(error "Not a SLY Trace Dialog buffer"))
(sly-trace-dialog--set-hide-details-mode))

(define-minor-mode sly-trace-dialog-autofollow-mode
"Automatically inspect trace entries from `sly-trace-dialog-mode'"
nil " Autofollow"
:lighter " Autofollow"
:group 'sly-trace-dialog
(unless (derived-mode-p 'sly-trace-dialog-mode)
(error "Not a SLY Trace Dialog buffer")))
Expand Down
2 changes: 1 addition & 1 deletion lib/sly-buttons.el
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ or leave at `identity' to visit every `sly-button' in the buffer.'")

(define-minor-mode sly-interactive-buttons-mode
"Minor mode where text property SLY buttons exist"
nil nil nil
:global nil
;; Prevent strings copied from SLY buffers and yanked to source
;; buffers to land with misleading `sly-' properties.
(when (fboundp 'add-function)
Expand Down
15 changes: 6 additions & 9 deletions sly.el
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ interactive command.\".")
;;;###autoload
(define-minor-mode sly-mode
"Minor mode for horizontal SLY functionality."
nil nil nil
:global nil
;; Company-mode should have this by default
;; See gh#166
(set (make-local-variable 'company-tooltip-align-annotations) t))
Expand All @@ -601,13 +601,13 @@ interactive command.\".")
;;;###autoload
(define-minor-mode sly-editing-mode
"Minor mode for editing `lisp-mode' buffers."
nil nil nil
:global nil
(sly-mode 1)
(setq-local lisp-indent-function #'sly--lisp-indent-function))

(define-minor-mode sly-popup-buffer-mode
"Minor mode for all read-only SLY buffers"
nil nil nil
:global nil
(sly-mode 1)
(sly-interactive-buttons-mode 1)
(setq buffer-read-only t))
Expand Down Expand Up @@ -4327,9 +4327,8 @@ in Lisp when committed with \\[sly-edit-value-commit]."

(define-minor-mode sly-edit-value-mode
"Mode for editing a Lisp value."
nil
" Edit-Value"
'(("\C-c\C-c" . sly-edit-value-commit)))
:keymap '(("\C-c\C-c" . sly-edit-value-commit))
:lighter " Edit-Value")

(defun sly-edit-value-callback (form-string current-value package)
(let* ((name (generate-new-buffer-name (format "*Edit %s*" form-string)))
Expand Down Expand Up @@ -5042,9 +5041,7 @@ Uses prefix arguments like `sly-compile-defun'."

(define-minor-mode sly-macroexpansion-minor-mode
"SLY mode for macroexpansion"
nil
" Macroexpand"
nil
:lighter " Macroexpand"
(read-only-mode 1))

(defun sly-macroexpand-undo (&optional arg)
Expand Down