From dcf4047c3d3f452e1fd94e50ebb56558b22b021f Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 1 Jun 2003 20:46:47 +0000 Subject: [PATCH] * riece-user.el (riece-rename-user): Don't modify entry when old-name == new-name. --- lisp/ChangeLog | 3 +++ lisp/riece-user.el | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b1af093..678c6f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2003-06-01 Daiki Ueno + * riece-user.el (riece-rename-user): Don't modify entry when + old-name == new-name. + * riece-display.el (riece-configure-windows): Use window-buffer instead of current-buffer. diff --git a/lisp/riece-user.el b/lisp/riece-user.el index 28d061c..f74f770 100644 --- a/lisp/riece-user.el +++ b/lisp/riece-user.el @@ -48,14 +48,16 @@ (defun riece-rename-user (old-name new-name) (riece-with-server-buffer - (let ((symbol (intern-soft (downcase (riece-identity-prefix old-name)) - riece-obarray))) - (when symbol - (set (intern (downcase (riece-identity-prefix new-name)) - riece-obarray) - (symbol-value symbol)) - (makunbound symbol) - (unintern (symbol-name symbol) riece-obarray))))) + (unless (equal (downcase (riece-identity-prefix old-name)) + (downcase (riece-identity-prefix new-name))) + (let ((symbol (intern-soft (downcase (riece-identity-prefix old-name)) + riece-obarray))) + (when symbol + (set (intern (downcase (riece-identity-prefix new-name)) + riece-obarray) + (symbol-value symbol)) + (makunbound symbol) + (unintern (symbol-name symbol) riece-obarray)))))) (defun riece-make-user (&optional channels user-at-host modes away) "Make an instance of user object. -- 1.7.10.4