Subject: bug#11528: 24.0.97; [PATCH] enriched-next-annotation: wrong-type-argument number-or-marker-p nil

From: Leo <[email-masked]>
Date: Mon, 21 May 2012 11:10:50 +0800

Yidong, could this buglet be fixed in emacs-24? This could stop people
from opening malformed enriched text files.

  Emacs -q bug-enriched.txt

| Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
|   enriched-next-annotation()
|   ......

Content-Type: text/enriched
Text-Width: 70

<x-read-only>09:30 -<x-color><param>DarkGoldenrod</param>EMACS</x-color>- [ 2012-05-21 ]

09:32 *** <x-color><param>Firebrick</param>bobbysmith0071 QUIT Quit: Leaving.</x-color>

09:32 *** <x-color><param>Firebrick</param>cmatei QUIT Ping timeout: 246 seconds</x-color>

09:33 *** <x-color><param>Firebrick</param>bobbysmith007 JOIN</x-color>

09:34 *** <x-color><param>Firebrick</param>fukushima QUIT Ping timeout: 265 seconds</x-color>

09:34 *** <x-color><param>Firebrick</param>cmatei JOIN</x-color>

09:37 *** <x-color><param>Firebrick</param>fukushima JOIN</x-color>

09:37 <<<x-color><param>DarkGoldenrod</param>replsos</x-color>> It's more on the "secret weapon" side of Paul
                Graham's programming language taxonomy

09:38 *** <x-color><param>Firebrick</param>arrsim JOIN</x-color>

09:43 *** <x-color><param>Firebrick</param>lars_t_h JOIN</x-color>

09:43 <<<x-color><param>DarkGoldenrod</param>homie</x-color>> what ?

09:45 *** <x-color><param>Firebrick</param>tali713` JOIN</x-color>

09:46 *** <x-color><param>Firebrick</param>tali713 QUIT Ping timeout: 240 seconds</x-color>

<

diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
index 68a99b0e..a28fcfc7 100644
--- a/lisp/textmodes/enriched.el
+++ b/lisp/textmodes/enriched.el
@@ -437,7 +437,7 @@ (defun enriched-next-annotation ()
 	      (progn (goto-char (match-beginning 0))
 		     (not (looking-at enriched-annotation-regexp))))
     (forward-char 1)
-    (if (= ?< (char-after (point)))
+    (if (eq ?< (char-after (point)))
 	(delete-char 1)
       ;; A single < that does not start an annotation is an error,
       ;; which we note and then ignore.