Mercurial > emacs
comparison lisp/textmodes/texinfo.el @ 54109:96cfa4084fd1
(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.
author | Eli Zaretskii <eliz@is.elta.co.il> |
---|---|
date | Sat, 21 Feb 2004 13:48:44 +0000 |
parents | 5e31be49b42d |
children | d6224ed60e43 |
comparison
equal
deleted
inserted
replaced
54108:a187c2573c38 | 54109:96cfa4084fd1 |
---|---|
801 The default is not to surround any existing words with the braces." | 801 The default is not to surround any existing words with the braces." |
802 (interactive "P") | 802 (interactive "P") |
803 (texinfo-insert-@-with-arg "file" arg)) | 803 (texinfo-insert-@-with-arg "file" arg)) |
804 | 804 |
805 (defun texinfo-insert-@item () | 805 (defun texinfo-insert-@item () |
806 "Insert the string `@item' in a Texinfo buffer." | 806 "Insert the string `@item' in a Texinfo buffer. |
807 (interactive) | 807 If in a table defined by @table, follow said string with a space. |
808 (insert "@item") | 808 Otherwise, follow with a newline." |
809 (newline)) | 809 (interactive) |
810 (insert "@item" | |
811 (if (equal (ignore-errors | |
812 (save-excursion | |
813 (texinfo-last-unended-begin) | |
814 (match-string 1))) | |
815 "table") | |
816 ? ;space | |
817 ?\n))) | |
810 | 818 |
811 (defun texinfo-insert-@kbd (&optional arg) | 819 (defun texinfo-insert-@kbd (&optional arg) |
812 "Insert a `@kbd{...}' command in a Texinfo buffer. | 820 "Insert a `@kbd{...}' command in a Texinfo buffer. |
813 A numeric argument says how many words the braces should surround. | 821 A numeric argument says how many words the braces should surround. |
814 The default is not to surround any existing words with the braces." | 822 The default is not to surround any existing words with the braces." |