aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
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
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')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/textmodes/texinfo.el8
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 @@
12000-11-10 Stefan Monnier <monnier@cs.yale.edu> 12000-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.
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)