* liece-commands.el (liece-command-join-channel): User
[elisp/liece.git] / lisp / liece.el
index 1dee0ef..86337a7 100644 (file)
@@ -145,8 +145,7 @@ For efficiency this should be prime.  See documentation of intern and
     "\C-c9" liece-switch-to-channel-no-19
     "\C-c0" liece-switch-to-channel-no-20))
 
-;;; Keymap macros. -- borrowd from `gnus-util.el'.
-
+;;; Keymap macros. -- borrowed from `gnus-util.el'.
 (defmacro liece-local-set-keys (&rest plist)
   "Set the keys in PLIST in the current keymap."
   `(liece-define-keys-1 (current-local-map) ',plist))
@@ -464,7 +463,7 @@ If optional argument SERVICE is non-nil, open by the service name."
       ;; notify the real nickname to the user.
       (or liece-real-nickname
          (setq liece-real-nickname
-               (truncate-string liece-nickname liece-nick-max-length)))
+               (truncate-string-to-width liece-nickname liece-nick-max-length)))
       (setq liece-nickname-last liece-real-nickname
            liece-nick-accepted 'sent
            liece-after-registration t))))
@@ -864,7 +863,7 @@ If such a buffer is found, shrink it."
              (delete-region (point-min)
                             (progn
                               (goto-char (- (buffer-size)
-                                            liece-buffer-default-size))
+                                            liece-buffer-min-size))
                               (beginning-of-line -1)
                               (point)))
              (garbage-collect)
@@ -875,8 +874,8 @@ If such a buffer is found, shrink it."
 Only used from `liece-before-insert-functions'."
   (and (> liece-buffer-check-interval 0)
        (or (null liece-buffer-last-check-time)
-          (> (liece-time-difference liece-buffer-last-check-time
-                                    (current-time))
+          (> (liece-time-difference (current-time)
+                                    liece-buffer-last-check-time)
              liece-buffer-check-interval))
        (liece-check-buffers)))