changeset 76487:8730dda8a05b

(tempo-insert): Deal with 'r> if it appears specified with a prompt argument.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 17 Mar 2007 18:03:25 +0000
parents def0970bb061
children bc9ccb59010c
files lisp/tempo.el
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/tempo.el	Sat Mar 17 18:02:12 2007 +0000
+++ b/lisp/tempo.el	Sat Mar 17 18:03:25 2007 +0000
@@ -266,6 +266,8 @@
    that you often should place this item after the text you want on
    the line.
  - `r>': Like `r', but it also indents the region.
+ - (r> PROMPT <NAME> <NOINSERT>): Like (r ...), but is also indents
+   the region.
  - `n>': Inserts a newline and indents line.
  - `o': Like `%' but leaves the point before the newline.
  - nil: It is ignored.
@@ -352,6 +354,13 @@
 					 (goto-char tempo-region-stop)
 				       (tempo-insert-prompt-compat
 					(cdr element))))
+        ((and (consp element)
+              (eq (car element) 'r>)) (if on-region
+                                          (progn
+                                            (goto-char tempo-region-stop)
+                                            (indent-region (mark) (point) nil))
+                                        (tempo-insert-prompt-compat
+                                         (cdr element))))
 	((and (consp element)
 	      (eq (car element) 's)) (tempo-insert-named (car (cdr element))))
 	((and (consp element)