[AC 21.5] Fix 2 broken texinfo references
11 years, 7 months
Jerry James
APPROVE COMMIT 21.5
Thomas Mittelstaedt reported that texinfo 4.13a complains about broken
texinfo references after the previous info change. This fixes the
broken references. Interestingly, neither texinfo 5.1 nor 5.2 said a
thing about the brokenness.
diff -r 9fae6227ede5 man/ChangeLog
--- a/man/ChangeLog Thu Mar 27 08:59:03 2014 -0600
+++ b/man/ChangeLog Fri Mar 28 12:42:24 2014 -0600
@@ -1,3 +1,10 @@
+2014-03-28 Jerry James <james(a)xemacs.org>
+
+ * lispref/loading.texi:
+ * lispref/macros.texi:
+ Fix broken next/prev pointers caught by texinfo 4.x, but not by
+ texinfo 5.x. Thanks to Thomas Mittelstaedt for reporting.
+
2014-02-11 Jerry James <james(a)xemacs.org>
* lispref/consoles-devices.texi:
diff -r 9fae6227ede5 man/lispref/loading.texi
--- a/man/lispref/loading.texi Thu Mar 27 08:59:03 2014 -0600
+++ b/man/lispref/loading.texi Fri Mar 28 12:42:24 2014 -0600
@@ -3,7 +3,7 @@
@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
@c See the file lispref.texi for copying conditions.
@setfilename ../../info/loading.info
-@node Loading, Byte Compilation, Macros, Top
+@node Loading, Byte Compilation, Customization, Top
@chapter Loading
@cindex loading
@cindex library
diff -r 9fae6227ede5 man/lispref/macros.texi
--- a/man/lispref/macros.texi Thu Mar 27 08:59:03 2014 -0600
+++ b/man/lispref/macros.texi Fri Mar 28 12:42:24 2014 -0600
@@ -3,7 +3,7 @@
@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
@c See the file lispref.texi for copying conditions.
@setfilename ../../info/macros.info
-@node Macros, Loading, Functions and Commands, Top
+@node Macros, Customization, Functions and Commands, Top
@chapter Macros
@cindex macros
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC 21.5] More texinfo 5.x changes
11 years, 7 months
Jerry James
APPROVE COMMIT 21.5
On Tue, Mar 4, 2014 at 8:56 AM, Jerry James <james(a)xemacs.org> wrote:
> PATCH 21.5
>
> Texinfo 5.2 whines at me every time I build info, because it expects every
> @node to have next, prev, and up pointers. Even worse, looking at the
> output
> shows that it tried to guess what the next, prev, and up pointers should
> be,
> and it doesn't always guess correctly. This patch is almost entirely just
> the
> addition of those pointers, plus fixing some confusion about whether the
> topmost node is spelled "top" or "Top". The exceptions are:
> - .hgignore: added man/Makefile (should have been part of my 25 Jun 2013
> commit)
> - man/internals/internals.texi: fixed some damage to Ville's surname. The
> last letter of his surname plus the following space should be byte
> sequence
> 0xe4 0x20, but somehow we have the 3-byte sequence 0xe4 0xac 0xa0 there.
> - man/internals/internals.texi: texinfo 5.x doesn't like @enumerate
> followed
> by @itemize with no intervening @item. I just removed one layer to make
> texinfo happy.
> - man/lispref/customize.texi: moved a chunk of text to conform to the order
> given by the menus.
> - man/lispref/lispref.texi: used a @vskip instead of an empty @author to
> get
> some vertical space.
> - man/texinfo/{fdl,texinfo,version}.texi: synced up with the texinfo 5.2
> release.
> - man/xemacs/custom.texi: did violence to some of Stephen's text. In
> particular, I heeded a comment and changed some @file{foo} to
> @uref{upstream for foo,foo}. Also imposed menus and sectioning commands
> on
> the Xft/fontconfig content. Stephen, is this part okay?
>
I have committed this patch. Let me know of any trouble it causes. Also,
please accept my apologies for the size of the original email. I should
have attached a compressed version of the patch instead of sending it
inline.
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
Make `define-function' accept docstring
11 years, 7 months
Michael Sperber
This makes defsubst accept that docstring as well, as in GNU Emacs. The
use of `documentation-property' is also as in GNU Emacs.
2014-01-27 Michael Sperber <mike(a)xemacs.org>
* symbols.c (Fdefine_function): Allow optional `docstring'
argument, as in GNU Emacs.
* lisp.h (Qfunction_documentation): Add extern declaration.
* doc.c (Fdocumentation_property): Move before its use.
(Fdocumentation): Retrieve documentation from `define-function'
docstring for symbols.
--
Regards,
Mike
diff --git a/src/doc.c b/src/doc.c
--- a/src/doc.c
+++ b/src/doc.c
@@ -37,6 +37,8 @@
Lisp_Object QSsubstitute, Qdefvar;
+Lisp_Object Qfunction_documentation;
+
/* Work out what source file a function or variable came from, taking the
information from the documentation file. */
@@ -578,6 +580,45 @@
return Qnil;
}
+DEFUN ("documentation-property", Fdocumentation_property, 2, 3, 0, /*
+Return the documentation string that is SYMBOL's PROP property.
+This is like `get', but it can refer to strings stored in the
+`doc-directory/DOC' file; and if the value is a string, it is passed
+through `substitute-command-keys'. A non-nil third argument avoids this
+translation.
+*/
+ (symbol, prop, raw))
+{
+ /* This function can GC */
+ Lisp_Object doc = Qnil;
+#ifdef I18N3
+ REGISTER Lisp_Object domain;
+#endif
+ struct gcpro gcpro1;
+
+ GCPRO1 (doc);
+
+ doc = Fget (symbol, prop, Qnil);
+ if (FIXNUMP (doc))
+ doc = get_doc_string (XFIXNUM (doc) > 0 ? doc : make_fixnum (- XFIXNUM (doc)));
+ else if (CONSP (doc))
+ doc = get_doc_string (doc);
+#ifdef I18N3
+ if (!NILP (doc))
+ {
+ domain = Fget (symbol, Qvariable_domain, Qnil);
+ if (NILP (domain))
+ doc = Fgettext (doc);
+ else
+ doc = Fdgettext (domain, doc);
+ }
+#endif
+ if (NILP (raw) && STRINGP (doc))
+ doc = Fsubstitute_command_keys (doc);
+ UNGCPRO;
+ return doc;
+}
+
DEFUN ("documentation", Fdocumentation, 1, 2, 0, /*
Return the documentation string of FUNCTION.
Unless a non-nil second argument RAW is given, the
@@ -589,6 +630,14 @@
Lisp_Object fun;
Lisp_Object doc;
+ if (SYMBOLP (function))
+ {
+ Lisp_Object tem = Fget (function, Qfunction_documentation, Qnil);
+ if (!NILP (tem))
+ return Fdocumentation_property (function, Qfunction_documentation,
+ raw);
+ }
+
fun = Findirect_function (function);
if (SUBRP (fun))
@@ -678,45 +727,6 @@
}
return doc;
}
-
-DEFUN ("documentation-property", Fdocumentation_property, 2, 3, 0, /*
-Return the documentation string that is SYMBOL's PROP property.
-This is like `get', but it can refer to strings stored in the
-`doc-directory/DOC' file; and if the value is a string, it is passed
-through `substitute-command-keys'. A non-nil third argument avoids this
-translation.
-*/
- (symbol, prop, raw))
-{
- /* This function can GC */
- Lisp_Object doc = Qnil;
-#ifdef I18N3
- REGISTER Lisp_Object domain;
-#endif
- struct gcpro gcpro1;
-
- GCPRO1 (doc);
-
- doc = Fget (symbol, prop, Qnil);
- if (FIXNUMP (doc))
- doc = get_doc_string (XFIXNUM (doc) > 0 ? doc : make_fixnum (- XFIXNUM (doc)));
- else if (CONSP (doc))
- doc = get_doc_string (doc);
-#ifdef I18N3
- if (!NILP (doc))
- {
- domain = Fget (symbol, Qvariable_domain, Qnil);
- if (NILP (domain))
- doc = Fgettext (doc);
- else
- doc = Fdgettext (domain, doc);
- }
-#endif
- if (NILP (raw) && STRINGP (doc))
- doc = Fsubstitute_command_keys (doc);
- UNGCPRO;
- return doc;
-}
DEFUN ("Snarf-documentation", Fsnarf_documentation, 1, 1, 0, /*
@@ -1299,6 +1309,7 @@
DEFSUBR (Fsubstitute_command_keys);
DEFSYMBOL (Qdefvar);
+ DEFSYMBOL (Qfunction_documentation);
}
void
diff --git a/src/lisp.h b/src/lisp.h
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4619,6 +4619,8 @@
/* Defined in doc.c */
EXFUN (Fsubstitute_command_keys, 1);
+extern Lisp_Object Qfunction_documentation;
+
Lisp_Object unparesseuxify_doc_string (int fd, EMACS_INT position,
Ibyte *name_nonreloc,
Lisp_Object name_reloc,
diff --git a/src/symbols.c b/src/symbols.c
--- a/src/symbols.c
+++ b/src/symbols.c
@@ -749,14 +749,14 @@
}
/* FSFmacs */
-DEFUN ("define-function", Fdefine_function, 2, 2, 0, /*
+DEFUN ("define-function", Fdefine_function, 2, 3, 0, /*
Set SYMBOL's function definition to NEWDEF, and return NEWDEF.
Associates the function with the current load file, if any.
If NEWDEF is a compiled-function object, stores the function name in
the `annotated' slot of the compiled-function (retrievable using
`compiled-function-annotation').
*/
- (symbol, newdef))
+ (symbol, newdef, docstring))
{
/* This function can GC */
Ffset (symbol, newdef);
@@ -765,6 +765,10 @@
if (COMPILED_FUNCTIONP (newdef))
XCOMPILED_FUNCTION (newdef)->annotated = symbol;
#endif /* COMPILED_FUNCTION_ANNOTATION_HACK */
+
+ if (!NILP (docstring))
+ Fput (symbol, Qfunction_documentation, docstring);
+
return newdef;
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches