From: yamaoka Date: Tue, 29 Feb 2000 12:55:21 +0000 (+0000) Subject: (gnus-tilde-cut-form, gnus-tilde-max-form): Copy from gnus-xmas.el; X-Git-Tag: t-gnus-6_14_1-09 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ca118aa0d921d790e5685dff7aa5643baacfc20;p=elisp%2Fgnus.git- (gnus-tilde-cut-form, gnus-tilde-max-form): Copy from gnus-xmas.el; share them with XEmacs-MULE. --- diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index acbac35..dbce926 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -145,52 +145,40 @@ (fset 'gnus-truncate-string 'truncate-string-to-width) (fset 'gnus-truncate-string 'truncate-string)) + (when (boundp 'gnus-check-before-posting) + (setq gnus-check-before-posting + (delq 'long-lines + (delq 'control-chars gnus-check-before-posting)))) + )) + (when (featurep 'mule) (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 (> (string-width ,el) ,max) - ,(if (< max-width 0) - `(gnus-truncate-string - ,el (string-width ,el) - (- (string-width ,el) ,max)) - `(gnus-truncate-string ,el ,max)) - ,el) - `(let ((val (eval ,el))) - (if (> (string-width val) ,max) - ,(if (< max-width 0) - `(gnus-truncate-string - val (string-width val) - (- (string-width val) ,max)) - `(gnus-truncate-string val ,max)) - val))))) + (if (< max-width 0) + `(let ((width (string-width ,el))) + (gnus-truncate-string ,el width (- width ,max))) + `(gnus-truncate-string ,el ,max)) + (if (< max-width 0) + `(let* ((val (eval ,el)) + (width (string-width val))) + (gnus-truncate-string val width (- width ,max))) + `(let ((val (eval ,el))) + (gnus-truncate-string val ,max)))))) (defun gnus-tilde-cut-form (el cut-width) "Return a form that cuts CUT-WIDTH off of EL." (let ((cut (abs cut-width))) (if (symbolp el) - `(if (> (string-width ,el) ,cut) - ,(if (< cut-width 0) - `(gnus-truncate-string - ,el (- (string-width ,el) ,cut)) - `(gnus-truncate-string - ,el (- (string-width ,el) ,cut) ,cut)) - ,el) - `(let ((val (eval ,el))) - (if (> (string-width val) ,cut) - ,(if (< cut-width 0) - `(gnus-truncate-string - val (- (string-width val) ,cut)) - `(gnus-truncate-string - val (- (string-width val) ,cut) ,cut)) - val))))) - - (when (boundp 'gnus-check-before-posting) - (setq gnus-check-before-posting - (delq 'long-lines - (delq 'control-chars gnus-check-before-posting)))) - - ))) + (if (< cut-width 0) + `(gnus-truncate-string ,el (- (string-width ,el) ,cut)) + `(gnus-truncate-string ,el (string-width ,el) ,cut)) + (if (< cut-width 0) + `(let ((val (eval ,el))) + (gnus-truncate-string val (- (string-width val) ,cut))) + `(let ((val (eval ,el))) + (gnus-truncate-string val (string-width val) ,cut)))))) + )) (defun gnus-region-active-p () "Say whether the region is active." diff --git a/lisp/gnus.el b/lisp/gnus.el index a0d6f34..3e2250d 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -268,7 +268,7 @@ is restarted, and sometimes reloaded." (defconst gnus-version-number "6.14.1" "Version number for this version of gnus.") -(defconst gnus-revision-number "08" +(defconst gnus-revision-number "09" "Revision number for this version of gnus.") (defconst gnus-original-version-number "5.8.3"