diff options
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/textmodes/texinfo.el | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 483e6976aba..6fb830ecbb5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2000-11-10 Stefan Monnier <monnier@cs.yale.edu> | 1 | 2000-11-10 Stefan Monnier <monnier@cs.yale.edu> |
| 2 | 2 | ||
| 3 | * textmodes/texinfo.el (texinfo-block-default): New var. | ||
| 4 | (texinfo-insert-block): Use it. Insert a newline if needed. | ||
| 5 | |||
| 3 | * textmodes/fill.el (fill-indent-according-to-mode): New var. | 6 | * textmodes/fill.el (fill-indent-according-to-mode): New var. |
| 4 | (fill-region-as-paragraph): Use it. | 7 | (fill-region-as-paragraph): Use it. |
| 5 | 8 | ||
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 1a8eec0cbd3..d578362f517 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el | |||
| @@ -624,10 +624,16 @@ value of `texinfo-mode-hook'." | |||
| 624 | "Regexp for environment-like TexInfo list commands. | 624 | "Regexp for environment-like TexInfo list commands. |
| 625 | Subexpression 1 is what goes into the corresponding `@end' statement.") | 625 | Subexpression 1 is what goes into the corresponding `@end' statement.") |
| 626 | 626 | ||
| 627 | (defvar texinfo-block-default "example") | ||
| 628 | |||
| 627 | (define-skeleton texinfo-insert-block | 629 | (define-skeleton texinfo-insert-block |
| 628 | "Create a matching pair @<cmd> .. @end <cmd> at point. | 630 | "Create a matching pair @<cmd> .. @end <cmd> at point. |
| 629 | Puts point on a blank line between them." | 631 | Puts point on a blank line between them." |
| 630 | (completing-read "Block name: " (mapcar 'list texinfo-environments)) | 632 | (setq texinfo-block-default |
| 633 | (completing-read (format "Block name [%s]: " texinfo-block-default) | ||
| 634 | (mapcar 'list texinfo-environments) | ||
| 635 | nil nil nil nil texinfo-block-default)) | ||
| 636 | (unless (save-excursion (beginning-of-line) (looking-at "[ \t]*$")) '\n) | ||
| 631 | "@" str \n _ \n "@end " str \n) | 637 | "@" str \n _ \n "@end " str \n) |
| 632 | 638 | ||
| 633 | (defun texinfo-inside-macro-p (macro &optional bound) | 639 | (defun texinfo-inside-macro-p (macro &optional bound) |