From: yamaoka Date: Wed, 19 Sep 2001 23:07:14 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: semi-gnus~4 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64cf303baebe56f012422eae30fc9bd2295131f0;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4bb603b..16a959f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2001-09-19 Sam Steingold + + * gnus-win.el (gnus-buffer-configuration): Respect + `gnus-bug-create-help-buffer'. + +2001-09-18 Simon Josefsson + + * gnus-spec.el (gnus-correct-pad-form): Re-revert. + (gnus-parse-simple-format): Re-revert. + +2001-09-16 Katsuhiro Hermit Endo + + * gnus-spec.el (gnus-parse-complex-format): Don't fold search + case. (Thanks to Daiki Ueno .) + 2001-09-18 Simon Josefsson * gnus-spec.el (gnus-correct-pad-form): Remove until papers are diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index c7f9463..966cf60 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -377,6 +377,27 @@ (if (equal val ,ignore-value) "" val)))) +(defun gnus-correct-pad-form (el pad-width) + "Return a form that pads EL to PAD-WIDTH accounting for multi-column +characters correctly. This is because `format' may pad to columns or to +characters when given a pad value." + (let ((pad (abs pad-width)) + (side (< 0 pad-width))) + (if (symbolp el) + `(let ((need (- ,pad (gnus-correct-length ,el)))) + (if (> need 0) + (concat ,(when side '(make-string need ?\ )) + ,el + ,(when (not side) '(make-string need ?\ ))) + ,el)) + `(let* ((val (eval ,el)) + (need (- ,pad (gnus-correct-length ,el)))) + (if (> need 0) + (concat ,(when side '(make-string need ?\ )) + ,el + ,(when (not side) '(make-string need ?\ ))) + ,el))))) + (defun gnus-parse-format (format spec-alist &optional insert) ;; This function parses the FORMAT string with the help of the ;; SPEC-ALIST and returns a list that can be eval'ed to return the @@ -420,8 +441,9 @@ (insert "\")") ;; Convert point position commands. (goto-char (point-min)) - (while (re-search-forward "%\\([-0-9]+\\)?C" nil t) - (replace-match "\"(point)\"" t t)) + (let ((case-fold-search nil)) + (while (re-search-forward "%\\([-0-9]+\\)?C" nil t) + (replace-match "\"(point)\"" t t))) ;; Convert TAB commands. (goto-char (point-min)) (while (re-search-forward "%\\([-0-9]+\\)=" nil t) @@ -542,10 +564,14 @@ (setq elem '("*" ?s)))) (setq elem-type (cadr elem)) ;; Insert the new format elements. - (when pad-width + (when (and pad-width + (not (and (featurep 'xemacs) + gnus-use-correct-string-widths))) (insert (number-to-string pad-width))) ;; Create the form to be evaled. - (if (or max-width cut-width ignore-value) + (if (or max-width cut-width ignore-value + (and (featurep 'xemacs) + gnus-use-correct-string-widths)) (progn (insert ?s) (let ((el (car elem))) @@ -559,6 +585,8 @@ (setq el (gnus-tilde-cut-form el cut-width))) (when max-width (setq el (gnus-tilde-max-form el max-width))) + (when pad-width + (setq el (gnus-correct-pad-form el pad-width))) (push el flist))) (insert elem-type) (push (car elem) flist)))) diff --git a/lisp/gnus-win.el b/lisp/gnus-win.el index 07819de..acb00f9 100644 --- a/lisp/gnus-win.el +++ b/lisp/gnus-win.el @@ -145,7 +145,7 @@ ("*Shell Command Output*" 1.0))) (bug (vertical 1.0 - ("*Gnus Help Bug*" 0.5) + (if gnus-bug-create-help-buffer '("*Gnus Help Bug*" 0.5)) ("*Gnus Bug*" 1.0 point))) (score-trace (vertical 1.0