bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#24759: 25.1.50; electric-quote-mode


From: Eli Zaretskii
Subject: bug#24759: 25.1.50; electric-quote-mode
Date: Fri, 21 Oct 2016 22:58:59 +0300

> From: Dani Moncayo <dmoncayo@gmail.com>
> Date: Fri, 21 Oct 2016 21:38:43 +0200
> 
> I may be missing something, but electric-quote-mode does not seem to
> work here.
> 
> >From `emacs -Q', if I create a new text-mode buffer
> 
>   C-x b foo
>   M-x text-mode
> 
> then I enable electric quoting in that buffer
> 
>   M-x electric-quote-local-mode
> 
> and then I type [``foo''] or [`foo'], no quote conversion takes place.

I guess your buffer-file-coding-system is neither 'undecided' nor
anything that can encode the curved quotes.  Try

  C-x RET f utf-8 RET

and then type the above again.

Paul, 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.





reply via email to

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