+2006-03-09 Henrik Enberg <enberg@printf.se>
+
+ * rmail.el (rmail-narrow-to-header): Don't end error message with
+ a period.
+
+ * rmailhdr.el (rmail-header-get-limit): Don't end error message
+ with a period.
+
+ * rmaildesc.el (rmail-desc-get-header-display-state): Make sure
+ whole header region is searched for overlays.
+
+ * rmailedit.el (rmail-edit-current-message): Use
+ rmail-head-show-headers instead of rmail-toggle-header.
+ (rmail-cease-edit): Likewise. Simplify.
+
2006-03-02 Alex Schroeder <alex@gnu.org>
* rmailkwd.el (rmail-read-label): Since rmail-keywords is a list
(setq rmail-old-pruned (rmail-msg-is-pruned))
(make-local-variable 'rmail-edit-saved-coding-system)
(setq rmail-edit-saved-coding-system save-buffer-coding-system)
- (rmail-toggle-header 0)
+ ;; (rmail-toggle-header 0)
+ (rmail-header-show-headers)
(rmail-edit-mode)
;; As the local value of save-buffer-coding-system is deleted by
;; rmail-edit-mode, we restore the original value.
(defun rmail-cease-edit ()
"Finish editing message; switch back to Rmail proper."
(interactive)
- (if (rmail-summary-exists)
- (save-excursion
- (set-buffer rmail-summary-buffer)
- (rmail-summary-enable)))
+ (when (rmail-summary-exists)
+ (with-current-buffer rmail-summary-buffer
+ (rmail-summary-enable)))
;; Make sure buffer ends with a newline.
(save-excursion
(goto-char (point-max))
- (if (/= (preceding-char) ?\n)
- (insert "\n"))
+ (when (/= (preceding-char) ?\n)
+ (insert "\n"))
;; Adjust the marker that points to the end of this message, unless
;; we're at the last message.
(when (< rmail-current-message (length rmail-desc-vector))
;; As the local value of save-buffer-coding-system is changed by
;; rmail-variables, we restore the original value.
(setq save-buffer-coding-system rmail-edit-saved-coding-system)
- (if (and (= (length old) (- (point-max) (point-min)))
- (string= old (buffer-substring (point-min) (point-max))))
- ()
+ (unless (and (= (length old) (- (point-max) (point-min)))
+ (string= old (buffer-substring (point-min) (point-max))))
(setq old nil)
(rmail-set-attribute "edited" t))
(save-excursion
(rmail-show-message)
- (rmail-toggle-header (if rmail-old-pruned 1 0))))
+ ;; `rmail-show-message' always hides the headers, so we show them
+ ;; here if they were visible before starting the edit.
+ (when rmail-old-pruned
+ (rmail-header-show-headers))))
(run-hooks 'rmail-mode-hook)
(setq buffer-read-only t))