Replace bid-net advice with a dispatch seam; MELPA review cleanups

Address riscy's first-pass review of MELPA PR #10147.

* card-games-bid-ui.el (card-games-bid-submit): New generic; the four
player commands validate once and submit through it.
(card-games-bid-after-refresh-hook): New hook run after refresh.
(card-games-bid-mode-map): Bind "s" here, not from bid-net at load.
* card-games-bid-net.el (card-games-bid-client-game): New subclass
whose card-games-bid-submit method forwards intents to the host.
Remove all six top-level advice-adds and the top-level define-key.
* card-games-bid.el (card-games-bid-inhibit-prompts): New variable
replacing the nominate-suit advice.
* card-games-core.el, card-games-gaps.el, card-games-crapette.el,
card-games-solitaire.el, card-games-trick-ext.el, card-games-bid-ui.el:
Docstring widths, checkdoc disambiguations, sharp-quoted defalias,
derived-mode-p, require NOERROR.
* test/card-games-tests.el: Six new tests pinning the no-advice
contract and the dispatch seam.
* Bump to 1.0.92; NEWS entry; regenerate README.md.

Assisted-by: Claude:claude-fable-5
This commit is contained in:
Corwin Brust 2026-08-16 09:51:47 -05:00
parent ff7a9f6e49
commit 1a5d23d39e
33 changed files with 359 additions and 186 deletions

View file

@ -4,7 +4,7 @@
;; Author: Corwin Brust <corwin@bru.st>
;; Maintainer: Corwin Brust <corwin@bru.st>
;; Version: 1.0.91
;; Version: 1.0.92
;; Keywords: games
;; URL: https://code.bru.st/corwin/card-game.el
@ -165,9 +165,9 @@ for their own actions and delegate the rest with `cl-call-next-method'."
(_ nil)))
(defvar card-games-renderers nil
"Alist mapping a treatment name (a symbol) to a `card-games-renderer' subclass.
Populate it with `card-games-register-renderer' and look entries up with
`card-games-make-renderer'.")
"Alist mapping a treatment name (a symbol) to a renderer subclass.
Populate it with `card-games-register-renderer' and look entries up
with `card-games-make-renderer'.")
(defun card-games-register-renderer (name class)
"Register renderer CLASS (an EIEIO class) under the treatment NAME."
@ -291,7 +291,7 @@ size slider and `text-scale-increase' enlarge the cards."
(max 0.3 (min 4.0 (* card-games-card-scale (expt 1.15 amt))))))
(defvar-local card-games-current-game nil
"The `card-games-game' shown in the current buffer (for shared mouse/zoom).")
"The game object shown in the current buffer (for shared mouse/zoom).")
(defvar-local card-games-redisplay-function #'ignore
"Buffer-local function that redraws the current game's buffer.")