emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r> insertion marker not handled correctly in tempo


From: Lawrence Mitchell
Subject: r> insertion marker not handled correctly in tempo
Date: Fri, 02 Mar 2007 14:39:11 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux)

If you define a tempo template that includes the "r>" insertion
marker, attempting to use that template results in an error that the
function "r>" is undefined.

This bug may be reproduced as follows:

emacs -Q

Evaluate:

(progn
  (require 'tempo)
  (tempo-define-template
   "show-bug"
   '("Some string" n> (r> "body: ")))
  (setq debug-on-error t)
  (tempo-template-show-bug))


The following patch fixes this problem in, I believe, the correct
manner:

Index: tempo.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/tempo.el,v
retrieving revision 1.20.6.11
diff -c -r1.20.6.11 tempo.el
*** tempo.el    26 Jan 2007 06:15:15 -0000      1.20.6.11
--- tempo.el    2 Mar 2007 14:36:39 -0000
***************
*** 352,357 ****
--- 352,364 ----
                                         (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)

Changelog entry:

2007-03-02  Lawrence Mitchell  <address@hidden>

        * tempo.el (tempo-insert): Deal with 'r> if it appears
        specified with a prompt argument.


Cheers,

Lawrence

-- 
Lawrence Mitchell <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]