unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* newbie hacker question: how to add eval-to-texinfo?
@ 2004-04-30 10:29 jemarch
  2004-05-03 13:12 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: jemarch @ 2004-04-30 10:29 UTC (permalink / raw)



Hi,

If accepted, that will be my first patch to emacs. So i want to be sure
i write the patch in a right way.

I want to add a function called 'eval-to-texi' to emacs (i already
signed papers for that).

There are my questions:

- I suppose texinfo.el is the right way to add it. ¿It is right?.

- All functions in texinfo.el start with a 'texinfo-' prefix. May i to
  set that prefix to 'eval-to-texi' naming it 'texinfo-eval-to-texi'?

- May i to include an autoload for 'eval-to-texi'?

- To make the patch in unidiff format, would be right to generate it
  using 'cvs diff texinfo.el' on a fresh emacs cvs checkout? Or from
  the root directory: 'cvs diff listp/textmodes/texinfo.el'
 
- May i to add an entry to lisp/ChangeLog and send a patch for it too?


I think i can guess reasonable answers to that questions. But i want to
be completely sure.

Many thanks!

-- 
José E. Marchesi 

<jemarch@gnu.org>         http://www.gnu.org     GNU No es Unix!
<jemarch@es.gnu.org>      http://es.gnu.org      GNU España

.---------------.
|    .-[]--.    |
|   [] `>[]-|   |  BEE GNU/Hurd            http://bee.es.gnu.org
|    `-.[]<-'   |               
._______________.    

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: newbie hacker question: how to add eval-to-texinfo?
  2004-05-03 13:12 ` Stefan Monnier
@ 2004-04-30 14:36   ` jemarch
  2004-05-03 22:21   ` Richard Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: jemarch @ 2004-04-30 14:36 UTC (permalink / raw)
  Cc: emacs-devel, jemarch


    > I want to add a function called 'eval-to-texi' to emacs (i already
    > signed papers for that).
    
    The name does not make it very clear to me what it does.  Could you explain?

Oh, sorry. 

(defun eval-to-texi (form &optional tostring)
  "Evaluates FORM, dumping a @lisp texinfo environment with the
action.

If TOSTRING is t, then the @lisp environment is returned into a string,
rather than being inserted into the buffer."

  ...)

Examples:

@lisp
(car '(a b c))
      @result{} a
@end lisp

@lisp
(car (a b c))
      @error{} Symbol's function definition is void: a
@end lisp


    
    > - I suppose texinfo.el is the right way to add it. ¿It is right?.
    
    Depends on the patch.  But it's a very minor issue.  Most patches are not
    applied as is but are first sent back for a few minor changes: just send
    the patch and we'll tell you what needs to be changed, if anything.
    
    > - All functions in texinfo.el start with a 'texinfo-' prefix. May i to
    >   set that prefix to 'eval-to-texi' naming it 'texinfo-eval-to-texi'?
    
    Again, depends on the patch.

Ok.
    
    > - May i to include an autoload for 'eval-to-texi'?
    
    I don't see why not.
    
    > - To make the patch in unidiff format, would be right to generate it
    >   using 'cvs diff texinfo.el' on a fresh emacs cvs checkout? Or from
    >   the root directory: 'cvs diff lisp/textmodes/texinfo.el'
    
    Same difference.
     
    > - May i to add an entry to lisp/ChangeLog and send a patch for it too?
    
    Better to send the ChangeLog entry separately, but in a patch is
    also acceptable.  In most cases the patch is wrong (because the date
    needs to be changed, the file has changed in the mean time, etc..)
    so it has to be inserted by hand anyway.
    
    
Ok. Many thanks.

-- 
José E. Marchesi 

<jemarch@gnu.org>         http://www.gnu.org     GNU No es Unix!
<jemarch@es.gnu.org>      http://es.gnu.org      GNU España

.---------------.
|    .-[]--.    |
|   [] `>[]-|   |  BEE GNU/Hurd            http://bee.es.gnu.org
|    `-.[]<-'   |               
._______________.    

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: newbie hacker question: how to add eval-to-texinfo?
  2004-04-30 10:29 newbie hacker question: how to add eval-to-texinfo? jemarch
@ 2004-05-03 13:12 ` Stefan Monnier
  2004-04-30 14:36   ` jemarch
  2004-05-03 22:21   ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Monnier @ 2004-05-03 13:12 UTC (permalink / raw)
  Cc: emacs-devel

> I want to add a function called 'eval-to-texi' to emacs (i already
> signed papers for that).

The name does not make it very clear to me what it does.  Could you explain?

> - I suppose texinfo.el is the right way to add it. ¿It is right?.

Depends on the patch.  But it's a very minor issue.  Most patches are not
applied as is but are first sent back for a few minor changes: just send
the patch and we'll tell you what needs to be changed, if anything.

> - All functions in texinfo.el start with a 'texinfo-' prefix. May i to
>   set that prefix to 'eval-to-texi' naming it 'texinfo-eval-to-texi'?

Again, depends on the patch.

> - May i to include an autoload for 'eval-to-texi'?

I don't see why not.

> - To make the patch in unidiff format, would be right to generate it
>   using 'cvs diff texinfo.el' on a fresh emacs cvs checkout? Or from
>   the root directory: 'cvs diff lisp/textmodes/texinfo.el'

Same difference.
 
> - May i to add an entry to lisp/ChangeLog and send a patch for it too?

Better to send the ChangeLog entry separately, but in a patch is
also acceptable.  In most cases the patch is wrong (because the date
needs to be changed, the file has changed in the mean time, etc..)
so it has to be inserted by hand anyway.


        Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: newbie hacker question: how to add eval-to-texinfo?
  2004-05-03 13:12 ` Stefan Monnier
  2004-04-30 14:36   ` jemarch
@ 2004-05-03 22:21   ` Richard Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2004-05-03 22:21 UTC (permalink / raw)
  Cc: emacs-devel, jemarch

    > - May i to include an autoload for 'eval-to-texi'?

    I don't see why not.

It would seem to me that you would normally want to visit a Texinfo
file before using this command.  Isn't that so?

If so, I think there is no use for making it autoload.  However, there
is no harm in making it autoload if that turns out to be useful.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-03 22:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-30 10:29 newbie hacker question: how to add eval-to-texinfo? jemarch
2004-05-03 13:12 ` Stefan Monnier
2004-04-30 14:36   ` jemarch
2004-05-03 22:21   ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).