diff options
| author | Gnus developers <ding@gnus.org> | 2011-08-18 22:12:47 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2011-08-18 22:12:47 +0000 |
| commit | c7b98a1c197f91ca0dc85b4eab629b3ef5da7b09 (patch) | |
| tree | cbd1276a0d40798704c0422a088bda616a42ebf0 /lisp/gnus/gnus-spec.el | |
| parent | c7557a0f2c61ba5180b8bf53810319cce0bcc30f (diff) | |
| download | emacs-c7b98a1c197f91ca0dc85b4eab629b3ef5da7b09.tar.gz | |
Merge changes made in Gnus trunk.
nnmairix.el (nnmairix-request-set-mark, nnmairix-goto-original-article): Remove adding of article to registry, since `gnus-registry-add-group' isn't available anymore.
(nnmairix-determine-original-group-from-registry): Use `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't available anymore.
gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make things work in Emacs 22 and XEmacs, too.
gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): LRM-ify the default From.
gnus-spec.el (gnus-lrm-string-p): New macro.
(gnus-lrm-string): New constant.
(gnus-summary-line-format-spec): LRM-ify the from.
(gnus-tilde-max-form): LRM-ify string chopping.
gnus-ems.el (gnus-string-mark-left-to-right): New function.
Diffstat (limited to 'lisp/gnus/gnus-spec.el')
| -rw-r--r-- | lisp/gnus/gnus-spec.el | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index 4682f512476..0fa64a84b75 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el @@ -90,6 +90,15 @@ text properties. This is only needed on XEmacs, as Emacs does this anyway." (declare-function gnus-summary-from-or-to-or-newsgroups "gnus-sum" (header gnus-tmp-from)) +(defmacro gnus-lrm-string-p (string) + (if (fboundp 'string-mark-left-to-rigth) + `(eq (aref ,string (1- (length ,string))) 8206) + nil)) + +(defvar gnus-lrm-string (if (ignore-errors (string 8206)) + (propertize (string 8206) 'invisible t) + "")) + (defun gnus-summary-line-format-spec () (insert gnus-tmp-unread gnus-tmp-replied gnus-tmp-score-char gnus-tmp-indentation) @@ -103,7 +112,9 @@ text properties. This is only needed on XEmacs, as Emacs does this anyway." (gnus-summary-from-or-to-or-newsgroups gnus-tmp-header gnus-tmp-from)))) (if (> (length val) 23) - (substring val 0 23) + (if (gnus-lrm-string-p val) + (concat (substring val 0 23) gnus-lrm-string) + (substring val 0 23)) val)) gnus-tmp-closing-bracket)) (point)) @@ -351,13 +362,17 @@ Return a list of updated types." `(if (> (,length-fun ,el) ,max) ,(if (< max-width 0) `(,substring-fun ,el (- (,length-fun ,el) ,max)) - `(,substring-fun ,el 0 ,max)) + `(if (gnus-lrm-string-p ,el) + (concat (,substring-fun ,el 0 ,max) ,gnus-lrm-string) + (,substring-fun ,el 0 ,max))) ,el) `(let ((val (eval ,el))) (if (> (,length-fun val) ,max) ,(if (< max-width 0) `(,substring-fun val (- (,length-fun val) ,max)) - `(,substring-fun val 0 ,max)) + `(if (gnus-lrm-string-p val) + (concat (,substring-fun val 0 ,max) ,gnus-lrm-string) + (,substring-fun val 0 ,max))) val))))) (defun gnus-tilde-cut-form (el cut-width) |
