[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109682: Fix previous rmail-output-re
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109682: Fix previous rmail-output-read-file-name change |
Date: |
Sun, 19 Aug 2012 11:41:35 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109682
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2012-08-19 11:41:35 -0700
message:
Fix previous rmail-output-read-file-name change
* lisp/mail/rmailout.el (rmail-output-read-file-name):
Fix previous change (when the alist is nil or does not match).
modified:
lisp/ChangeLog
lisp/mail/rmailout.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-08-19 06:37:15 +0000
+++ b/lisp/ChangeLog 2012-08-19 18:41:35 +0000
@@ -1,3 +1,8 @@
+2012-08-19 Glenn Morris <address@hidden>
+
+ * mail/rmailout.el (rmail-output-read-file-name):
+ Fix previous change (when the alist is nil or does not match).
+
2012-08-19 Chong Yidong <address@hidden>
* xml.el (xml-escape-string): Don't refer to xml-entity-alist
=== modified file 'lisp/mail/rmailout.el'
--- a/lisp/mail/rmailout.el 2012-08-17 20:38:47 +0000
+++ b/lisp/mail/rmailout.el 2012-08-19 18:41:35 +0000
@@ -61,27 +61,30 @@
Set `rmail-default-file' to this name as well as returning it.
This uses `rmail-output-file-alist'."
(let* ((default-file
- (when rmail-output-file-alist
- (or rmail-buffer (error "There is no Rmail buffer"))
- (save-current-buffer
- (set-buffer rmail-buffer)
- (let ((beg (rmail-msgbeg rmail-current-message))
- (end (rmail-msgend rmail-current-message)))
- (if (rmail-buffers-swapped-p) (set-buffer rmail-view-buffer))
- (save-excursion
- (save-restriction
- (widen)
- (narrow-to-region beg end)
- (let ((tail rmail-output-file-alist)
- answer)
- ;; Suggest a file based on a pattern match.
- (while (and tail (not answer))
- (goto-char (point-min))
- (if (re-search-forward (caar tail) nil t)
- (setq answer (eval (cdar tail))))
- (setq tail (cdr tail)))
- ;; If no suggestion, use same file as last time.
- (or answer rmail-default-file))))))))
+ (or
+ (when rmail-output-file-alist
+ (or rmail-buffer (error "There is no Rmail buffer"))
+ (save-current-buffer
+ (set-buffer rmail-buffer)
+ (let ((beg (rmail-msgbeg rmail-current-message))
+ (end (rmail-msgend rmail-current-message)))
+ (if (rmail-buffers-swapped-p) (set-buffer rmail-view-buffer))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (narrow-to-region beg end)
+ (let ((tail rmail-output-file-alist)
+ answer)
+ ;; Suggest a file based on a pattern match.
+ (while (and tail (not answer))
+ (goto-char (point-min))
+ (if (re-search-forward (caar tail) nil t)
+ ;; FIXME trap and report any errors.
+ (setq answer (eval (cdar tail))))
+ (setq tail (cdr tail)))
+ answer))))))
+ ;; If no suggestion, use same file as last time.
+ rmail-default-file))
(read-file
(expand-file-name
(read-file-name
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109682: Fix previous rmail-output-read-file-name change,
Glenn Morris <=