Page 1 of 1

Emacs Lisp useage of the cl package

Posted: Fri Jul 25, 2008 7:55 am
by findinglisp
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?

Re: Emacs Lisp useage of the cl package

Posted: Fri Jul 25, 2008 8:23 am
by blandest
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

Posted: Mon Jul 28, 2008 2:54 pm
by kroger
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:

Code: Select all

$ find /usr/share/emacs/23.0.60/lisp -name "*.el.gz" | xargs zgrep "(require 'cl)" | wc -l
297
Pedro kroger

Re: Emacs Lisp useage of the cl package

Posted: Thu Aug 07, 2008 2:29 pm
by xma
findinglisp 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?
It's almost impossible not to use CL package for serious emacs lisp project ;)