Changes committed gnus/lisp (ChangeLog ietf-drums.el)

"Ted Zlatanov" <[email protected]> Fri, 31 Oct 2008 18:33:32 +0100
Newsgroups gmane.emacs.gnus.commits
Message-ID <[email protected]>
Modified: ChangeLog ietf-drums.el

(ietf-drums-remove-comments): Localize second condition-case to only
the forward-sexp call.


Index: ChangeLog
diff -u gnus/lisp/ChangeLog:7.1925 gnus/lisp/ChangeLog:7.1926
--- ChangeLog:7.1925	Fri Oct 31 04:13:20 2008
+++ ChangeLog	Fri Oct 31 18:33:32 2008
@@ -1,5 +1,10 @@
 2008-10-31  Teodor Zlatanov  <[email protected]>
 
+	* ietf-drums.el (ietf-drums-remove-comments): Localize second
+	condition-case to only the forward-sexp call.
+
+2008-10-31  Teodor Zlatanov  <[email protected]>
+
 	* ietf-drums.el (ietf-drums-remove-comments): Fix bug with single
 	quotes contained.  Make it more robust regardless by an extra
 	condition-case wrapper.
Index: ietf-drums.el
diff -u gnus/lisp/ietf-drums.el:7.17 gnus/lisp/ietf-drums.el:7.18
--- ietf-drums.el:7.17	Fri Oct 31 04:13:20 2008
+++ ietf-drums.el	Fri Oct 31 18:33:32 2008
@@ -119,14 +119,15 @@
   (with-temp-buffer
     (let (c)
       (ietf-drums-init string)
-      (condition-case err
-	  (while (not (eobp))
-	    (setq c (char-after))
-	    (cond
-	     ((eq c ?\")
-	      (forward-sexp 1))
-	     ((eq c ?\()
-	      (delete-region
+      (while (not (eobp))
+	(setq c (char-after))
+	(cond
+	 ((eq c ?\")
+	  (condition-case err
+	      (forward-sexp 1)
+	    (error (goto-char (point-max)))))
+	 ((eq c ?\()
+	  (delete-region
 	       (point)
 	       (condition-case nil
 		   (with-syntax-table (copy-syntax-table ietf-drums-syntax-table)
@@ -134,9 +135,8 @@
 		     (forward-sexp 1)
 		     (point))
 		 (error (point-max)))))
-	     (t
-	      (forward-char 1))))
-	(error nil))
+	 (t
+	  (forward-char 1))))
       (buffer-string))))
 
 (defun ietf-drums-remove-whitespace (string)