GNU bug report logs - #24815
25.1; emacs could hang whith hs-minor-mode and python-mode

Previous Next

Package: emacs;

Reported by: gilles.naulin <at> laposte.net

Date: Fri, 28 Oct 2016 16:48:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.1

Fixed in version 25.2

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: gilles.naulin <at> laposte.net
To: 24815 <at> debbugs.gnu.org
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)
[Message part 1 (text/plain, inline)]
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 


[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.