From: yamaoka Date: Wed, 22 Dec 2004 03:28:54 +0000 (+0000) Subject: Synch to No Gnus 200412220328. X-Git-Tag: t-gnus-6_17_4-quimby-~621 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da737675780bb8cb3bf68d371d407fae9938fafe;p=elisp%2Fgnus.git- Synch to No Gnus 200412220328. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bb335d1..d8c3672 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-22 Katsumi Yamaoka + + * gnus-spec.el (gnus-spec-tab): Make a Lisp form which works + correctly even if there are wide characters. + 2004-12-21 Teodor Zlatanov * spam.el (spam-check-BBDB): fix the BBDB caching code to use diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index 03593ba..799134e 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -323,21 +323,15 @@ Return a list of updated types." (defun gnus-spec-tab (column) (if (> column 0) - `(insert (make-string (max (- ,column (current-column)) 0) ? )) + `(insert-char ? (max (- ,column (current-column)) 0)) (let ((column (abs column))) - (if gnus-use-correct-string-widths - `(progn - (if (> (current-column) ,column) - (while (progn - (delete-backward-char 1) - (> (current-column) ,column)))) - (insert (make-string (max (- ,column (current-column)) 0) ? ))) - `(progn - (if (> (current-column) ,column) - (delete-region (point) - (- (point) (- (current-column) ,column))) - (insert (make-string (max (- ,column (current-column)) 0) - ? )))))))) + `(if (> (current-column) ,column) + (let ((end (point))) + (if (= (move-to-column ,column) ,column) + (delete-region (point) end) + (delete-region (1- (point)) end) + (insert " "))) + (insert-char ? (max (- ,column (current-column)) 0)))))) (defun gnus-correct-length (string) "Return the correct width of STRING."