From 3fd821a83b8d61f13b42eca7e85a86c1dd22c5f4 Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 19 Nov 2004 08:08:21 +0000 Subject: [PATCH] * riece-yank.el (riece-yank-strip-space): Bind space-width. --- lisp/ChangeLog | 2 ++ lisp/riece-yank.el | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1460097..9493254 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2004-11-19 Daiki Ueno + * riece-yank.el (riece-yank-strip-space): Bind space-width. + * riece-xemacs.el (riece-recent-messages): New function. * riece-emacs.el (riece-recent-messages): New function. * riece.el (riece-submit-bug-report): Use riece-recent-messages diff --git a/lisp/riece-yank.el b/lisp/riece-yank.el index a03c71f..9419e5f 100644 --- a/lisp/riece-yank.el +++ b/lisp/riece-yank.el @@ -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) -- 1.7.10.4