comparison lisp/mail/rmail.el @ 14898:467e9d219590

(rmail-fontify-message, rmail-unfontify-buffer-function): Reset the buffer modified state if necessary.
author Richard M. Stallman <rms@gnu.org>
date Wed, 27 Mar 1996 23:32:46 +0000
parents afbd0214f6ec
children 9d170829f227
comparison
equal deleted inserted replaced
14897:9cce31ba2d61 14898:467e9d219590
2546 buffer-file-name buffer-file-truename) 2546 buffer-file-name buffer-file-truename)
2547 (save-restriction 2547 (save-restriction
2548 (widen) 2548 (widen)
2549 (remove-hook 'rmail-show-message-hook 'rmail-fontify-message t) 2549 (remove-hook 'rmail-show-message-hook 'rmail-fontify-message t)
2550 (remove-text-properties (point-min) (point-max) '(rmail-fontified nil)) 2550 (remove-text-properties (point-min) (point-max) '(rmail-fontified nil))
2551 (font-lock-default-unfontify-buffer)))) 2551 (font-lock-default-unfontify-buffer)
2552 (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil)))))
2552 2553
2553 (defun rmail-fontify-message () 2554 (defun rmail-fontify-message ()
2554 ;; Fontify the current message if it is not already fontified. 2555 ;; Fontify the current message if it is not already fontified.
2555 (if (text-property-any (point-min) (point-max) 'rmail-fontified nil) 2556 (if (text-property-any (point-min) (point-max) 'rmail-fontified nil)
2556 (let ((modified (buffer-modified-p)) 2557 (let ((modified (buffer-modified-p))
2558 before-change-functions after-change-functions 2559 before-change-functions after-change-functions
2559 buffer-file-name buffer-file-truename) 2560 buffer-file-name buffer-file-truename)
2560 (save-excursion 2561 (save-excursion
2561 (save-match-data 2562 (save-match-data
2562 (add-text-properties (point-min) (point-max) '(rmail-fontified t)) 2563 (add-text-properties (point-min) (point-max) '(rmail-fontified t))
2563 (font-lock-fontify-region (point-min) (point-max))))))) 2564 (font-lock-fontify-region (point-min) (point-max))
2565 (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil)))))))
2564 2566
2565 ;;;; *** Rmail Specify Inbox Files *** 2567 ;;;; *** Rmail Specify Inbox Files ***
2566 2568
2567 (autoload 'set-rmail-inbox-list "rmailmsc" 2569 (autoload 'set-rmail-inbox-list "rmailmsc"
2568 "Set the inbox list of the current RMAIL file to FILE-NAME. 2570 "Set the inbox list of the current RMAIL file to FILE-NAME.