emacs-devel
[Top][All Lists]
Advanced

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

make-docfile feature/bug while parsing DEFUN


From: Aurélien Aptel
Subject: make-docfile feature/bug while parsing DEFUN
Date: Sun, 30 Aug 2015 14:38:02 +0200

Hi,

I ran into a problem where a DEFVAR I added was not detected by
make-docfile resulting in a bad globals.h.

After a lot of hair-pulling I finally found out what was going wrong:
make-docfile cannot parse DEFUN docstrings when they are string
literals instead of comments.

Sample input:

DEFUN ("fun", Ffun, Sfun, 1, 1, 0,
       doc: "Docstring")
  (Lisp_Object foo)
{

}

void syms_of_foo (void)
{
  DEFVAR_LISP ("var1", Var1,
           doc: /* Blah blah.  */);
  DEFVAR_LISP ("var2", Var2,
           doc: /* Blah blah.  */);
}

Results in:

struct emacs_globals {
  Lisp_Object f_Var2;
#define Var2 globals.f_Var2
};

Notice how Var1 was skipped. By simply using doc: /* Docstring */ in
the DEFUN, both DEFVAR are properly parsed.

I don't even know why I was using string literals in the first place.
But there you go, in case someone runs into the same problem...



reply via email to

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