From: ueno Date: Fri, 19 Nov 2004 08:08:21 +0000 (+0000) Subject: * riece-yank.el (riece-yank-strip-space): Bind space-width. X-Git-Tag: riece-1_0_6~43 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fd821a83b8d61f13b42eca7e85a86c1dd22c5f4;p=elisp%2Friece.git * riece-yank.el (riece-yank-strip-space): Bind space-width. --- 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)