[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109692: * lisp/mail/rmailout.el (rma
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109692: * lisp/mail/rmailout.el (rmail-output-read-file-name): Trap errors |
Date: |
Mon, 20 Aug 2012 00:45:10 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109692
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2012-08-20 00:45:10 -0700
message:
* lisp/mail/rmailout.el (rmail-output-read-file-name): Trap errors
in rmail-output-file-alist elements, and report them.
modified:
lisp/ChangeLog
lisp/mail/rmailout.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-08-20 07:30:40 +0000
+++ b/lisp/ChangeLog 2012-08-20 07:45:10 +0000
@@ -1,5 +1,8 @@
2012-08-20 Glenn Morris <address@hidden>
+ * mail/rmailout.el (rmail-output-read-file-name):
+ Trap and report errors in rmail-output-file-alist elements.
+
* font-lock.el (font-lock-add-keywords): Doc fix (quote face names
since most non-font-lock faces are not also variables).
=== modified file 'lisp/mail/rmailout.el'
--- a/lisp/mail/rmailout.el 2012-08-19 18:41:35 +0000
+++ b/lisp/mail/rmailout.el 2012-08-20 07:45:10 +0000
@@ -74,13 +74,21 @@
(widen)
(narrow-to-region beg end)
(let ((tail rmail-output-file-alist)
- answer)
+ answer err)
;; 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 answer
+ (condition-case err
+ (eval (cdar tail))
+ (error
+ (display-warning
+ :error
+ (format "Error evaluating \
+`rmail-output-file-alist' element:\nregexp: %s\naction: %s\nerror: %S\n"
+ (caar tail) (cdar tail) err))
+ nil))))
(setq tail (cdr tail)))
answer))))))
;; If no suggestion, use same file as last time.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109692: * lisp/mail/rmailout.el (rmail-output-read-file-name): Trap errors,
Glenn Morris <=