unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43032: 28.0.50; hs-minor-mode broken since commit a415179b56
@ 2020-08-24 23:25 Pierre Téchoueyres
  2020-08-25  8:08 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre Téchoueyres @ 2020-08-24 23:25 UTC (permalink / raw)
  To: 43032

Step to reproduce :
emacs -Q
type the following text into *scratch* buffer

(progn
  (hs-minor-mode 1)
  (hs-hide-all))

evaluate the s-expression (C-x C-e)

Expected result: buffer should look like bellow.
;; This buffer is for text that is not saved, and for Lisp 
   evaluation....

(progn...))

Actually the buffer doesn't change.


I've tracked the regression up to comit a415179b56:
commit a415179b56f022f50138f55d231070e3d1b00697
Author: Tobias Zawada <i_inbox@tn-home.de>

    Make hs-special-modes-alist also work for modes derived from 
    those modes
    
    * lisp/progmodes/hideshow.el (hs-grok-mode-type): Also set up
    hideshow variables based on hs-special-modes-alist in derived
    modes (bug#39354).

The interresting part is:
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -225,6 +225,8 @@
 ;;---------------------------------------------------------------------------
 ;; user-configurable variables
 
+(require 'cl-lib)
+
 (defgroup hideshow nil
   "Minor mode for hiding and showing program and comment blocks."
   :prefix "hs-"
@@ -652,7 +654,9 @@ hs-grok-mode-type
 function; and adjust-block-beginning function."
   (if (and (bound-and-true-p comment-start)
            (bound-and-true-p comment-end))
-      (let* ((lookup (assoc major-mode hs-special-modes-alist))
+      (let* ((lookup (cl-assoc-if (lambda (mode)
+                                   (derived-mode-p major-mode 
mode))
+                                 hs-special-modes-alist))
              (start-elem (or (nth 1 lookup) "\\s(")))
         (if (listp start-elem)
             ;; handle (START-REGEXP MDATA-SELECT)

But for now I don't know how to fix this.


Configured using:
 'configure --prefix=/usr/local --with-xwidgets --with-modules
 --host=x86_64-fc32-linux-gnu --with-mailutils
 host_alias=x86_64-fc32-linux-gnu'
Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB 
NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT 
LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS 
XWIDGETS
LIBSYSTEMD JSON PDUMPER LCMS2
Important settings:
  value of $LC_COLLATE: C
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#43032: 28.0.50; hs-minor-mode broken since commit a415179b56
  2020-08-24 23:25 bug#43032: 28.0.50; hs-minor-mode broken since commit a415179b56 Pierre Téchoueyres
@ 2020-08-25  8:08 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-25  8:08 UTC (permalink / raw)
  To: Pierre Téchoueyres; +Cc: 43032

Pierre Téchoueyres <pierre.techoueyres@free.fr> writes:

> Step to reproduce :
> emacs -Q
> type the following text into *scratch* buffer
>
> (progn
>  (hs-minor-mode 1)
>  (hs-hide-all))
>
> evaluate the s-expression (C-x C-e)
>
> Expected result: buffer should look like bellow.
> ;; This buffer is for text that is not saved, and for Lisp
>    evaluation....
>
> (progn...))
>
> Actually the buffer doesn't change.

Yup.  I've now reverted this change -- I don't think we can do it that
way at all, since the mode depends on Lisp-like stuff to "fall through"
and use the defaults.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-25  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 23:25 bug#43032: 28.0.50; hs-minor-mode broken since commit a415179b56 Pierre Téchoueyres
2020-08-25  8:08 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).