From: ueno Date: Sun, 1 Jun 2003 20:46:47 +0000 (+0000) Subject: * riece-user.el (riece-rename-user): Don't modify entry when X-Git-Tag: riece-0_0_3~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcf4047c3d3f452e1fd94e50ebb56558b22b021f;p=elisp%2Friece.git * riece-user.el (riece-rename-user): Don't modify entry when old-name == new-name. --- 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.