Skip to content

Commit

Permalink
Uniformize return-actions binding to no-op.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadcg committed Sep 13, 2022
1 parent f512241 commit fc4f9ed
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion source/history.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ then become available for deletion with `delete-history-entry'."
(let ((buffers (or (alex:ensure-list buffer)
(prompt :prompt "Reset histories of buffer(s)"
:sources (make-instance 'buffer-source
:return-actions '())))))
:return-actions #'identity)))))
(files:with-file-content (history (history-file (current-buffer)))
(dolist (buffer buffers)
(htree:reset-owner history (id buffer))))))
Expand Down
4 changes: 2 additions & 2 deletions source/mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ If it's a single buffer, return it directly (not as a list)."
:prompt "Enable mode(s) for buffer(s)"
:sources (make-instance 'buffer-source
:multi-selection-p t
:return-actions '())))))
:return-actions #'identity)))))
(modes (if modes
(uiop:ensure-list modes)
(unless explicit-modes-p
Expand Down Expand Up @@ -372,7 +372,7 @@ If it's a single buffer, return it directly (not as a list)."
:prompt "Enable mode(s) for buffer(s)"
:sources (make-instance 'buffer-source
:multi-selection-p t
:return-actions '())))))
:return-actions #'identity)))))
(modes (if modes
(uiop:ensure-list modes)
(unless explicit-modes-p
Expand Down
2 changes: 1 addition & 1 deletion source/mode/annotate.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ make-instance."
(prompt
:prompt "Show annotation(s)"
:sources (make-instance 'annotation-source
:return-actions nil))))
:return-actions #'identity))))
(render-annotations selected-annotations)))

(define-internal-page-command-global show-annotations ()
Expand Down
4 changes: 2 additions & 2 deletions source/mode/auto.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ For the storage format see the comment in the head of your `auto-mode-rules-file
(make-instance 'prompter:raw-source
:name "New URL")
(make-instance 'global-history-source
:return-actions '())))))
:return-actions #'identity)))))
(when (typep url 'nyxt::history-entry)
(setf url (url url)))
(add-modes-to-auto-mode-rules
Expand Down Expand Up @@ -360,7 +360,7 @@ For the storage format see the comment in the head of your `auto-mode-rules-file
(make-instance 'prompter:raw-source
:name "New URL")
(make-instance 'global-history-source
:return-actions '())))))
:return-actions #'identity)))))
(when (typep url 'nyxt::history-entry)
(setf url (url url)))
(add-modes-to-auto-mode-rules (url-infer-match url)
Expand Down
2 changes: 1 addition & 1 deletion source/mode/document.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ of buffers."
:prompt "Select headings from buffers"
:sources (make-instance 'buffer-source
:multi-selection-p t
:return-actions nil))))
:return-actions #'identity))))
(prompt
:prompt "Jump to heading"
:sources (loop for buffer in buffers
Expand Down
2 changes: 1 addition & 1 deletion source/mode/search-buffer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Example:
"Search multiple buffers."
(let ((buffers (prompt :prompt "Search buffer(s)"
:sources (make-instance 'buffer-source ; TODO: Define class?
:return-actions '()
:return-actions #'identity
:multi-selection-p t))))
(prompt
:prompt "Search text"
Expand Down

0 comments on commit fc4f9ed

Please sign in to comment.