Emacs Lisp useage of the cl package
-
- Posts: 447
- Joined: Sat Jun 28, 2008 7:49 am
- Location: Austin, TX
- Contact:
Emacs Lisp useage of the cl package
I'm going to be writing more Emacs Lisp. Given that I feel more comfortable working in CL than Emacs Lisp, I was thinking about using the Emacs CL-compatibility package to help with a lot of the code. I was curious what people's view of the Emacs CL compatibility package is when writing Emacs Lisp. Is it viewed as a crutch for CL users who can't make the switch, or something that happens quite a lot?
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/
Re: Emacs Lisp useage of the cl package
I started learning CL after writing some Emacs customization functions and quickly noticed the difference. You'll need things like lexical-let for lexical scoping (returning lambdas that will work correctly), defun* (for optional and keyword parameters), defmacro* (for &body) and other. I may be mistaking, but the CL package seems like a patch that ads missing features, it's not just a compatibility layer so there is no point in sticking with plain Emacs Lisp.
Re: Emacs Lisp useage of the cl package
But I find the cl package sooooo useful (if only for loop). A quick hack revels that it is used quite often in emacs itself:
Pedro kroger
Code: Select all
$ find /usr/share/emacs/23.0.60/lisp -name "*.el.gz" | xargs zgrep "(require 'cl)" | wc -l
297
Re: Emacs Lisp useage of the cl package
It's almost impossible not to use CL package for serious emacs lisp projectfindinglisp wrote:I'm going to be writing more Emacs Lisp. Given that I feel more comfortable working in CL than Emacs Lisp, I was thinking about using the Emacs CL-compatibility package to help with a lot of the code. I was curious what people's view of the Emacs CL compatibility package is when writing Emacs Lisp. Is it viewed as a crutch for CL users who can't make the switch, or something that happens quite a lot?
