summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Abrahamsen <eric@ericabrahamsen.net>2019-06-17 11:06:38 -0700
committerEric Abrahamsen <eric@ericabrahamsen.net>2019-06-17 11:06:38 -0700
commitcf1afe686aa1b248433d1f8578585ed6c0eaa652 (patch)
tree4d75b1ec27a0cef132b7bed5f864ea42f9bf5847
parent573e21d03415e5a05e650cfce6d252c00ae26164 (diff)
downloademacs-cf1afe686aa1b248433d1f8578585ed6c0eaa652.tar.gz
Replace octal regexp with [:ascii:] char class in Gnus
In the regexp used to match multibyte group names * lisp/gnus/gnus-group.el (gnus-group-completing-read): * lisp/gnus/gnus-registry.el (gnus-registry--munge-group-names): * lisp/gnus/gnus-start.el (gnus-make-hashtable-from-newsrc-alist): (gnus-active-to-gnus-format): (gnus-read-newsrc-el-file): * lisp/gnus/message.el (message-make-in-reply-to): Replace in these locations.
-rw-r--r--lisp/gnus/gnus-group.el2
-rw-r--r--lisp/gnus/gnus-registry.el4
-rw-r--r--lisp/gnus/gnus-start.el6
-rw-r--r--lisp/gnus/message.el2
4 files changed, 7 insertions, 7 deletions
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index ed81e12a085..41234e963ad 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2159,7 +2159,7 @@ or vector."
(let* ((choices
(mapcar
(lambda (g)
- (if (string-match "[^\000-\177]" g)
+ (if (string-match "[^[:ascii:]]" g)
(gnus-group-decoded-name g)
g))
(cond ((listp collection)
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 8f3c11be502..e83bc97bacb 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -280,7 +280,7 @@ Encode names if ENCODE is non-nil, otherwise decode."
(remhash group-name grouphash)
(puthash (encode-coding-string group-name 'utf-8-emacs)
val grouphash))
- (when (string-match-p "[^\000-\177]" group-name)
+ (when (string-match-p "[^[:ascii:]]" group-name)
(remhash group-name grouphash)
(puthash (decode-coding-string group-name 'utf-8-emacs) val grouphash))))
grouphash))
@@ -290,7 +290,7 @@ Encode names if ENCODE is non-nil, otherwise decode."
(when (seq-some (lambda (g)
(if encode
(multibyte-string-p g)
- (string-match-p "[^\000-\177]" g)))
+ (string-match-p "[^[:ascii:]]" g)))
groups)
;; Create a replacement DATA.
(push (list id (cons (cons 'group (mapcar
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 090d1154363..7bac61cc6cd 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -1836,7 +1836,7 @@ The info element is shared with the same element of
(gnus-info-set-method info (car rest))
(push method methods)))
;; Check for encoded group names and decode them.
- (when (string-match-p "[^\000-\177]" (setq gname (car info)))
+ (when (string-match-p "[^[:ascii:]]" (setq gname (car info)))
(let ((decoded (gnus-group-decoded-name gname)))
(setf gname decoded
(car info) decoded)))
@@ -2165,7 +2165,7 @@ The info element is shared with the same element of
(skip-chars-forward " \t")
(memq (char-after)
'(?= ?x ?j)))))
- (progn (when (string-match-p "[^\000-\177]" group)
+ (progn (when (string-match-p "[^[:ascii:]]" group)
;; NNTP servers may give us encoded group
;; names.
(setq group (gnus-group-decoded-name group)))
@@ -2414,7 +2414,7 @@ If FORCE is non-nil, the .newsrc file is read."
(lambda (elt)
(cons (car elt)
(mapcar (lambda (g)
- (if (string-match-p "[^\000-\177]" g)
+ (if (string-match-p "[^[:ascii:]]" g)
(gnus-group-decoded-name g)
g))
(cdr elt))))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index c8b6f0ee685..c2374c70730 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -5656,7 +5656,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'."
(concat
msg-id (if msg-id " (")
(if (car name)
- (if (string-match "[^\000-\177]" (car name))
+ (if (string-match "[^[:ascii:]]" (car name))
;; Quote a string containing non-ASCII characters.
;; It will make the RFC2047 encoder cause an error
;; if there are special characters.