From: ichikawa Date: Wed, 5 Aug 1998 13:11:14 +0000 (+0000) Subject: lisp/gnus-ems.el (gnus-tilde-max-form): Redefine instead of (gnus-summary-line-format... X-Git-Tag: gnus-6_8_7~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cfe6fcfee53ec44f6614ce2b1a2c499ae96366db;p=elisp%2Fgnus.git- lisp/gnus-ems.el (gnus-tilde-max-form): Redefine instead of (gnus-summary-line-format-spec) to display Japanese charactercorrectly in Gnus summaly. --- diff --git a/ChangeLog b/ChangeLog index 3d5ff05..a08ea00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1998-08-05 Tatsuya Ichikawa + + * lisp/gnus-start.el (gnus-read-init-file): Fix indent. + * lisp/gnus-ems.el (gnus-tilde-max-form): Redefine instead of + (gnus-summary-line-format-spec) to display Japanese character + correctly in Gnus summaly. + 1998-08-05 Keiichi Suzuki * lisp/gnus-start.el (gnus-read-init-file): Don't restrict diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 8138113..7ded205 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -246,23 +246,23 @@ (fset 'gnus-cite-add-face 'gnus-mule-cite-add-face) (fset 'gnus-max-width-function 'gnus-mule-max-width-function) - (defun gnus-summary-line-format-spec () - (insert gnus-tmp-unread gnus-tmp-replied - gnus-tmp-score-char gnus-tmp-indentation) - (put-text-property - (point) - (progn - (insert - gnus-tmp-opening-bracket - (format "%4d: %-20s" - gnus-tmp-lines - (if (> (length gnus-tmp-name) 20) - (truncate-string gnus-tmp-name 20) - gnus-tmp-name)) - gnus-tmp-closing-bracket) - (point)) - gnus-mouse-face-prop gnus-mouse-face) - (insert " " gnus-tmp-subject-or-nil "\n")) + (defun gnus-tilde-max-form (el max-width) + "Return a form that limits EL to MAX-WIDTH." + (let ((max (abs max-width))) + (if (symbolp el) + `(if (> (length ,el) ,max) + ,(if (< max-width 0) + `(truncate-string + ,el (string-width ,el) (- (string-width ,el) ,max)) + `(truncate-string ,el ,max)) + ,el) + `(let ((val (eval ,el))) + (if (> (length val) ,max) + ,(if (< max-width 0) + `(truncate-string + val (string-width val) (- (string-width val) ,max)) + `(truncate-string val ,max)) + val))))) ) ))) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index f19e38c..07f2a9a 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -429,7 +429,7 @@ Can be used to turn version control on or off." (file-exists-p (concat file ".el")) (file-exists-p (concat file ".elc"))) (condition-case var - (load file nil t) + (load file nil t) (error (error "Error in %s: %s" file var)))))))))