From 7c3bb5a5dbc6476fc864b6bdd5cb3365883a6547 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 4 Oct 2004 23:18:11 +0000 Subject: [PATCH] * gnus-group.el (gnus-update-group-mark-positions): * gnus-sum.el (gnus-update-summary-mark-positions): * message.el (message-check-news-body-syntax): * gnus-msg.el (gnus-debug): Use `string-as-multibyte' to convert 8-bit unibyte values to a multibyte string for search functions. --- lisp/gnus/ChangeLog | 8 ++++++++ lisp/gnus/gnus-group.el | 3 ++- lisp/gnus/gnus-msg.el | 3 ++- lisp/gnus/gnus-sum.el | 18 +++++++++++------- lisp/gnus/message.el | 4 +++- 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 907ad5f3411..c072a77a807 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,11 @@ +2004-10-05 Juri Linkov + + * gnus-group.el (gnus-update-group-mark-positions): + * gnus-sum.el (gnus-update-summary-mark-positions): + * message.el (message-check-news-body-syntax): + * gnus-msg.el (gnus-debug): Use `string-as-multibyte' to convert + 8-bit unibyte values to a multibyte string for search functions. + 2004-10-01 Katsumi Yamaoka * gnus-sum.el (gnus-summary-toggle-header): Make it work even if diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 9f7b259e066..abf99cbfd64 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1046,7 +1046,8 @@ The following commands are available: (gnus-group-insert-group-line "dummy.group" 0 nil 0 nil) (goto-char (point-min)) (setq gnus-group-mark-positions - (list (cons 'process (and (search-forward "\200" nil t) + (list (cons 'process (and (search-forward + (string-as-multibyte "\200") nil t) (- (point) 2)))))))) (defun gnus-mouse-pick-group (e) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 33531e7f8a4..77395ca5042 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1534,7 +1534,8 @@ The source file has to be in the Emacs load path." ;; Remove any control chars - they seem to cause trouble for some ;; mailers. (Byte-compiled output from the stuff above.) (goto-char point) - (while (re-search-forward "[\000-\010\013-\037\200-\237]" nil t) + (while (re-search-forward (string-as-multibyte + "[\000-\010\013-\037\200-\237]") nil t) (replace-match (format "\\%03o" (string-to-char (match-string 0))) t t)))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 92ba2346949..abbecbbdff2 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3231,20 +3231,24 @@ buffer that was in action when the last article was fetched." [0 "" "" "05 Apr 2001 23:33:09 +0400" "" "" 0 0 "" nil] 0 nil t 128 t nil "" nil 1) (goto-char (point-min)) - (setq pos (list (cons 'unread (and (search-forward "\200" nil t) - (- (point) (point-min) 1))))) + (setq pos (list (cons 'unread + (and (search-forward + (string-as-multibyte "\200") nil t) + (- (point) (point-min) 1))))) (goto-char (point-min)) - (push (cons 'replied (and (search-forward "\201" nil t) + (push (cons 'replied (and (search-forward + (string-as-multibyte "\201") nil t) (- (point) (point-min) 1))) pos) (goto-char (point-min)) - (push (cons 'score (and (search-forward "\202" nil t) + (push (cons 'score (and (search-forward + (string-as-multibyte "\202") nil t) (- (point) (point-min) 1))) pos) (goto-char (point-min)) - (push (cons 'download - (and (search-forward "\203" nil t) - (- (point) (point-min) 1))) + (push (cons 'download (and (search-forward + (string-as-multibyte "\203") nil t) + (- (point) (point-min) 1))) pos))) (setq gnus-summary-mark-positions pos)))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 8e5edbc048a..85f918986d5 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4399,7 +4399,9 @@ Otherwise, generate and save a value for `canlock-password' first." nil)))) ;; Check for control characters. (message-check 'control-chars - (if (re-search-forward "[\000-\007\013\015-\032\034-\037\200-\237]" nil t) + (if (re-search-forward + (string-as-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]") + nil t) (y-or-n-p "The article contains control characters. Really post? ") t)) -- 2.39.2