* How to un-load a preloaded package?
@ 2010-07-07 2:25 Ilya Zakharevich
2010-07-07 8:53 ` Elena
0 siblings, 1 reply; 2+ messages in thread
From: Ilya Zakharevich @ 2010-07-07 2:25 UTC (permalink / raw)
To: help-gnu-emacs
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:]]^;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to un-load a preloaded package?
2010-07-07 2:25 How to un-load a preloaded package? Ilya Zakharevich
@ 2010-07-07 8:53 ` Elena
0 siblings, 0 replies; 2+ messages in thread
From: Elena @ 2010-07-07 8:53 UTC (permalink / raw)
To: help-gnu-emacs
Sorry for my noob answer, but shouldn't:
(add-to-list 'load-path "/path/to/newer/cperl")
take care of that, since `add-to-list' adds paths at the beginning of
the list (check with `list-load-path-shadows')? Or does `autoload'
cache the path of the specified file?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-07 8:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-07 2:25 How to un-load a preloaded package? Ilya Zakharevich
2010-07-07 8:53 ` Elena
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).