# HG changeset patch # User Eli Zaretskii # Date 1077371324 0 # Node ID 96cfa4084fd1ec431f6b8a9ab4941f7b7db8cfc9 # Parent a187c2573c3842ed934d8de7f0609a7e4ba48beb (texinfo-insert-@item): Look for the current Texinfo environment, using the same method as in texinfo-insert-@end, and insert a space rather than a newline if point in a `table' environment. diff -r a187c2573c38 -r 96cfa4084fd1 lisp/textmodes/texinfo.el --- a/lisp/textmodes/texinfo.el Sat Feb 21 13:43:32 2004 +0000 +++ b/lisp/textmodes/texinfo.el Sat Feb 21 13:48:44 2004 +0000 @@ -803,10 +803,18 @@ (texinfo-insert-@-with-arg "file" arg)) (defun texinfo-insert-@item () - "Insert the string `@item' in a Texinfo buffer." + "Insert the string `@item' in a Texinfo buffer. +If in a table defined by @table, follow said string with a space. +Otherwise, follow with a newline." (interactive) - (insert "@item") - (newline)) + (insert "@item" + (if (equal (ignore-errors + (save-excursion + (texinfo-last-unended-begin) + (match-string 1))) + "table") + ? ;space + ?\n))) (defun texinfo-insert-@kbd (&optional arg) "Insert a `@kbd{...}' command in a Texinfo buffer.