emacs-devel
[Top][All Lists]
Advanced

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

Re: eval-to-texi


From: Kevin Rodgers
Subject: Re: eval-to-texi
Date: Mon, 03 May 2004 14:48:51 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

address@hidden wrote:
> + (defun texinfo-eval-to-texi (form &optional tostring)
> +   "Evaluates FORM, dumping a @lisp texinfo environment with the evaluation
> + description.
> +
> + If TOSTRING is t, then the @lisp environment is returned into a string,
> + rather than being inserted into the current buffer."
> +
> +   (interactive "sForm to evaluate: ")

How about making its interface more like shell-command:

(defun texinfo-eval-to-texi (form &optional insert)
  "Evaluate FORM, and display it and the result as a @lisp Texinfo command.
With a prefix argument, insert the Texinfo command in the current buffer.

When called from Lisp, the command is returned as a string."
  (interactive "sForm to evaluate: \nP")
...
  (if insert
      (insert texinfo-command)
    (with-output-to-temp-buffer "*Texinfo*"
      ;; too bad we can't force the buffer into texinfo-mode
      (princ texinfo-command)))
  texinfo-command)

--
Kevin Rodgers






reply via email to

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