diff options
author | Nic Ferrier <nferrier@ferrier.me.uk> | 2014-10-23 16:58:02 +0100 |
---|---|---|
committer | Nic Ferrier <nferrier@ferrier.me.uk> | 2014-10-23 16:58:02 +0100 |
commit | 5e9a53f4356ace0efb26b17f21ee55ed23b7d6ed (patch) | |
tree | 2f6c31478385c6eb61824c1b5ceea9a5b136d94d | |
parent | 08a0932998408746eb14eb5a65149247510173c2 (diff) | |
parent | e16bc881b2822ec0d37f1bf7d8964a8b688a5cb7 (diff) |
Merge branch 'master' of github.com:nicferrier/emacs-noflet
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
-rw-r--r-- | README.creole | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/README.creole b/README.creole index 5a1f9d7..6819511 100644 --- a/README.creole +++ b/README.creole @@ -57,64 +57,3 @@ surely better ways to do it than this but it illustrates the point. Because we include a good indenting function we also include a lexical {{{flet}}}. It's just a wrapper for {{{cl-flet}}}. - -=== todo === - -It would be nice to have a noflet that could work with Emacs/CL style -arg lists, like {{{defun*}}}. - -This would allow something like: - -{{{ -(noflet* ((get-buffer (name &key regex) - (if name - (funcall this-fn name) - (regex-find-buffer-function regex)))) - ...) -}}} - -Doing this looks easy enough to implement with the -{{{cl--transform-lambda}}} function: - -{{{ -(cl--transform-lambda - '((fp &key blah) ; the arglist - "My function" ; the doc string - (setq blah :1)) ; the function body - 'nic-func) ; the name of the function you're assigning -}}} - -this returns something like this: - -{{{ -(nil (fp &rest --cl-rest--) "My function - -(fn FP &key BLAH)" -(let* - ((blah - (car - (cdr - (memq ':blah --cl-rest--))))) - (let - ((--cl-keys-- --cl-rest--)) - (while --cl-keys-- - (cond - ((memq - (car --cl-keys--) - '(:blah :allow-other-keys)) - (setq --cl-keys-- - (cdr - (cdr --cl-keys--)))) - ((car - (cdr - (memq ':allow-other-keys --cl-rest--))) - (setq --cl-keys-- nil)) - (t - (error "Keyword argument %s not one of (:blah)" - (car --cl-keys--)))))) - (cl-block nic-func - (setq blah :1)))) -}}} - -And obviously you can take the CDR of this and use it as a lambda form -or some such. |