emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: Re: mail-extract-address-components bug]


From: Richard Stallman
Subject: address@hidden: Re: mail-extract-address-components bug]
Date: Tue, 15 May 2007 15:39:59 -0400

Would someone please install this change?

------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY 
        autolearn=failed version=3.1.0
Date: Tue, 15 May 2007 18:00:43 +0900
From: Katsumi Yamaoka <address@hidden>
To: address@hidden
Organization: Emacsen advocacy group
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Re: mail-extract-address-components bug

>>>>> In <address@hidden> Katsumi Yamaoka wrote:

> I hope this is fixed in Emacs 22.2 (or possibly 22.1).  I've been
> annoyed that `mail-extract-address-component' sometimes fails to
> parse addresses containing non-ASCII names correctly.  Japanese
> people often use their native names in the From header.  Since
> they sometimes use non-ASCII letters which are not specified as
> words in the syntax table, Gnus, for example, fails to build the
> recipient address when replying.

[...]

> The causes are

[...]

> and `m-e-a-c' uses `forward-word' to try to skip them even if
> they are not words.

I found another solution, which doesn't need to modify mail-extr.el:

;; Set the syntax of all non-ASCII characters to `word'
;; in the syntax tables that mail-extr.el uses.
(eval-after-load "mail-extr"
  '(let ((tables '(mail-extr-address-syntax-table
                   mail-extr-address-comment-syntax-table
                   mail-extr-address-domain-literal-syntax-table
                   mail-extr-address-text-comment-syntax-table
                   mail-extr-address-text-syntax-table))
         table charsets generic-char)
     (while tables
       (setq table (symbol-value (car tables))
             tables (cdr tables)
             charsets charset-list)
       (while charsets
         (setq generic-char (make-char (car charsets))
               charsets (cdr charsets))
         (if (>= generic-char 128)
             (modify-syntax-entry generic-char "w" table))))))

This form also modifies the syntax of the Latin-1 nbsp character
to `word' but it doesn't seem to be a problem.

BTW, I think it should be documented that `modify-syntax-entry'
allows the generic character of a charset as the first argument,
as it is mentioned in the doc string of `make-char'.

Regards,


_______________________________________________
emacs-pretest-bug mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]