|
From: | Paul Eggert |
Subject: | bug#24759: 25.1.50; electric-quote-mode |
Date: | Fri, 21 Oct 2016 14:04:56 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
On 10/21/2016 12:58 PM, Eli Zaretskii wrote:
I think this condition: (defun electric--insertable-p (string) (or (not buffer-file-coding-system) (eq (coding-system-base buffer-file-coding-system) 'undecided) (not (unencodable-char-position nil nil buffer-file-coding-system nil string)))) should also accept a coding-system that is the default-value of buffer-file-coding-system, because that's how buffers are created. When the file is saved, Emacs will ask for a proper encoding, which is not a catastrophe.
Wouldn't this lead to problems? If I use electric quoting in a unibyte French locale, where I the default is an ISO 8859 encoding and buffer-file-coding-system is something like iso-latin-1-unix, when I later save the file Emacs will say "Select coding system (default chinese-iso-8bit): ". This is hardly user-friendly, even if we improve Emacs to guess UTF-8, as there may be a long interval between typing ` and saving the buffer.
[Prev in Thread] | Current Thread | [Next in Thread] |