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.
+2004-02-21 Stephen Compall <s11@member.fsf.org> (tiny change)
+
+ * textmodes/texinfo.el (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.
+
2004-02-21 Juri Linkov <juri@jurta.org>
* ffap.el (ffap-file-at-point): Try parent directories.
(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.