help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to un-load a preloaded package?


From: Ilya Zakharevich
Subject: How to un-load a preloaded package?
Date: Wed, 08 Dec 2010 15:17:36 -0000
User-agent: slrn/0.9.8.1pl1 (Linux)

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 //, <<EOP, $ENV{$_} or warn $$msg[0] for @ARGV; #junk 
some string
EOP
-f _ or -f $_ or die 'What?';

/\3333\xFg\x{FFF}a\ppp\PPP\qqq\C\99f(?{  foo  })(??{  foo  })/;
/a{4,5}\.b[^a[:ff:]b]x$ab->$[|$,$ab->[cd]->[ef]|$ab[xy].|^${a,b}{c,d}/;
/(?<=foo)(?<!bar)(x")(?:$ab|\$\/)$|\\\b\x888\776\[\:$/xxx;
m?(\?\?{b,a})? + m/(??{aa})(?(?=xx)aa|bb)(?#aac)/;
m$(^ab[c]\$)$ + m+(^ab[c]\$\+)+ + m](^ab[c\]$|.+)] + m)(^ab[c]$|.+\));
s{a}{};
s/.a//;
m^a[\^b-e\xFF]c^ + m.a[^b]\.c.;                                 #  OK
m^a[\^-b-\e--[\--\xFF\c[\cX-\0333-\0555-\N{name}\pp--\P{prop}--\\\05555]^;
m^a[[:alpha:]-[:alpha:]-a-[:alpha:][-aa-[[:alpha:]-b-[:alpha:]-[:alpha:]]^;
m^a[x\\[:alpha:]-\\[:alpha:]-a-\\[:alpha:][-aa-[[:alpha:]-b-\\[:alpha:]-\\[:alpha:]]^;
m^a[x\\[:alpha:][:alpha:]\\[:alpha:][-aa-[[:alpha:]\\[:alpha:][:alpha:]]^;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]