aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/texinfo.el8
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.
629Puts point on a blank line between them." 631Puts 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)