.emacs-my
changeset 1723 6533fa2834cf
parent 1722 c4feb289e3c2
child 1724 35c96420cf54
--- a/.emacs-my	Sun Jan 31 12:23:23 2021 +0200
+++ b/.emacs-my	Sun Jan 31 20:35:05 2021 +0200
@@ -3765,10 +3765,11 @@
 (defun my-hs-toggle ()
   (interactive)
   (if hs-minor-mode
-      (if (condition-case nil
-              (hs-toggle-hiding)
-            (error t))
-          (hs-show-all))
+      ;; hs-toggle-hiding has bug in v27.1. I eliminated "(event-end e)" from "hs-toggle-hiding" as workaround.
+      (hs-life-goes-on
+       (if (hs-already-hidden-p)
+           (hs-show-block)
+         (hs-hide-block)))
     (my-selective-display-toggle)))
 
 (define-key global-map (kbd "s--") #'my-hs-toggle)