From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.help Subject: How to un-load a preloaded package? Date: Wed, 7 Jul 2010 02:25:09 +0000 (UTC) Organization: U.C. Berkeley Math. Department. Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1291849622 3280 80.91.229.12 (8 Dec 2010 23:07:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 23:07:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 00:06:58 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQT65-0001kg-Ue for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 00:06:58 +0100 Original-Received: from localhost ([127.0.0.1]:49075 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQT5w-0000dE-KS for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 18:06:44 -0500 Original-Path: usenet.stanford.edu!newsserver.news.garr.it!kanaga.switch.ch!switch.ch!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Injection-Date: Wed, 7 Jul 2010 02:25:09 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="LlLjF8LevGdIZWbTvv+SXA"; logging-data="28865"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/odSiACtoR7HDKjZ0LFK1m" User-Agent: slrn/0.9.8.1pl1 (Linux) Cancel-Lock: sha1:b+Id1mboHT7awXyLMb/H2E9lf7A= Original-Xref: usenet.stanford.edu gnu.emacs.help:179560 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76185 Archived-At: I can see that my version of CPerl mode (ilyaz.org/software/emacs) is not usable on Emacs 23.2 (it is as bad as one shipped with Emacs). On the other hand, I got reports that if one replaces the broken in-Emacs mode by mine BEFORE PRELOADING, things start to work as expected. [The simplest way to check that things work as expected, take a empty buffer in CPerl-mode (M-x cperl-mode) and choose Perl/Micro-Docs/Show_Faces in the menu (f10 p M S). The sample should be maximally highlighted - all the things which play different roles (in RExes, or out) should be properly facified. Hmm, I see that the in-Emacs cperl-6.2 does not even have Show_Faces ?!!! OK, I attach the proper content at end ] The cperl-mode.elc is not "actually preloaded"; however, some contamination remains nevertheless (autoload hints?). I tried to unload the "pre-existing stuff" by doing (defvar sym-list '()) (defun filter-cperl (s) (if (string-match "^cperl-" (symbol-name s)) (setq sym-list (cons s sym-list)))) (mapatoms 'filter-cperl) (defun remove-cperl (s) (unintern s)) (mapcar 'remove-cperl sym-list) - it does not help. Any suggestions appreciated, Ilya ##################################################### Sample Perl-like "code": my $o = sprintf grep //, <$[|$,$ab->[cd]->[ef]|$ab[xy].|^${a,b}{c,d}/; /(?<=foo)(?