[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/gnus-decoded 8c382ca 4/7: Do not encode/decode Gnu
From: |
Eric Abrahamsen |
Subject: |
[Emacs-diffs] scratch/gnus-decoded 8c382ca 4/7: Do not encode/decode Gnus group names when completing |
Date: |
Fri, 21 Jun 2019 16:55:34 -0400 (EDT) |
branch: scratch/gnus-decoded
commit 8c382ca5170784a98793310d59861750ab2c7cd6
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Do not encode/decode Gnus group names when completing
* lisp/gnus/gnus-group.el (gnus-group-completing-read): This was a
leftover from earlier.
---
lisp/gnus/gnus-group.el | 33 +++++++--------------------------
1 file changed, 7 insertions(+), 26 deletions(-)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 41234e9..51383de 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2147,44 +2147,25 @@ be permanent."
require-match initial-input hist
def)
"Read a group name with completion.
-Non-ASCII group names are allowed. The arguments are the same as
-`completing-read' except that COLLECTION and HIST default to
-`gnus-active-hashtb' and `gnus-group-history' respectively if
-they are omitted. Can handle COLLECTION as a list, hash table,
-or vector."
- ;; This function is a little more complicated for backwards
- ;; compatibility. In theory, `collection' will only ever be a list
- ;; or a hash table, and the group names will all be fully decoded.
+The arguments are the same as `completing-read' except that
+COLLECTION and HIST default to `gnus-active-hashtb' and
+`gnus-group-history' respectively if they are omitted. Can
+handle COLLECTION as a list, hash table, or vector."
+ ;; This function handles vectors for backwards compatibility. In
+ ;; theory, `collection' will only ever be a list or a hash table.
(or collection (setq collection gnus-active-hashtb))
(let* ((choices
- (mapcar
- (lambda (g)
- (if (string-match "[^[:ascii:]]" g)
- (gnus-group-decoded-name g)
- g))
(cond ((listp collection)
collection)
((vectorp collection)
(mapatoms #'symbol-name collection))
((hash-table-p collection)
- (hash-table-keys collection)))))
+ (hash-table-keys collection))))
(group
(gnus-completing-read (or prompt "Group") (reverse choices)
require-match initial-input
(or hist 'gnus-group-history)
def)))
- (unless (cond ((and (listp collection)
- (symbolp (car collection)))
- (member group (mapcar 'symbol-name collection)))
- ((listp collection)
- (member group collection))
- ((vectorp collection)
- (symbol-value (intern-soft group collection)))
- ((hash-table-p collection)
- (gethash group collection)))
- (setq group
- (encode-coding-string
- group (gnus-group-name-charset nil group))))
(replace-regexp-in-string "\n" "" group)))
;;;###autoload
- [Emacs-diffs] scratch/gnus-decoded updated (40ad1c0 -> 5563d1c), Eric Abrahamsen, 2019/06/21
- [Emacs-diffs] scratch/gnus-decoded f041412 1/7: Decode group names in newsrc files as raw-text, not utf-8, Eric Abrahamsen, 2019/06/21
- [Emacs-diffs] scratch/gnus-decoded 8c382ca 4/7: Do not encode/decode Gnus group names when completing,
Eric Abrahamsen <=
- [Emacs-diffs] scratch/gnus-decoded 573e21d 2/7: Remove Gnus group name decoding in Gnus agent, Eric Abrahamsen, 2019/06/21
- [Emacs-diffs] scratch/gnus-decoded cf1afe6 3/7: Replace octal regexp with [:ascii:] char class in Gnus, Eric Abrahamsen, 2019/06/21
- [Emacs-diffs] scratch/gnus-decoded cf804c8 6/7: Temporarily preserve encoded group names in Gnus category file, Eric Abrahamsen, 2019/06/21
- [Emacs-diffs] scratch/gnus-decoded ed5ddc1 5/7: Fix encoding bug in gnus-group-rename-group, Eric Abrahamsen, 2019/06/21
- [Emacs-diffs] scratch/gnus-decoded 5563d1c 7/7: Remove all remaining uses of gnus-group-decoded-name, Eric Abrahamsen, 2019/06/21