Permalink
Browse files

Notice the error when sending a message failed in `navi2ch-message-se…

…nd-message'.

メッセージの投稿に失敗したさいに、 `navi2ch-message-insert-notice' を使っ
て投稿エラーを通知するようにした。
  • Loading branch information...
1 parent 34864ff commit addd7fbc18da2b79deaa48e986c31c20db9f9f55 @naota committed Nov 13, 2010
Showing with 8 additions and 2 deletions.
  1. +1 −0 ChangeLog
  2. +7 −2 navi2ch-message.el
View
@@ -2,6 +2,7 @@
* navi2ch-message.el (navi2ch-message-insert-notice): New
function.
+ (navi2ch-message-send-message): Use it.
2010-11-12 Naohiro Aota <naota@elisp.net>
View
@@ -319,8 +319,13 @@
(bury-buffer navi2ch-message-backup-buffer-name)))))
(navi2ch-message-samba24)
(run-hooks 'navi2ch-message-after-send-hook)
- (when result
- (navi2ch-message-exit 'after-send))))))
+ (if result
+ (navi2ch-message-exit 'after-send)
+ (let ((errmsg (current-message)))
+ (when (and errmsg
+ (string-match ": " errmsg))
+ (setq errmsg (substring errmsg (match-end 0)))
+ (navi2ch-message-insert-notice (concat "$BEj9F%(%i!<(B: " errmsg)))))))))
(defun navi2ch-message-set-name (name)
(save-excursion

0 comments on commit addd7fb

Please sign in to comment.