- (if wl-on-emacs21
- (progn
- ;; Decode bitmap data line by line.
- (let ((coding-system-for-read 'raw-text))
- (insert-file-contents file))
- (while (not (eobp))
- (decode-coding-region (point) (line-end-position)
- 'iso-2022-7bit)
- (forward-line 1))
- (goto-char (point-min)))
- (let ((coding-system-for-read 'iso-2022-7bit)
- (input-coding-system '*iso-2022-jp*))
- (insert-file-contents file)))
- (end-of-line)
+ (let ((coding-system-for-read 'iso-2022-7bit)
+ (input-coding-system '*iso-2022-jp*))
+ (insert-file-contents file))
+ (goto-char (point-max))
+ (unless (bolp)
+ (insert "\n"))
+ (setq width 0)
+ (while (progn
+ (end-of-line 0)
+ (not (bobp)))
+ (setq width (max width (current-column))))
+ ;; Emacs 21.1 would fail to decode composite chars
+ ;; if it has been built without fixing coding.c.
+ (when (and wl-on-emacs21
+ (>= width 80))
+ (erase-buffer)
+ (let ((coding-system-for-read 'raw-text))
+ (insert-file-contents file))
+ (goto-char (point-max))
+ (unless (bolp)
+ (insert "\n"))
+ (setq width 0)
+ (while (progn
+ (end-of-line 0)
+ (not (bobp)))
+ ;; Decode bitmap data line by line.
+ (decode-coding-region (line-beginning-position)
+ (point)
+ 'iso-2022-7bit)
+ (setq width (max width (current-column)))))