From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ikumi Keita Newsgroups: gmane.emacs.auctex.bugs,gmane.emacs.devel Subject: bug#23329: 11.89; Unloading tex-site doesn't restore original functionality Date: Fri, 22 Apr 2016 15:49:57 +0900 Message-ID: <29887.1461307797@localhost> References: <18668.1461248711@localhost> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1461307894 4132 80.91.229.3 (22 Apr 2016 06:51:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Apr 2016 06:51:34 +0000 (UTC) Cc: 23329@debbugs.gnu.org, emacs-devel@gnu.org To: =?UTF-8?Q?Mos=C3=A8?= Giordano Original-X-From: bug-auctex-bounces+geab-bug-auctex=m.gmane.org@gnu.org Fri Apr 22 08:51:21 2016 Return-path: Envelope-to: geab-bug-auctex@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1atUvp-0001Rn-Pa for geab-bug-auctex@m.gmane.org; Fri, 22 Apr 2016 08:51:14 +0200 Original-Received: from localhost ([::1]:55554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atUvk-0007gH-4V for geab-bug-auctex@m.gmane.org; Fri, 22 Apr 2016 02:51:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atUvh-0007dO-II for bug-auctex@gnu.org; Fri, 22 Apr 2016 02:51:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atUve-0006eV-CJ for bug-auctex@gnu.org; Fri, 22 Apr 2016 02:51:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atUve-0006eP-9I for bug-auctex@gnu.org; Fri, 22 Apr 2016 02:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1atUve-000518-1n for bug-auctex@gnu.org; Fri, 22 Apr 2016 02:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ikumi Keita Original-Sender: "Debbugs-submit" Resent-CC: bug-auctex@gnu.org Resent-Date: Fri, 22 Apr 2016 06:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23329 X-GNU-PR-Package: auctex X-GNU-PR-Keywords: Original-Received: via spool by 23329-submit@debbugs.gnu.org id=B23329.146130780719213 (code B ref 23329); Fri, 22 Apr 2016 06:51:02 +0000 Original-Received: (at 23329) by debbugs.gnu.org; 22 Apr 2016 06:50:07 +0000 Original-Received: from localhost ([127.0.0.1]:42831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atUuk-0004zp-No for submit@debbugs.gnu.org; Fri, 22 Apr 2016 02:50:06 -0400 Original-Received: from omx24.esk.m4.zaq.ne.jp ([220.152.48.13]:54839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atUui-0004zD-D7 for 23329@debbugs.gnu.org; Fri, 22 Apr 2016 02:50:05 -0400 Original-Received: from omx24.esk.m4.zaq.ne.jp ([220.152.49.29] [220.152.49.29]) by omx24.esk.m4.zaq.ne.jp with ESMTP id <20160422064957455.VHAO.6308.omx24.esk.m4.zaq.ne.jp@omx24.esk.m4.zaq.ne.jp>; Fri, 22 Apr 2016 15:49:57 +0900 Original-Received: from smtpa13.esk.m4.zaq.ne.jp ([42.144.27.116] [42.144.27.116]) by smtpa13.esk.m4.zaq.ne.jp with ESMTP id <20160422064957410.NTLO.22905.smtpa13.esk.m4.zaq.ne.jp@smtpa13.esk.m4.zaq.ne.jp>; Fri, 22 Apr 2016 15:49:57 +0900 Original-Received: from localhost (localhost [127.0.0.1]) by freebsd.vmware (Postfix) with ESMTP id 348AC139800; Fri, 22 Apr 2016 15:49:57 +0900 (JST) In-reply-to: Your message of "Thu\, 21 Apr 2016 18\:22\:35 +0200." X-Mailer: MH-E 8.6; MH 6.8.4.JP-3.05; GNU Emacs 24.5.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-auctex@gnu.org List-Id: Bug reporting list for AUCTeX List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-auctex-bounces+geab-bug-auctex=m.gmane.org@gnu.org Original-Sender: "bug-auctex" Xref: news.gmane.org gmane.emacs.auctex.bugs:3012 gmane.emacs.devel:203161 Archived-At: --=-=-= Content-Type: text/plain Hi all, > tex-site.el defines `tex-site-unload-hook' which looks into > `after-load-alist' to remove AUCTeX settings (it looks for > `TeX-modes-set' function), but in Emacs 24 `after-load-alist' seems to > have changed and there is no reference to `TeX-modes-set' anymore. Do > you have any idea how to unload AUCTeX in Emacs 24? I think I have figured out why `unload-feature' doesn't work well. The story is as follows. If `advice-add' is available, tex-site.el uses `advice-add' on the original tex modes and doesn't touch `after-load-alist'. The advices are added through the defcustom of `TeX-modes' when tex-site.el is loaded, because it has the line :set 'TeX-modes-set . Thus `tex-site-unload-hook' should remove these advices when `advice-add' is available. I confirmed that the attached crude workaround makes unloading tex-site to work as expected. Regards, Ikumi Keita --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=remove-advices Content-Description: quick workaround diff -r 26f0a318aedb -r 125674651465 tex-site.el.in --- a/tex-site.el.in Tue Jun 03 14:10:34 2014 +0900 +++ b/tex-site.el.in Fri Apr 22 15:22:33 2016 +0900 @@ -87,6 +87,8 @@ (add-hook 'tex-site-unload-hook (lambda () + (if (fboundp 'advice-add) + (TeX-modes-set 'TeX-modes nil) (let ((list after-load-alist)) (while list ;; Adapted copy of the definition of `assq-delete-all' @@ -101,7 +103,7 @@ (eq (car (car tail)) key)) (setq alist (delq (car tail) alist))) (setq tail (cdr tail)))) - (setq list (cdr list)))) + (setq list (cdr list))))) (setq load-path (delq TeX-lisp-directory load-path)))) (defun TeX-modes-set (var value &optional update) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline