842
842
(goto-char (point-min))
843
843
(re-search-forward mew-eoh nil t)
844
844
(setq beg (point))
845
(while (looking-at mew-eoh) (forward-line))
845
(while (looking-at mew-eoh)
847
(if (eobp) (error "invalid message (number 1)")))
846
848
(delete-region beg (point))
847
849
;; Removing unnecessary fields from the encapsulated
848
850
;; (inner) header.
870
872
(goto-char (point-min))
871
873
(re-search-forward mew-eoh nil t)
875
(if (eobp) (error "invalid message (number %d)" (1+ i)))
873
876
(delete-region (point-min) (point)))
875
878
(mew-header-delete-lines `(,mew-x-mew-uidl:))
1298
1301
(setq search-invisible t))
1299
1302
(message "'search-invisible' is set to '%s'" search-invisible))
1304
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1309
(defun mew-normal-line ()
1310
(setq truncate-lines nil))
1312
(defun mew-summary-line ()
1314
(mew-summary-msg-or-part
1315
(let ((win (selected-window))
1319
(mew-summary-toggle-disp-msg 'on)
1320
(mew-window-configure 'message)
1323
((not (eq buffer-undo-list t)) (setq status 1))
1324
(truncate-lines (setq status 2))
1325
(t (setq status 0)))
1326
(setq status (% (1+ status) N))
1330
(setq truncate-lines nil)
1331
(message "Normal lines"))
1333
(setq buffer-undo-list nil)
1334
(mew-wrap-lines (if (mew-header-end) (1+ (mew-header-end)) (point-min)) (point-max))
1335
(message "Wrapped lines"))
1338
(primitive-undo (length buffer-undo-list) buffer-undo-list))
1339
(buffer-disable-undo)
1340
(setq truncate-lines t)
1341
(message "Long lines")))))
1342
(select-window win)))))
1344
(defcustom mew-wrap-lines-column fill-column
1345
"*Number of fill column to wrap line."
1349
(defun mew-wrap-lines (beg end)
1351
(narrow-to-region beg end)
1353
(goto-char (point-min))
1354
(let* ((adaptive-fill-mode nil)
1355
(column (min (window-width) mew-wrap-lines-column))
1356
(fill-column column)
1357
width start fill-prefix)
1359
(setq start (point))
1360
(setq fill-prefix (fill-match-adaptive-prefix))
1362
(setq width (current-column))
1365
(setq fill-column (+ column (string-width fill-prefix)))
1366
(setq fill-column column))
1367
(when (> width fill-column)
1368
(fill-region-as-paragraph start (1- (point)))))))))
1301
1370
(provide 'mew-summary4)
1303
1372
;;; Copyright Notice: