Function: ietf-drums-remove-comments

ietf-drums-remove-comments is a byte-compiled function defined in ietf-drums.el.gz.

Signature

(ietf-drums-remove-comments STRING)

Documentation

Remove comments from STRING.

Aliases

mail-header-remove-comments

Source Code

;; Defined in /usr/src/emacs/lisp/mail/ietf-drums.el.gz
(defun ietf-drums-remove-comments (string)
  "Remove comments from STRING."
  (with-temp-buffer
    (let (c)
      (ietf-drums-init string)
      (while (not (eobp))
	(setq c (char-after))
	(cond
	 ((eq c ?\")
	  (condition-case nil
	      (forward-sexp 1)
	    (error (goto-char (point-max)))))
	 ((eq c ?\()
	  (delete-region (point) (ietf-drums--skip-comment)))
	 (t
	  (forward-char 1))))
      (buffer-string))))