3 ms·
All they would need to do is add this to the beginning for every file "(require 'cl)". The CL package is already bundled with Emacs, and a good chunk of emacs
by mahmud 16y ago
All they would need to do is add this to the beginning for every file "(require 'cl)".
The CL package is already bundled with Emacs, and a good chunk of emacs packages and libraries are written in it. It's not Common Lisp, just some syntatic sugar to make Elisp more like CL and every other mainstream language out there. IMO, your readers will have more difficulty understanding dynamic-scope than remembering to add a line. CL provides lexical scoping with lexical-let.
- gordonguthrie 16y agoYou need to stop thinking about 'what my readers will have difficultly understanding' and start thinking about 'what the author doesn't know'. I know as much eLisp as is covered in the book so far - so I have no idea of the difference between lexical and dynamic scope in eLisp. Doing a quick scan of the site-lisp on my 'proper' dev machine (ie not the Virtual Box image I am writing the book on) I find that the following (uncompiled) files require cl: * mh-acros.el * rst.el * js2.el * css-mode.el * html-helper-mode.el So it is clear that the convention "don't use cl" is being honoured in the breach for fairly standard bits of code - so as an idea it needs to be considered. Of course, if you signed up for the mailing list as a Lisp expert, we could nag you about questions like this :) http://groups.google.com/group/learn-elisp-for-emacs http://groups.google.com/group/learn-elisp-for-emacs
- bitdiddle 16y agofor sure the issue of dynamic scope is important. I often wonder how even more successful emacs would have become had Guile worked out.
- eeperson 16y agoThere is an intention to make lexical scoping the default in Emacs. Maybe even as soon as the next version (Emacs 24).