emacs-devel
[Top][All Lists]
Advanced

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

Re: lost argument and doc string


From: Tak Ota
Subject: Re: lost argument and doc string
Date: Wed, 13 Feb 2002 13:00:37 -0800 (PST)

I now see the point of your advice though you should have quoted the
following part instead of the one you picked.

-Tak

> *** 931,954 ****
>         else if (! strcmp (buffer, "defvar")
>              || ! strcmp (buffer, "defconst"))
>       {
> -       char c1 = 0, c2 = 0;
>         type = 'V';
>         read_lisp_symbol (infile, buffer);
>   
>         if (saved_string == 0)
>           {
> ! 
> !           /* Skip until the end of line; remember two previous chars.  */
> !           while (c != '\n' && c != '\r' && c >= 0)
> !             {
> !               c2 = c1;
> !               c1 = c;
> !               c = getc (infile);
> !             }
> ! 
> !           /* If two previous characters were " and \,
> !              this is a doc string.  Otherwise, there is none.  */
> !           if (c2 != '"' || c1 != '\\')
>               {
>   #ifdef DEBUG
>                 fprintf (stderr, "## non-docstring in %s (%s)\n",
> --- 926,938 ----
>         else if (! strcmp (buffer, "defvar")
>              || ! strcmp (buffer, "defconst"))
>       {
>         type = 'V';
>         read_lisp_symbol (infile, buffer);
>   
>         if (saved_string == 0)
>           {
> !               skip_white (infile);
> !               if ((c = getc (infile)) != '\"')
>               {
>   #ifdef DEBUG
>                 fprintf (stderr, "## non-docstring in %s (%s)\n",






13 Feb 2002 19:50:17 +0000: Jason Rumney <address@hidden> wrote:

> Tak Ota <address@hidden> writes:
> 
> > --- lib-src/make-docfile.c  Tue Feb 12 11:28:01 2002
> > ***************
> > *** 911,925 ****
> >       else
> >         while (c != ')')
> >           c = getc (infile);
> > -     skip_white (infile);
> >   
> > !     /* If the next three characters aren't `dquote bslash newline'
> > !        then we're not reading a docstring.
> > !      */
> > !     if ((c = getc (infile)) != '"'
> > !         || (c = getc (infile)) != '\\'
> > !         || ((c = getc (infile)) != '\n' && c != '\r'))
> > !       {
> >   #ifdef DEBUG
> >           fprintf (stderr, "## non-docstring in %s (%s)\n",
> >                    buffer, filename);
> > --- 911,920 ----
> >       else
> >         while (c != ')')
> >           c = getc (infile);
> >   
> > !     skip_white (infile);
> > !     if ((c = getc (infile)) != '\"')
> > !             {
> >   #ifdef DEBUG
> >           fprintf (stderr, "## non-docstring in %s (%s)\n",
> >                    buffer, filename);
> 
> 
> Be careful that the following does the right thing:
> 
>     (defvar string-variable "String value" "\
>     This is the documentation for a string variable.")
> 
> 
> That seems like the only logical reason for the current convention.
> 
> 
> -- 
> Jason Rumney



reply via email to

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