X-Debbugs-Cc: Spencer Baugh Tags: patch Following the request and discussion about using S- in https://lists.gnu.org/archive/html/emacs-devel/2025-03/msg00161.html here is the finished patch that implements all expected features. The patch below is shorter than the initial experimental patch, but still correctly supports all cases: