Changes committed gnus/lisp (ChangeLog ietf-drums.el)
"Ted Zlatanov" <[email protected]> Fri, 31 Oct 2008 04:13:21 +0100
| Newsgroups | gmane.emacs.gnus.commits |
|---|---|
| Message-ID | <[email protected]> |
Modified: ChangeLog 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: ChangeLog diff -u gnus/lisp/ChangeLog:7.1924 gnus/lisp/ChangeLog:7.1925 --- ChangeLog:7.1924 Fri Oct 3 08:58:08 2008 +++ ChangeLog Fri Oct 31 04:13:20 2008 @@ -1,3 +1,9 @@ +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. + 2008-10-03 Katsumi Yamaoka <[email protected]> * lpath.el: No need to fbind codepage-setup for Emacs 23. Index: ietf-drums.el diff -u gnus/lisp/ietf-drums.el:7.16 gnus/lisp/ietf-drums.el:7.17 --- ietf-drums.el:7.16 Mon May 19 10:47:42 2008 +++ ietf-drums.el Fri Oct 31 04:13:20 2008 @@ -119,15 +119,24 @@ (with-temp-buffer (let (c) (ietf-drums-init string) - (while (not (eobp)) - (setq c (char-after)) - (cond - ((eq c ?\") - (forward-sexp 1)) - ((eq c ?\() - (delete-region (point) (progn (forward-sexp 1) (point)))) - (t - (forward-char 1)))) + (condition-case err + (while (not (eobp)) + (setq c (char-after)) + (cond + ((eq c ?\") + (forward-sexp 1)) + ((eq c ?\() + (delete-region + (point) + (condition-case nil + (with-syntax-table (copy-syntax-table ietf-drums-syntax-table) + (modify-syntax-entry ?\" "w") + (forward-sexp 1) + (point)) + (error (point-max))))) + (t + (forward-char 1)))) + (error nil)) (buffer-string)))) (defun ietf-drums-remove-whitespace (string)