aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorStefan Monnier2000-11-10 11:55:06 +0000
committerStefan Monnier2000-11-10 11:55:06 +0000
commitd7fa3319f5bf4c6e23ffc45c2d4385698773a080 (patch)
tree2f25f9bcffb8c8ed390e0b4def41d18e191557c3 /lisp/textmodes
parent178932de25318366416499c3af975340c22323e4 (diff)
downloademacs-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.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)