• João Távora's avatar
    Navigate REPL buttons and add some tests · 9b0e87fa
    João Távora authored
    * sly.el (sly-macroexpansion-minor-mode-map): Use defvar.
    (sly-show-notes): Use `sly-button-flash'.
    
    * contrib/sly-mrepl.el (sly-mrepl-mode-map): Define more interesting
    bindings for M-p and M-n, also C-M-p, C-M-n.
    (sly-mrepl--make-result-button): Assign `sly-button-search-id' to
    new button.
    (sly-mrepl-previous-input-or-button)
    (sly-mrepl-next-input-or-button): New functions.
    
    * contrib/sly-stickers.el (sly-stickers--echo-sticker): Use new `sly-button-flash'
    (sly-stickers--flash-sticker): Removed.
    (sly-stickers-fetch): Use new `sly-button-flash'
    
    * lib/sly-buttons.el (sly-button-at): Use `button-type-subtype-p'
    (sly-button): Set a basic `sly-button-search-id' here.
    (sly-button-flash): New function.
    (sly-button-echo-part): Flash buttons by default.
    (sly-button--overlays-starting-at): Renamed to
    `sly-button--searchable-buttons-starting-at'
    (sly-button--searchable-buttons-at): Consider text buttons.
    (sly-button-search): Use `sly-button--searchable-buttons-at'
    (sly-button-search): Error instead of message.
    
    * test/sly-mrepl-tests.el (sly-mrepl-tests--assert-prompt): More
    interesting search for prompt.
    (sly-mrepl-tests--with-basic-repl-setup): New macro.
    (repl-values-and-button-navigation): New test.
    9b0e87fa