From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74803: 31.0.50; [PATCH] Fix bug that semantic did not restore imenu-create-index-function on exiting Date: Sat, 14 Dec 2024 12:40:35 +0200 Message-ID: <86jzc2v97g.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13751"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74803-done@debbugs.gnu.org To: Lin Sun Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 14 11:41:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tMPaN-0003Ph-Sh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Dec 2024 11:41:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMPa5-0005ef-Fs; Sat, 14 Dec 2024 05:41:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tMPa3-0005e7-LJ for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 05:41:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMPa2-0003BP-Fh for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 05:41:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=HFxPhk6Qk/N9PeqPQvSHN5fF6LKEaLThjqKSOB6OFK4=; b=mPLeTU6Qd0bS5UsgGedUEXSBph2Vu9pAAF9QHchIfBFzM5r17fxeT8DZ5z6rqtYDc6nMjsT9nCSoL4iUYRcijErvIWX9/rW1nmi4yLZu1OKx1veIqRfZGt0n5vbLjvELGTqBdUjkNtKxMPai+ehlY0KUrInc82/MBmGVhaU9wufVIvwkv6d/CvkZVMjPdVjSkLvnjMSFZiZUMJH7dmKg4ug5TQ2GpfI61OEvqk6TRfetV5nOi+a32A94ala7hsT2CwI37hdBSZL5igiPQJmK+GyyH09ufN0zT9EAECfMR8KDwzHZk4lFQOidl3QbcTROZfL3G2y6dcAb8bIoZL6YDA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tMPa2-0001dZ-BY for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 05:41:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Dec 2024 10:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 74803 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 74803@debbugs.gnu.org, eliz@gnu.org, sunlin7@hotmail.com Original-Received: via spool by 74803-done@debbugs.gnu.org id=D74803.17341728456248 (code D ref 74803); Sat, 14 Dec 2024 10:41:01 +0000 Original-Received: (at 74803-done) by debbugs.gnu.org; 14 Dec 2024 10:40:45 +0000 Original-Received: from localhost ([127.0.0.1]:45662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMPZl-0001ci-21 for submit@debbugs.gnu.org; Sat, 14 Dec 2024 05:40:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMPZj-0001cU-Bk for 74803-done@debbugs.gnu.org; Sat, 14 Dec 2024 05:40:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tMPZd-00038u-Us; Sat, 14 Dec 2024 05:40:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=HFxPhk6Qk/N9PeqPQvSHN5fF6LKEaLThjqKSOB6OFK4=; b=ofd0JNHdGCiNoVeVQoio PNeNK0UolxLcL+yPQbqNSKVMR2tmoEuDy/3rOmLTYPqDwPEPcioHtaVN12NWjxEAS/y/vzqS8xyqy YgedzJZpAUnYDCFk/UsFDlBoF6sv7Jwz9D/GZeDc43xD/4lhl0/JPa1aLRYrM4cDp7nGFD06PHuRm mvtaUwpDg18+ihJQSEea02hF7BC2+sM0DiiW8nUExGWZ77ztARt4BFIbEnkbk7HZluo8P9PSlp71S fiO0+FoQA9vNOQd7xasuYrKTnCTlINNcxBrcITgYFRdIqvjXnjbZi7gdge8SAyLf0OkdmuqQ+ra+F MWJDpZktRwgrAg==; In-Reply-To: (message from Lin Sun on Wed, 11 Dec 2024 22:30:02 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297033 Archived-At: > From: Lin Sun > Date: Wed, 11 Dec 2024 22:30:02 +0000 > > The semantic minor mode changed the value of imenu-create-index-function on its startup, but does not restore the original value on its exiting.  > > Here are the steps to reproduce the issue: > > 1. Start the emacs and open a python script, now the imenu-create-index-function will be the `python-imenu-create-index' > >  $ emacs -nw -q ~/a.py    > > 2. Turn-on the semantic by "M-x semantic-mode", then the  imenu-create-index-function will be the `semantic-create-imenu-index' > > 3. Turn-off the semantic by "M-x semantic-mode",  imenu-create-index-function is still the semantic one. > > This patch will store the original imenu-create-index-function before changing it, and restore the original value when turn-off the semantic-mode. Thanks, installed on the master branch, and closing the bug.