emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 64d2e5a: Revert previous hideshow commit


From: Lars Ingebrigtsen
Subject: master 64d2e5a: Revert previous hideshow commit
Date: Tue, 25 Aug 2020 04:07:19 -0400 (EDT)

branch: master
commit 64d2e5a7ad507642437cb0bd5e4a75823bfabe0e
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Revert previous hideshow commit
    
    Hideshow has defaults that are overridden if we look for derived modes
    in hs-special-modes-alist.  For instance, in lisp-interaction-mode
    we'll choose a lookup based on parent modes, and that overrides the
    default (bug#43032).
    
    This reverts a415179b56f022f50138f55d231070e3d1b00697.
---
 etc/NEWS                   | 5 -----
 lisp/progmodes/hideshow.el | 6 +-----
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 03516bf..d03153c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -876,11 +876,6 @@ window after starting).  This variable defaults to nil.
 *** New 'diff-mode' font locking face 'diff-error'.
 This face is used for error messages from diff.
 
----
-*** 'hs-minor-mode' now heeds 'hs-special-modes-alist' for derived modes.
-The settings in 'hs-special-modes-alist' now also affect modes derived
-from those mentioned in that alist.
-
 +++
 *** New global mode 'global-goto-address-mode'
 This will enable 'goto-address-mode' in all buffers.
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index c5b9cfc..625e08e 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -225,8 +225,6 @@
 ;;---------------------------------------------------------------------------
 ;; user-configurable variables
 
-(require 'cl-lib)
-
 (defgroup hideshow nil
   "Minor mode for hiding and showing program and comment blocks."
   :prefix "hs-"
@@ -654,9 +652,7 @@ Otherwise, guess start, end and `comment-start' regexps; 
`forward-sexp'
 function; and adjust-block-beginning function."
   (if (and (bound-and-true-p comment-start)
            (bound-and-true-p comment-end))
-      (let* ((lookup (cl-assoc-if (lambda (mode)
-                                   (derived-mode-p major-mode mode))
-                                 hs-special-modes-alist))
+      (let* ((lookup (assoc major-mode hs-special-modes-alist))
              (start-elem (or (nth 1 lookup) "\\s(")))
         (if (listp start-elem)
             ;; handle (START-REGEXP MDATA-SELECT)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]