bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#24815: 25.1; emacs could hang whith hs-minor-mode and python-mode


From: gilles . naulin
Subject: bug#24815: 25.1; emacs could hang whith hs-minor-mode and python-mode
Date: Fri, 28 Oct 2016 18:35:11 +0200 (CEST)

Hi,

In python-mode, emacs could hang if you choose a variable name which ends by "def",
when you run "hide-all" function (hs-minor-mode menu)

Code sample
#
# -*- coding: utf-8 -*-
#

with open("default.conf", 'r') as fdef:
    my_conf = fdef.readlines()

##
I had to kill the session.
The problem seems to come from the regexp for python-mode in the variable
hs-special-modes-alist :

(elt (assoc 'python-mode hs-special-modes-alist) 1)

gives
"\\s-*\\(?:def\\|class\\)\\>" in version 25.1
instead of
"^\\s-*\\(?:def\\|class\\)\\>" in version 24.5

if I change it by "^\\s-*\\(?:def\\|class\\)\\>" or  by
"\\_<\\(?:def\\|class\\)\\_>"
hs-minor-mode works fine with python-mode

sincerely
Gilles Naulin



reply via email to

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