gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ;;; anything.el --- open anything


From: address@hidden
Subject: Re: ;;; anything.el --- open anything
Date: Fri, 10 Aug 2007 22:35:08 -0700
User-agent: G2/1.0

On Aug 10, 1:06 pm, "address@hidden"
<address@hidden> wrote:
> It's not really readable, so here's the second attempt:
>

One more unconventional example. :)

It's an on-the-fly expression evaluator. You type the list expression
and it shows the result instantly.

(setq anything-sources
      '(((name . "Calculation Result")
         (requires-pattern)
         (match (lambda (candidate)
                  t))
         (candidates  "dummy")
         (filtered-candidate-transformer .
          (lambda (candidates source)
            (list
             (condition-case nil
                 (prin1-to-string
                  (eval (read anything-pattern)))
               (error "error")))))
         (action ("Do Nothing" . ignore)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]