diff options
| author | Gnus developers | 2011-08-18 22:12:47 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-08-18 22:12:47 +0000 |
| commit | c7b98a1c197f91ca0dc85b4eab629b3ef5da7b09 (patch) | |
| tree | cbd1276a0d40798704c0422a088bda616a42ebf0 /lisp | |
| parent | c7557a0f2c61ba5180b8bf53810319cce0bcc30f (diff) | |
| download | emacs-c7b98a1c197f91ca0dc85b4eab629b3ef5da7b09.tar.gz emacs-c7b98a1c197f91ca0dc85b4eab629b3ef5da7b09.zip | |
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')
| -rw-r--r-- | lisp/gnus/ChangeLog | 22 | ||||
| -rw-r--r-- | lisp/gnus/gnus-ems.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-spec.el | 21 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/nnmairix.el | 23 |
5 files changed, 52 insertions, 23 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 744f94da21d..230bd8a6508 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,27 @@ | |||
| 1 | 2011-08-18 David Engster <dengste@eml.cc> | ||
| 2 | |||
| 3 | * nnmairix.el (nnmairix-request-set-mark) | ||
| 4 | (nnmairix-goto-original-article): Remove adding of article to registry, | ||
| 5 | since `gnus-registry-add-group' isn't available anymore. | ||
| 6 | (nnmairix-determine-original-group-from-registry): Use | ||
| 7 | `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't | ||
| 8 | available anymore. | ||
| 9 | |||
| 1 | 2011-08-17 Lars Magne Ingebrigtsen <larsi@gnus.org> | 10 | 2011-08-17 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 11 | ||
| 12 | * gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make | ||
| 13 | things work in Emacs 22 and XEmacs, too. | ||
| 14 | |||
| 15 | * gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): LRM-ify the | ||
| 16 | default From. | ||
| 17 | |||
| 18 | * gnus-spec.el (gnus-lrm-string-p): New macro. | ||
| 19 | (gnus-lrm-string): New constant. | ||
| 20 | (gnus-summary-line-format-spec): LRM-ify the from. | ||
| 21 | (gnus-tilde-max-form): LRM-ify string chopping. | ||
| 22 | |||
| 23 | * gnus-ems.el (gnus-string-mark-left-to-right): New function. | ||
| 24 | |||
| 3 | * message.el (message-is-yours-p): Allow disabling canlock checking | 25 | * message.el (message-is-yours-p): Allow disabling canlock checking |
| 4 | (bug#9295). | 26 | (bug#9295). |
| 5 | (message-shoot-gnksa-feet): Add `canlock-verify'. | 27 | (message-shoot-gnksa-feet): Add `canlock-verify'. |
diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el index bc85e4960d4..aed471c38f4 100644 --- a/lisp/gnus/gnus-ems.el +++ b/lisp/gnus/gnus-ems.el | |||
| @@ -209,6 +209,11 @@ | |||
| 209 | (setq start end | 209 | (setq start end |
| 210 | end nil)))))) | 210 | end nil)))))) |
| 211 | 211 | ||
| 212 | (defmacro gnus-string-mark-left-to-right (string) | ||
| 213 | (if (fboundp 'string-mark-left-to-right) | ||
| 214 | `(string-mark-left-to-right ,string) | ||
| 215 | string)) | ||
| 216 | |||
| 212 | (eval-and-compile | 217 | (eval-and-compile |
| 213 | ;; XEmacs does not have window-inside-pixel-edges | 218 | ;; XEmacs does not have window-inside-pixel-edges |
| 214 | (defalias 'gnus-window-inside-pixel-edges | 219 | (defalias 'gnus-window-inside-pixel-edges |
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." | |||
| 90 | (declare-function gnus-summary-from-or-to-or-newsgroups "gnus-sum" | 90 | (declare-function gnus-summary-from-or-to-or-newsgroups "gnus-sum" |
| 91 | (header gnus-tmp-from)) | 91 | (header gnus-tmp-from)) |
| 92 | 92 | ||
| 93 | (defmacro gnus-lrm-string-p (string) | ||
| 94 | (if (fboundp 'string-mark-left-to-rigth) | ||
| 95 | `(eq (aref ,string (1- (length ,string))) 8206) | ||
| 96 | nil)) | ||
| 97 | |||
| 98 | (defvar gnus-lrm-string (if (ignore-errors (string 8206)) | ||
| 99 | (propertize (string 8206) 'invisible t) | ||
| 100 | "")) | ||
| 101 | |||
| 93 | (defun gnus-summary-line-format-spec () | 102 | (defun gnus-summary-line-format-spec () |
| 94 | (insert gnus-tmp-unread gnus-tmp-replied | 103 | (insert gnus-tmp-unread gnus-tmp-replied |
| 95 | gnus-tmp-score-char gnus-tmp-indentation) | 104 | gnus-tmp-score-char gnus-tmp-indentation) |
| @@ -103,7 +112,9 @@ text properties. This is only needed on XEmacs, as Emacs does this anyway." | |||
| 103 | (gnus-summary-from-or-to-or-newsgroups | 112 | (gnus-summary-from-or-to-or-newsgroups |
| 104 | gnus-tmp-header gnus-tmp-from)))) | 113 | gnus-tmp-header gnus-tmp-from)))) |
| 105 | (if (> (length val) 23) | 114 | (if (> (length val) 23) |
| 106 | (substring val 0 23) | 115 | (if (gnus-lrm-string-p val) |
| 116 | (concat (substring val 0 23) gnus-lrm-string) | ||
| 117 | (substring val 0 23)) | ||
| 107 | val)) | 118 | val)) |
| 108 | gnus-tmp-closing-bracket)) | 119 | gnus-tmp-closing-bracket)) |
| 109 | (point)) | 120 | (point)) |
| @@ -351,13 +362,17 @@ Return a list of updated types." | |||
| 351 | `(if (> (,length-fun ,el) ,max) | 362 | `(if (> (,length-fun ,el) ,max) |
| 352 | ,(if (< max-width 0) | 363 | ,(if (< max-width 0) |
| 353 | `(,substring-fun ,el (- (,length-fun ,el) ,max)) | 364 | `(,substring-fun ,el (- (,length-fun ,el) ,max)) |
| 354 | `(,substring-fun ,el 0 ,max)) | 365 | `(if (gnus-lrm-string-p ,el) |
| 366 | (concat (,substring-fun ,el 0 ,max) ,gnus-lrm-string) | ||
| 367 | (,substring-fun ,el 0 ,max))) | ||
| 355 | ,el) | 368 | ,el) |
| 356 | `(let ((val (eval ,el))) | 369 | `(let ((val (eval ,el))) |
| 357 | (if (> (,length-fun val) ,max) | 370 | (if (> (,length-fun val) ,max) |
| 358 | ,(if (< max-width 0) | 371 | ,(if (< max-width 0) |
| 359 | `(,substring-fun val (- (,length-fun val) ,max)) | 372 | `(,substring-fun val (- (,length-fun val) ,max)) |
| 360 | `(,substring-fun val 0 ,max)) | 373 | `(if (gnus-lrm-string-p val) |
| 374 | (concat (,substring-fun val 0 ,max) ,gnus-lrm-string) | ||
| 375 | (,substring-fun val 0 ,max))) | ||
| 361 | val))))) | 376 | val))))) |
| 362 | 377 | ||
| 363 | (defun gnus-tilde-cut-form (el cut-width) | 378 | (defun gnus-tilde-cut-form (el cut-width) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index dda9cb3fbf6..cd4699e6107 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -3709,7 +3709,9 @@ buffer that was in action when the last article was fetched." | |||
| 3709 | gnus-newsgroup-name)) 'nntp) | 3709 | gnus-newsgroup-name)) 'nntp) |
| 3710 | (gnus-group-real-name gnus-newsgroup-name)))) | 3710 | (gnus-group-real-name gnus-newsgroup-name)))) |
| 3711 | (concat gnus-summary-newsgroup-prefix newsgroups))))) | 3711 | (concat gnus-summary-newsgroup-prefix newsgroups))))) |
| 3712 | (inline (gnus-summary-extract-address-component gnus-tmp-from))))) | 3712 | (gnus-string-mark-left-to-right |
| 3713 | (inline | ||
| 3714 | (gnus-summary-extract-address-component gnus-tmp-from)))))) | ||
| 3713 | 3715 | ||
| 3714 | (defun gnus-summary-insert-line (gnus-tmp-header | 3716 | (defun gnus-summary-insert-line (gnus-tmp-header |
| 3715 | gnus-tmp-level gnus-tmp-current | 3717 | gnus-tmp-level gnus-tmp-current |
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el index b82d6c2ee7b..3d1ac02b6aa 100644 --- a/lisp/gnus/nnmairix.el +++ b/lisp/gnus/nnmairix.el | |||
| @@ -604,9 +604,7 @@ Other back ends might or might not work.") | |||
| 604 | 604 | ||
| 605 | ;; Silence byte-compiler. | 605 | ;; Silence byte-compiler. |
| 606 | (defvar gnus-registry-install) | 606 | (defvar gnus-registry-install) |
| 607 | (autoload 'gnus-registry-fetch-group "gnus-registry") | 607 | (autoload 'gnus-registry-get-id-key "gnus-registry") |
| 608 | (autoload 'gnus-registry-fetch-groups "gnus-registry") | ||
| 609 | (autoload 'gnus-registry-add-group "gnus-registry") | ||
| 610 | 608 | ||
| 611 | (deffoo nnmairix-request-set-mark (group actions &optional server) | 609 | (deffoo nnmairix-request-set-mark (group actions &optional server) |
| 612 | (when server | 610 | (when server |
| @@ -660,13 +658,7 @@ Other back ends might or might not work.") | |||
| 660 | nnmairix-only-use-registry) | 658 | nnmairix-only-use-registry) |
| 661 | (setq ogroup | 659 | (setq ogroup |
| 662 | (nnmairix-determine-original-group-from-path | 660 | (nnmairix-determine-original-group-from-path |
| 663 | mid nnmairix-current-server)) | 661 | mid nnmairix-current-server))) |
| 664 | ;; if available and allowed, add this entry to the registry | ||
| 665 | (when (and (boundp 'gnus-registry-install) | ||
| 666 | gnus-registry-install) | ||
| 667 | (dolist (cur ogroup) | ||
| 668 | (unless (gnus-parameter-registry-ignore cur) | ||
| 669 | (gnus-registry-add-group mid cur))))) | ||
| 670 | (unless ogroup | 662 | (unless ogroup |
| 671 | (nnheader-message | 663 | (nnheader-message |
| 672 | 3 "Unable to set mark: couldn't find original group for %s" mid) | 664 | 3 "Unable to set mark: couldn't find original group for %s" mid) |
| @@ -1630,14 +1622,7 @@ search in raw mode." | |||
| 1630 | ;; registry was not available or did not find article | 1622 | ;; registry was not available or did not find article |
| 1631 | ;; so we search again with mairix in raw mode to get filename | 1623 | ;; so we search again with mairix in raw mode to get filename |
| 1632 | (setq allgroups | 1624 | (setq allgroups |
| 1633 | (nnmairix-determine-original-group-from-path mid server)) | 1625 | (nnmairix-determine-original-group-from-path mid server))) |
| 1634 | ;; if available and allowed, add this entry to the registry | ||
| 1635 | (when (and (not no-registry) | ||
| 1636 | (boundp 'gnus-registry-install) | ||
| 1637 | gnus-registry-install) | ||
| 1638 | (dolist (cur allgroups) | ||
| 1639 | (unless (gnus-parameter-registry-ignore cur) | ||
| 1640 | (gnus-registry-add-group mid cur))))) | ||
| 1641 | (if (> (length allgroups) 1) | 1626 | (if (> (length allgroups) 1) |
| 1642 | (setq group | 1627 | (setq group |
| 1643 | (gnus-completing-read | 1628 | (gnus-completing-read |
| @@ -1657,7 +1642,7 @@ search in raw mode." | |||
| 1657 | (set mid (concat "<" mid))) | 1642 | (set mid (concat "<" mid))) |
| 1658 | (unless (string-match ">$" mid) | 1643 | (unless (string-match ">$" mid) |
| 1659 | (set mid (concat mid ">"))) | 1644 | (set mid (concat mid ">"))) |
| 1660 | (gnus-registry-fetch-groups mid))) | 1645 | (gnus-registry-get-id-key mid 'group))) |
| 1661 | 1646 | ||
| 1662 | (defun nnmairix-determine-original-group-from-path (mid server) | 1647 | (defun nnmairix-determine-original-group-from-path (mid server) |
| 1663 | "Determine original group(s) for message-id MID from the file path. | 1648 | "Determine original group(s) for message-id MID from the file path. |