diff options
| author | Katsumi Yamaoka | 2010-09-24 00:38:10 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-09-24 00:38:10 +0000 |
| commit | d3361e620af1df205471f98e508e5fcfebcb4f59 (patch) | |
| tree | 8ebc8b26c159efd651f975352cbcc41c87a6da56 | |
| parent | b1ae92bae4c387155db45c297b7f78e4467d8ac4 (diff) | |
| download | emacs-d3361e620af1df205471f98e508e5fcfebcb4f59.tar.gz emacs-d3361e620af1df205471f98e508e5fcfebcb4f59.zip | |
Merge changes made in Gnus trunk.
gnus-html.el (gnus-html-encode-url-chars): New function, that's an alias to browse-url-url-encode-chars if any.
nnir.el: Silence the byte compiler.
| -rw-r--r-- | lisp/gnus/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/gnus/gnus-html.el | 20 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 5 |
3 files changed, 32 insertions, 1 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index b60c5dffb8e..614cccce7ec 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2010-09-24 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * nnir.el: Silence the byte compiler. | ||
| 4 | |||
| 5 | * gnus-html.el (gnus-html-encode-url-chars): New function, that's an | ||
| 6 | alias to browse-url-url-encode-chars if any. | ||
| 7 | (gnus-html-encode-url): Use it. | ||
| 8 | |||
| 1 | 2010-09-23 Lars Magne Ingebrigtsen <larsi@gnus.org> | 9 | 2010-09-23 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 10 | ||
| 3 | * gnus-start.el (gnus-use-backend-marks): New variable. | 11 | * gnus-start.el (gnus-use-backend-marks): New variable. |
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index a693a2b842d..5199f7dfd5f 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el | |||
| @@ -88,9 +88,27 @@ fit these criteria." | |||
| 88 | (define-key map [tab] 'widget-forward) | 88 | (define-key map [tab] 'widget-forward) |
| 89 | map)) | 89 | map)) |
| 90 | 90 | ||
| 91 | (eval-and-compile | ||
| 92 | (defalias 'gnus-html-encode-url-chars | ||
| 93 | (if (fboundp 'browse-url-url-encode-chars) | ||
| 94 | 'browse-url-url-encode-chars | ||
| 95 | (lambda (text chars) | ||
| 96 | "URL-encode the chars in TEXT that match CHARS. | ||
| 97 | CHARS is a regexp-like character alternative (e.g., \"[)$]\")." | ||
| 98 | (let ((encoded-text (copy-sequence text)) | ||
| 99 | (s 0)) | ||
| 100 | (while (setq s (string-match chars encoded-text s)) | ||
| 101 | (setq encoded-text | ||
| 102 | (replace-match (format "%%%x" | ||
| 103 | (string-to-char | ||
| 104 | (match-string 0 encoded-text))) | ||
| 105 | t t encoded-text) | ||
| 106 | s (1+ s))) | ||
| 107 | encoded-text))))) | ||
| 108 | |||
| 91 | (defun gnus-html-encode-url (url) | 109 | (defun gnus-html-encode-url (url) |
| 92 | "Encode URL." | 110 | "Encode URL." |
| 93 | (browse-url-url-encode-chars url "[)$ ]")) | 111 | (gnus-html-encode-url-chars url "[)$ ]")) |
| 94 | 112 | ||
| 95 | (defun gnus-html-cache-expired (url ttl) | 113 | (defun gnus-html-cache-expired (url ttl) |
| 96 | "Check if URL is cached for more than TTL." | 114 | "Check if URL is cached for more than TTL." |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 9fe37baf95e..ec22c78880b 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -956,6 +956,11 @@ pairs (also vectors, actually)." | |||
| 956 | (autoload 'imap-search "imap") | 956 | (autoload 'imap-search "imap") |
| 957 | (autoload 'imap-quote-specials "imap") | 957 | (autoload 'imap-quote-specials "imap") |
| 958 | 958 | ||
| 959 | (eval-when-compile | ||
| 960 | (autoload 'nnimap-buffer "nnimap") | ||
| 961 | (autoload 'nnimap-command "nnimap") | ||
| 962 | (autoload 'nnimap-possibly-change-group "nnimap")) | ||
| 963 | |||
| 959 | (defun nnir-run-imap (query srv &optional group-option) | 964 | (defun nnir-run-imap (query srv &optional group-option) |
| 960 | "Run a search against an IMAP back-end server. | 965 | "Run a search against an IMAP back-end server. |
| 961 | This uses a custom query language parser; see `nnir-imap-make-query' for | 966 | This uses a custom query language parser; see `nnir-imap-make-query' for |