Emacs Lisp useage of the cl package

Discussion of Emacs Lisp
Post Reply
findinglisp
Posts: 447
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX
Contact:

Emacs Lisp useage of the cl package

Post by findinglisp » Fri Jul 25, 2008 7:55 am

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/

blandest
Posts: 19
Joined: Mon Jun 30, 2008 1:22 am

Re: Emacs Lisp useage of the cl package

Post by blandest » Fri Jul 25, 2008 8:23 am

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.

kroger
Posts: 12
Joined: Mon Jul 28, 2008 2:38 am

Re: Emacs Lisp useage of the cl package

Post by kroger » Mon Jul 28, 2008 2:54 pm

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

xma
Posts: 14
Joined: Mon Jul 28, 2008 6:36 am
Location: France

Re: Emacs Lisp useage of the cl package

Post by xma » Thu Aug 07, 2008 2:29 pm

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 ;)

Post Reply