GNU bug report logs - #76815
31.0.50; [PATCH] Turning off semantic-mode should apply to each buffer

Previous Next

Package: emacs;

Reported by: Lin Sun <sunlin7 <at> hotmail.com>

Date: Fri, 7 Mar 2025 17:23:02 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lin Sun <sunlin7 <at> hotmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 31.0.50; [PATCH] Turning off semantic-mode should apply to each buffer
Date: Fri, 7 Mar 2025 17:22:16 +0000
[Message part 1 (text/plain, inline)]
Hi,
There is a bug that turn off semantic-mode it only restores current buffer's imenu-create-index-function but actually turning on semantic-mode had changed each buffer's variable.
Reproduce steps:
1) Open two files (eg /tmp/a.c, /tmp/b.c) in two buffers; 
2) Turn on semantic-mode, it will change the imenu-create-index-function value for each buffer;
3) Turn off semantic-mode, it will restore current buffer's value (eg: b.c), but another one (eg: a.c) won't restored.

When turning on semantic-mode, it applies changes to each buffer, 
 1048         (dolist (b (buffer-list))
 1049           (with-current-buffer b
 1050             (semantic-new-buffer-fcn))))

But turning off semantic does not restore the var for each buffer, only restores current buffer.

This patch will fix the issue. Please help review it. Thanks.
Best Regards, Lin
[0001-lisp-cedet-semantic.el-Turning-off-semantic-mode-app.patch (text/x-patch, attachment)]

This bug report was last modified 11 days ago.

Previous Next


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