unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Is this tempo.el patch correct?
@ 2007-03-02 23:47 Richard Stallman
  2007-03-11 13:29 ` David Kågedal
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Stallman @ 2007-03-02 23:47 UTC (permalink / raw)
  To: davidk; +Cc: emacs-devel

Please tell us whether to install this patch.

------- Start of forwarded message -------
To: emacs-pretest-bug@gnu.org
From: Lawrence Mitchell <wence@gmx.li>
Date: Fri, 02 Mar 2007 14:39:11 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: r> insertion marker not handled correctly in tempo
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4


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  <wence@gmx.li>

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


Cheers,

Lawrence

- -- 
Lawrence Mitchell <wence@gmx.li>


_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Is this tempo.el patch correct?
@ 2007-03-09 21:26 Richard Stallman
  2007-03-09 22:46 ` David Kågedal
  2007-03-10 15:55 ` David Hansen
  0 siblings, 2 replies; 10+ messages in thread
From: Richard Stallman @ 2007-03-09 21:26 UTC (permalink / raw)
  To: emacs-devel; +Cc: davidk

David K}gedal, author of tempo.el, seems not to be responding,
so we are on our own unless someone can find a better way to contact him.

Would someone please DTRT and then ack?

------- Start of forwarded message -------
To: emacs-pretest-bug@gnu.org
From: Lawrence Mitchell <wence@gmx.li>
Date: Fri, 02 Mar 2007 14:39:11 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: r> insertion marker not handled correctly in tempo
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4


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  <wence@gmx.li>

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


Cheers,

Lawrence

- -- 
Lawrence Mitchell <wence@gmx.li>


_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-03-12 22:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-02 23:47 Is this tempo.el patch correct? Richard Stallman
2007-03-11 13:29 ` David Kågedal
2007-03-12  1:27   ` Richard Stallman
2007-03-12 22:11     ` Kim F. Storm
  -- strict thread matches above, loose matches on Subject: below --
2007-03-09 21:26 Richard Stallman
2007-03-09 22:46 ` David Kågedal
2007-03-11  4:23   ` Richard Stallman
2007-03-10 15:55 ` David Hansen
2007-03-10 20:00   ` Lawrence Mitchell
2007-03-11 20:00   ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).