quotes contained. Make it more robust regardless by an extra
condition-case wrapper.
+2008-10-31 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * 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 <yamaoka@jpl.org>
* lpath.el: No need to fbind codepage-setup for Emacs 23.
(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)