X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Friece-yank.el;h=12a21cc530004d57246eaecde31e8cd050b7917f;hb=d691608bce93bd387d5ff6a02c11f683226c021e;hp=862891c09cf21c3352a3b13832f1b0bb260d0c7c;hpb=8517a35ca312656e5bc8343b02d5e26969645ac8;p=elisp%2Friece.git diff --git a/lisp/riece-yank.el b/lisp/riece-yank.el index 862891c..12a21cc 100644 --- a/lisp/riece-yank.el +++ b/lisp/riece-yank.el @@ -1,4 +1,4 @@ -;;; riece-kill.el --- enter the element in kill-ring +;;; riece-yank.el --- enter the element in kill-ring ;; Copyright (C) 2004 Masatake YAMATO ;; Author: Masatake YAMATO @@ -23,7 +23,7 @@ ;; ;; In riece's command buffer, you can send the top element of kill-ring ;; by C-c y. -;; Don't forget do (riece-command-enable-addon 'riece-yank). +;; Don't forget do (riece-command-enable-addon 'riece-yank) to test. ;; ;;; Code: (require 'riece-commands) @@ -70,14 +70,14 @@ before/after the first/last non-blank line." (while (progn (beginning-of-line) (looking-at " *$")) (delete-region (point) (progn (end-of-line 0) (point)))) ;; Delete common spaces in front of lines. - (setq space-width (point-max)) - (while (looking-at " +") - (setq space-width (min space-width (length (match-string 0)))) - (forward-line)) - (goto-char (point-min)) - (while (not (eobp)) - (delete-char space-width) - (forward-line)) + (let ((space-width (point-max))) + (while (looking-at " +") + (setq space-width (min space-width (length (match-string 0)))) + (forward-line)) + (goto-char (point-min)) + (while (not (eobp)) + (delete-char space-width) + (forward-line))) (buffer-string))) (defun riece-command-yank (arg prefix) @@ -86,7 +86,7 @@ before/after the first/last non-blank line." (string= prefix "")) (setq prefix " ")) (let* ((kill (current-kill 0)) - msg space-width) + msg) (unless kill (error "Nothing to send in kill-ring")) (if riece-yank-strip-space @@ -97,7 +97,7 @@ before/after the first/last non-blank line." (lambda (x) (riece-command-send-message (concat prefix x) arg) ;; Without next line, you will be kicked out from ircd. - ;; It may means "Don't send much data at once." + ;; It may mean "Don't send much data at once." (sit-for riece-yank-tick)) msg))))