diff options
| author | Stefan Monnier | 2000-11-10 11:55:06 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-11-10 11:55:06 +0000 |
| commit | d7fa3319f5bf4c6e23ffc45c2d4385698773a080 (patch) | |
| tree | 2f25f9bcffb8c8ed390e0b4def41d18e191557c3 /lisp/textmodes | |
| parent | 178932de25318366416499c3af975340c22323e4 (diff) | |
| download | emacs-d7fa3319f5bf4c6e23ffc45c2d4385698773a080.tar.gz emacs-d7fa3319f5bf4c6e23ffc45c2d4385698773a080.zip | |
(texinfo-block-default): New var.
(texinfo-insert-block): Use it. Insert a newline if needed.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/texinfo.el | 8 |
1 files changed, 7 insertions, 1 deletions
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) |