comparison lisp/mail/rmail.el @ 53666:0a56d6bd40da

(rmail-convert-to-babyl-format): Avoid deleting trailing white space and ensure a final newline.
author Markus Rost <rost@math.uni-bielefeld.de>
date Wed, 21 Jan 2004 12:35:55 +0000
parents c66875fbc45d
children b213145b2838
comparison
equal deleted inserted replaced
53665:c1b91f41e667 53666:0a56d6bd40da
1888 (if base64-header-field-end 1888 (if base64-header-field-end
1889 (save-excursion 1889 (save-excursion
1890 (when 1890 (when
1891 (condition-case nil 1891 (condition-case nil
1892 (progn 1892 (progn
1893 (base64-decode-region (1+ header-end) (point)) 1893 (base64-decode-region
1894 (1+ header-end)
1895 (save-excursion
1896 ;; Prevent base64-decode-region
1897 ;; from removing newline characters.
1898 (skip-chars-backward "\n\t ")
1899 (point)))
1894 t) 1900 t)
1895 (error nil)) 1901 (error nil))
1896 (goto-char header-end) 1902 (goto-char header-end)
1897 (while (search-forward "\r\n" (point-max) t) 1903 (while (search-forward "\r\n" (point-max) t)
1898 (replace-match "\n")) 1904 (replace-match "\n"))
1906 (save-restriction 1912 (save-restriction
1907 (narrow-to-region start (point)) 1913 (narrow-to-region start (point))
1908 (goto-char (point-min)) 1914 (goto-char (point-min))
1909 (while (search-forward "\n\^_" nil t); single char 1915 (while (search-forward "\n\^_" nil t); single char
1910 (replace-match "\n^_")))); 2 chars: "^" and "_" 1916 (replace-match "\n^_")))); 2 chars: "^" and "_"
1917 (or (bolp) (newline)) ; in case we lost the final newline.
1911 (insert ?\^_) 1918 (insert ?\^_)
1912 (setq last-coding-system-used nil) 1919 (setq last-coding-system-used nil)
1913 (or rmail-enable-mime 1920 (or rmail-enable-mime
1914 (not rmail-enable-multibyte) 1921 (not rmail-enable-multibyte)
1915 (let ((mime-charset 1922 (let ((mime-charset