diff options
| author | Paul Eggert | 2015-08-08 09:47:37 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-08-08 09:48:04 -0700 |
| commit | b085bb426952be02bbc975ebdacd1b8fe8bf99d5 (patch) | |
| tree | 021da1f443d1d7cbfebfb1696f5c02da173d4bce | |
| parent | ab574175a4696a1eff95ed0aa2dadf821f9aafc7 (diff) | |
| download | emacs-b085bb426952be02bbc975ebdacd1b8fe8bf99d5.tar.gz emacs-b085bb426952be02bbc975ebdacd1b8fe8bf99d5.zip | |
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.
| -rw-r--r-- | lisp/electric.el | 6 |
1 files changed, 4 insertions, 2 deletions
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." | |||
| 428 | :type 'boolean :safe 'booleanp :group 'electricity) | 428 | :type 'boolean :safe 'booleanp :group 'electricity) |
| 429 | 429 | ||
| 430 | (defun electric--insertable-p (string) | 430 | (defun electric--insertable-p (string) |
| 431 | (not (unencodable-char-position nil nil buffer-file-coding-system | 431 | (or (not buffer-file-coding-system) |
| 432 | nil string))) | 432 | (eq (coding-system-base buffer-file-coding-system) 'undecided) |
| 433 | (not (unencodable-char-position nil nil buffer-file-coding-system | ||
| 434 | nil string)))) | ||
| 433 | 435 | ||
| 434 | (defun electric-quote-post-self-insert-function () | 436 | (defun electric-quote-post-self-insert-function () |
| 435 | "Function that ‘electric-quote-mode’ adds to ‘post-self-insert-hook’. | 437 | "Function that ‘electric-quote-mode’ adds to ‘post-self-insert-hook’. |