* Re: Best Way to Change Code to Use cl-lib
@ 2012-12-16 7:11 Eric James Michael Ritz
0 siblings, 0 replies; 3+ messages in thread
From: Eric James Michael Ritz @ 2012-12-16 7:11 UTC (permalink / raw
To: emacs-devel
(Note: My apologies for sending this twice. The first time I forgot
to not send the email in HTML format, and when I saw it in my
newsgroup reader I realized how unreadable that made it. So here it
is again as plain text. Again, sorry for the noise.)
I maintain an Emacs package which currently uses cl and flet. With
Emacs 24.3 replacing those with cl-lib and cl-flet respectively, what
would be the best way to update the code? What I mean is, I want to
make the change to cl-flet to be up-to-date with Emacs 24.3, but I do
not want it to cause problems for users who have not upgraded their
version of Emacs, because I know all of them will not. Is there a
preferred way I can (or should) test for the current version and then
use the appropriate library/macro? Or should I stick with the obsolete
code and just accept the fact that the byte-compiler will give me
warnings when using Emacs 24.3? Or is there a better way that I just
don’t see?
Thanks in advanced for any help.
-- ejmr 南無妙法蓮華經
^ permalink raw reply [flat|nested] 3+ messages in thread
* Best Way to Change Code to Use cl-lib
@ 2012-12-15 17:54 Eric James Michael Ritz
2012-12-16 16:00 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Eric James Michael Ritz @ 2012-12-15 17:54 UTC (permalink / raw
To: emacs-devel
[-- Attachment #1: Type: text/html, Size: 4382 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Best Way to Change Code to Use cl-lib
2012-12-15 17:54 Eric James Michael Ritz
@ 2012-12-16 16:00 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2012-12-16 16:00 UTC (permalink / raw
To: Eric James Michael Ritz; +Cc: emacs-devel
There are various options, and you'll have to judge for yourself which
is best for your particular case:
- live with the warnings.
- switch to cl-lib and ask users of older Emacsen to install cl-lib
(available in GNU ELPA).
- add things like (unless (fboundp 'cl-letf) (defalias 'cl-letf 'letf)).
- change the code to use something else (e.g. for flet, you can switch
to using either defadvice or (let ((f1 (lambda ..))) ...).
- ...
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-16 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-16 7:11 Best Way to Change Code to Use cl-lib Eric James Michael Ritz
-- strict thread matches above, loose matches on Subject: below --
2012-12-15 17:54 Eric James Michael Ritz
2012-12-16 16:00 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.