[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
syntax: anonymous vs. named functions
From: |
Matt Price |
Subject: |
syntax: anonymous vs. named functions |
Date: |
Sat, 15 Nov 2008 22:42:09 -0500 |
I have working code for my tab-completion problem (again thanks to
everyone for answering my painfully stupid questions). i don't
understand, though, why attempts to write my function as an unnamed
lambda fails, but the same function succeeds when named. the "lambda"
line commented out in tab-complete-from-function below returns an error
"test-completion: Invalid function", while the uncommented call to a
different, trivial function is successful. cna anyone advise me why?
thanks much!
matt
(defun tab-complete-from-function (stub)
"very simple tab completion function"
(interactive (list (completing-read "Name: "
;; (lambda (string) (split-string
(shell-command-to-string (concat "/home/matt/mutt-eds-query " string)) "\n"
t))
(do-completion (string))
nil t)))
(message stub))
(defun do-completion (stub)
"minimal function"
(split-string (shell-command-to-string (concat "/home/matt/mutt-eds-query "
stub)) "\n" t))
> > -ap
--
Matt Price
matt.price@utoronto.ca
- Re: starting an external command from emacs, (continued)
Re: starting an external command from emacs, Xah, 2008/11/13
Message not available
Message not available
Message not available
- Re: break a chunk of text into a list of lines, Andreas Politz, 2008/11/14
- interactive function: generate tab-completion list with another function, Matt Price, 2008/11/15
- syntax: anonymous vs. named functions,
Matt Price <=
- RE: syntax: anonymous vs. named functions, Drew Adams, 2008/11/16
- RE: syntax: anonymous vs. named functions, Matt Price, 2008/11/16
- RE: syntax: anonymous vs. named functions, Drew Adams, 2008/11/16
- Message not available
- Re: syntax: anonymous vs. named functions, Andreas Politz, 2008/11/17