]> code.delx.au - gnu-emacs/blobdiff - lisp/electric.el
Comint, term, and compile now set EMACS
[gnu-emacs] / lisp / electric.el
index 4f2400825d77f934ec98cfbbfdbaf50b8c7994bd..ab79943c9dd92b150bf18067e16e2c2c9b44d1de 100644 (file)
@@ -1,6 +1,6 @@
 ;;; electric.el --- window maker and Command loop for `electric' modes
 
-;; Copyright (C) 1985-1986, 1995, 2001-2015 Free Software Foundation,
+;; Copyright (C) 1985-1986, 1995, 2001-2016 Free Software Foundation,
 ;; Inc.
 
 ;; Author: K. Shane Hartman
@@ -417,14 +417,17 @@ The variable `electric-layout-rules' says when and how to insert newlines."
 
 (defcustom electric-quote-comment t
   "Non-nil means to use electric quoting in program comments."
+  :version "25.1"
   :type 'boolean :safe 'booleanp :group 'electricity)
 
 (defcustom electric-quote-string nil
   "Non-nil means to use electric quoting in program strings."
+  :version "25.1"
   :type 'boolean :safe 'booleanp :group 'electricity)
 
 (defcustom electric-quote-paragraph t
   "Non-nil means to use electric quoting in text paragraphs."
+  :version "25.1"
   :type 'boolean :safe 'booleanp :group 'electricity)
 
 (defun electric--insertable-p (string)
@@ -439,7 +442,7 @@ This requotes when a quoting key is typed."
   (when (and electric-quote-mode
              (memq last-command-event '(?\' ?\`)))
     (let ((start
-           (if comment-start
+           (if (and comment-start comment-use-syntax)
                (when (or electric-quote-comment electric-quote-string)
                  (let ((syntax (syntax-ppss)))
                    (and (or (and electric-quote-comment (nth 4 syntax))