X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Friece-message.el;h=e32c45f28fbf8347864dd8fcc88fe946591ee749;hb=c87b8b5e7dcba14804b7f0bee453a0a4093f3e85;hp=ea6285f9e55330f7626667cca17e96e651219326;hpb=79adb8e4cb64b053e7346b77dcb10be52f4a39a9;p=elisp%2Friece.git diff --git a/lisp/riece-message.el b/lisp/riece-message.el index ea6285f..e32c45f 100644 --- a/lisp/riece-message.el +++ b/lisp/riece-message.el @@ -18,8 +18,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -30,7 +30,7 @@ (require 'riece-misc) (defgroup riece-message nil - "Messages" + "Display messages." :tag "Message" :prefix "riece-" :group 'riece) @@ -66,10 +66,10 @@ (defun riece-message-make-open-bracket (message) "Make `open-bracket' string for MESSAGE." - (if (riece-message-own-p message) - ">" - (if (eq (riece-message-type message) 'notice) - "{" + (if (eq (riece-message-type message) 'notice) + "{" + (if (riece-message-own-p message) + ">" (if (riece-message-private-p message) "=" (if (riece-message-external-p message) @@ -78,10 +78,10 @@ (defun riece-message-make-close-bracket (message) "Make `close-bracket' string for MESSAGE." - (if (riece-message-own-p message) - "<" - (if (eq (riece-message-type message) 'notice) - "}" + (if (eq (riece-message-type message) 'notice) + "}" + (if (riece-message-own-p message) + "<" (if (riece-message-private-p message) "=" (if (riece-message-external-p message) @@ -114,7 +114,7 @@ (riece-message-target message)))) (unless (riece-identity-member target riece-current-channels) (riece-join-channel target) - ;; If you are not joined any channel, + ;; If you are not joined to any channel, ;; switch to the target immediately. (unless riece-current-channel (riece-switch-to-channel target))) @@ -174,13 +174,14 @@ Normally they are *Dialogue* and/or *Others*." (setq parent-buffers (riece-message-parent-buffers message buffer)) (riece-insert buffer (riece-format-message message)) (riece-insert parent-buffers (riece-format-message message t)) - (run-hook-with-args 'riece-after-display-message-functions message))) + (with-current-buffer buffer + (run-hook-with-args 'riece-after-display-message-functions message)))) (defun riece-display-message (message) "Display MESSAGE object." (let ((functions riece-message-filter-functions)) (setq message (copy-sequence message)) - (while functions + (while (and functions message) (setq message (funcall (car functions) message) functions (cdr functions))) (if message