@@ -436,7 +436,8 @@ down."))
436
436
(j :decode results)))))))
437
437
:type (cons search-engine * )
438
438
:documentation " A list of the `search-engine' objects.
439
- You can invoke them from the prompt-buffer by prefixing your query with SHORTCUT.
439
+ You can invoke them from the prompt buffer by prefixing your query with
440
+ SHORTCUT.
440
441
If the query is empty, FALLBACK-URL is loaded instead. If
441
442
FALLBACK-URL is empty, SEARCH-URL is used on an empty search.
442
443
@@ -945,7 +946,7 @@ identifiers."
945
946
(buffer
946
947
(current-buffer)
947
948
:type buffer)
948
- (prompter :multi-selection -p t )
949
+ (prompter :enable-marks -p t )
949
950
(prompter :constructor (lambda (source)
950
951
(mapcar #' first (nyxt ::keywords (buffer source))))))
951
952
(:accessor-name-transformer (class* :make-name-transformer name))
@@ -1261,15 +1262,15 @@ proceeding."
1261
1262
(define-class buffer-source (prompter :source)
1262
1263
((prompter :name " Buffer list" )
1263
1264
(prompter :constructor (buffer-initial-suggestions :current-is-last-p nil ))
1264
- (prompter :multi-selection -p t )
1265
- (prompter :return- actions (list (lambda-unmapped-command set-current-buffer)
1266
- (lambda-mapped-command buffer-delete)
1267
- ' reload-buffers))
1268
- (prompter :selection- actions-enabled-p t )
1269
- (prompter :selection- actions-delay 0.1 )
1270
- (prompter :selection- actions (lambda-command set-current-buffer* (buffer)
1271
- " Set current BUFFER for the active window."
1272
- (set-current-buffer buffer :focus nil )))
1265
+ (prompter :enable-marks -p t )
1266
+ (prompter :actions-on-return (list (lambda-unmapped-command set-current-buffer)
1267
+ (lambda-mapped-command buffer-delete)
1268
+ ' reload-buffers))
1269
+ (prompter :actions-on-current-suggestion -enabled-p t )
1270
+ (prompter :actions-on-current-suggestion -delay 0.1 )
1271
+ (prompter :actions-on-current-suggestion (lambda-command set-current-buffer* (buffer)
1272
+ " Set current BUFFER for the active window."
1273
+ (set-current-buffer buffer :focus nil )))
1273
1274
(prompter :destructor (let ((buffer (current-buffer)))
1274
1275
(lambda (prompter source)
1275
1276
(declare (ignore source))
@@ -1330,8 +1331,8 @@ second latest buffer first."
1330
1331
:prompt " Delete buffer(s)"
1331
1332
:sources (make-instance
1332
1333
' buffer-source
1333
- :multi-selection -p t
1334
- :return- actions
1334
+ :enable-marks -p t
1335
+ :actions-on-return
1335
1336
(list (lambda-mapped-command buffer-delete)
1336
1337
(lambda-command buffer-delete-duplicates* (buffers)
1337
1338
" Delete all buffers with same URLs, except the chosen ones."
@@ -1425,9 +1426,9 @@ URL-DESIGNATOR is then transformed by BUFFER's `buffer-load-hook'."
1425
1426
(prompter :constructor (lambda (source)
1426
1427
(declare (ignorable source))
1427
1428
(history-initial-suggestions)))
1428
- (prompter :multi-selection -p t )
1429
+ (prompter :enable-marks -p t )
1429
1430
(prompter :filter-preprocessor nil ) ; Don't remove non-exact results.
1430
- (prompter :return- actions #' buffer-load))
1431
+ (prompter :actions-on-return #' buffer-load))
1431
1432
(:export-class-name-p t )
1432
1433
(:metaclass user-class))
1433
1434
@@ -1583,7 +1584,7 @@ Finally, if nothing else, set the `engine' to the `default-search-engine'."))
1583
1584
(input->queries input
1584
1585
:check-dns-p t
1585
1586
:engine-completion-p t )))
1586
- (prompter :return- actions #' buffer-load))
1587
+ (prompter :actions-on-return #' buffer-load))
1587
1588
(:export-class-name-p t )
1588
1589
(:documentation " This prompter source tries to \" do the right thing\" to
1589
1590
generate a new URL query from user input.
@@ -1611,26 +1612,26 @@ any.")
1611
1612
(prompter ::history-pushnew history (render-url url))))
1612
1613
1613
1614
(export-always ' url-sources)
1614
- (defmethod url-sources ((buffer buffer) return- actions)
1615
+ (defmethod url-sources ((buffer buffer) actions-on-return )
1615
1616
(append
1616
- (list (make-instance ' new-url-or-search-source :return- actions return- actions)
1617
+ (list (make-instance ' new-url-or-search-source :actions-on-return actions-on-return )
1617
1618
(make-instance
1618
1619
' global-history-source
1619
- :return- actions (append (uiop :ensure-list return- actions)
1620
- (list (lambda-command delete-history-entry* (suggestion-values)
1621
- " Delete chosen history entries (not belonging to open buffers)."
1622
- (files :with-file-content (history (history-file buffer))
1623
- (dolist (entry suggestion-values)
1624
- (htree :delete-data history entry)))))))
1625
- (make-instance ' search-engine-url-source :return- actions return- actions))
1626
- (mappend (rcurry #' url-sources (uiop :ensure-list return- actions)) (modes buffer))))
1620
+ :actions-on-return (append (uiop :ensure-list actions-on-return )
1621
+ (list (lambda-command delete-history-entry* (suggestion-values)
1622
+ " Delete chosen history entries (not belonging to open buffers)."
1623
+ (files :with-file-content (history (history-file buffer))
1624
+ (dolist (entry suggestion-values)
1625
+ (htree :delete-data history entry)))))))
1626
+ (make-instance ' search-engine-url-source :actions-on-return actions-on-return ))
1627
+ (mappend (rcurry #' url-sources (uiop :ensure-list actions-on-return )) (modes buffer))))
1627
1628
1628
1629
(define-command set-url (&key (url nil explicit-url-p) (prefill-current-url-p t ))
1629
1630
" Set the URL for the current buffer, completing with history."
1630
1631
(if explicit-url-p
1631
1632
(buffer-load (url url))
1632
1633
(let ((history (set-url-history *browser* ))
1633
- (return- actions
1634
+ (actions-on-return
1634
1635
(list (lambda-command buffer-load* (suggestion-values)
1635
1636
" Load first selected URL in current buffer and the rest in new buffer(s)."
1636
1637
(mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
@@ -1653,31 +1654,31 @@ any.")
1653
1654
:input (if prefill-current-url-p
1654
1655
(render-url (url (current-buffer))) " " )
1655
1656
:history history
1656
- :sources (url-sources (current-buffer) return- actions))
1657
+ :sources (url-sources (current-buffer) actions-on-return ))
1657
1658
(current-buffer))))
1658
1659
1659
1660
(define-command set-url-new-buffer (&key (url nil explicit-url-p) (prefill-current-url-p t ))
1660
1661
" Prompt for a URL and set it in a new focused buffer."
1661
1662
(if explicit-url-p
1662
1663
(make-buffer-focus :url (url url))
1663
1664
(let ((history (set-url-history *browser* ))
1664
- (return- actions (lambda-command new-buffer-load (suggestion-values)
1665
- " Load URL(s) in new buffer(s)"
1666
- (mapc (lambda (suggestion) (make-buffer :url (url suggestion)))
1667
- (rest suggestion-values))
1668
- (make-buffer-focus :url (url (first suggestion-values))))))
1665
+ (actions-on-return (lambda-command new-buffer-load (suggestion-values)
1666
+ " Load URL(s) in new buffer(s)"
1667
+ (mapc (lambda (suggestion) (make-buffer :url (url suggestion)))
1668
+ (rest suggestion-values))
1669
+ (make-buffer-focus :url (url (first suggestion-values))))))
1669
1670
(pushnew-url-history history (url (current-buffer)))
1670
1671
(prompt
1671
1672
:prompt " Open URL in new buffer"
1672
1673
:input (if prefill-current-url-p
1673
1674
(render-url (url (current-buffer))) " " )
1674
1675
:history history
1675
- :sources (url-sources (current-buffer) return- actions))
1676
+ :sources (url-sources (current-buffer) actions-on-return ))
1676
1677
(current-buffer))))
1677
1678
1678
1679
(define-command set-url-new-nosave-buffer (&key (prefill-current-url-p t ))
1679
1680
" Prompt for a URL and set it in a new focused nosave buffer."
1680
- (let ((return- actions
1681
+ (let ((actions-on-return
1681
1682
(lambda-command new-nosave-buffer-load (suggestion-values)
1682
1683
" Load URL(s) in new nosave buffer(s)"
1683
1684
(mapc (lambda (suggestion) (make-nosave-buffer :url (url suggestion)))
@@ -1688,7 +1689,7 @@ any.")
1688
1689
:prompt " Open URL in new nosave buffer"
1689
1690
:input (if prefill-current-url-p
1690
1691
(render-url (url (current-buffer))) " " )
1691
- :sources (url-sources (current-buffer) return- actions))
1692
+ :sources (url-sources (current-buffer) actions-on-return ))
1692
1693
(current-buffer)))
1693
1694
1694
1695
(define-command reload-buffer
@@ -1710,7 +1711,7 @@ Return it."
1710
1711
(&optional (buffers
1711
1712
(prompt
1712
1713
:prompt " Reload buffer(s)"
1713
- :sources (make-instance ' buffer-source :multi-selection -p t ))))
1714
+ :sources (make-instance ' buffer-source :enable-marks -p t ))))
1714
1715
" Prompt for BUFFERS to be reloaded.
1715
1716
Return BUFFERS."
1716
1717
(when buffers
0 commit comments