Function: mml-buffer-substring-no-properties-except-some

mml-buffer-substring-no-properties-except-some is a byte-compiled function defined in mml.el.gz.

Signature

(mml-buffer-substring-no-properties-except-some START END)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/mml.el.gz
(defun mml-buffer-substring-no-properties-except-some (start end)
  (let ((str (buffer-substring-no-properties start end))
	(bufstart start)
	tmp)
    ;; Copy over all hard newlines.
    (while (setq tmp (text-property-any start end 'hard t))
      (put-text-property (- tmp bufstart) (- tmp bufstart -1)
			 'hard t str)
      (setq start (1+ tmp)))
    ;; Copy over all `display' properties (which are usually images).
    (setq start bufstart)
    (while (setq tmp (text-property-not-all start end 'display nil))
      (put-text-property (- tmp bufstart) (- tmp bufstart -1)
			 'display (get-text-property tmp 'display)
			 str)
      (setq start (1+ tmp)))
    str))