[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: turn-on-*-mode
From: |
Johan Bockgård |
Subject: |
Re: turn-on-*-mode |
Date: |
Wed, 17 May 2006 03:26:20 +0200 |
User-agent: |
Gnus/5.110005 (No Gnus v0.5) Emacs/22.0.50 (gnu/linux) |
"Stuart D. Herring" <address@hidden> writes:
> Or (somewhat tongue-in-cheek) have
> (defun curry (func &rest args)
> `(lambda (&rest args2) (apply ',func (append ',args args2))))
>
> So that one can write
> (add-hook 'text-mode-hook (curry 'auto-fill-mode 1))
The lexbind branch has this.
,----
| curry is a built-in function in `src/eval.c'.
| (curry fun &rest args)
|
| Return fun curried with args.
| The result is a function-like object that will append any arguments it
| is called with to args, and call fun with the resulting list of
| arguments.
|
| For instance:
| (funcall (curry '+ 3 4 5) 2) is the same as (funcall '+ 3 4 5 2)
| and:
| (mapcar (curry 'concat "The ") '("a" "b" "c"))
| => ("The a" "The b" "The c")
`----
--
Johan Bockgård
- Re: turn-on-*-mode, (continued)
- Re: turn-on-*-mode, Richard Stallman, 2006/05/16
- Re: turn-on-*-mode, Sam Steingold, 2006/05/16
- Re: turn-on-*-mode, Lennart Borgman, 2006/05/16
- Re: turn-on-*-mode, Kim F. Storm, 2006/05/16
- RE: turn-on-*-mode, Drew Adams, 2006/05/16
- Re: turn-on-*-mode, Sam Steingold, 2006/05/16
- Re: turn-on-*-mode, David Kastrup, 2006/05/16
- RE: turn-on-*-mode, Drew Adams, 2006/05/16
- Re: turn-on-*-mode, Lennart Borgman, 2006/05/16
- Re: turn-on-*-mode, Stuart D. Herring, 2006/05/16
- Re: turn-on-*-mode,
Johan Bockgård <=
- Re: turn-on-*-mode, Richard Stallman, 2006/05/16
- Re: turn-on-*-mode, Richard Stallman, 2006/05/16
- Re: turn-on-*-mode, Reiner Steib, 2006/05/30
- Re: turn-on-*-mode, Sam Steingold, 2006/05/30
- Re: turn-on-*-mode, Reiner Steib, 2006/05/30
- Re: turn-on-*-mode, Reiner Steib, 2006/05/16
- Re: turn-on-*-mode, Miles Bader, 2006/05/16
- Re: turn-on-*-mode, Richard Stallman, 2006/05/17
- Re: turn-on-*-mode, Stefan Monnier, 2006/05/17
- Re: turn-on-*-mode, Richard Stallman, 2006/05/18