[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b085bb4: Electric quote if coding is undecided or n
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master b085bb4: Electric quote if coding is undecided or no conv |
Date: |
Sat, 08 Aug 2015 16:48:08 +0000 |
branch: master
commit b085bb426952be02bbc975ebdacd1b8fe8bf99d5
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
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.
---
lisp/electric.el | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/electric.el b/lisp/electric.el
index ca05c8c..8ca0931 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’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master b085bb4: Electric quote if coding is undecided or no conv,
Paul Eggert <=