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.
This commit is contained in:
Paul Eggert 2015-08-08 09:47:37 -07:00
parent ab574175a4
commit b085bb4269

View file

@ -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.