From: Paul Eggert Date: Sat, 8 Aug 2015 16:47:37 +0000 (-0700) Subject: Electric quote if coding is undecided or no conv X-Git-Tag: emacs-25.0.90~1373^2~88 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b085bb426952be02bbc975ebdacd1b8fe8bf99d5;p=emacs.git Electric quote if coding is undecided or no conv * lisp/electric.el (electric--insertable-p): Also say that a string is insertable if the buffer file coding system is undecided or uses no conversion, as curved quotes will work in either case. --- diff --git a/lisp/electric.el b/lisp/electric.el index ca05c8c7f07..8ca09316bcb 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -428,8 +428,10 @@ The variable `electric-layout-rules' says when and how to insert newlines." :type 'boolean :safe 'booleanp :group 'electricity) (defun electric--insertable-p (string) - (not (unencodable-char-position nil nil buffer-file-coding-system - nil 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)))) (defun electric-quote-post-self-insert-function () "Function that ‘electric-quote-mode’ adds to ‘post-self-insert-hook’.