]> code.delx.au - gnu-emacs/commitdiff
Fix debbugs#16971
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 17 Mar 2014 06:22:58 +0000 (08:22 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 17 Mar 2014 06:22:58 +0000 (08:22 +0200)
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Set
`comment-use-syntax' to t to avoid the unnecessary runtime check.
Set `comment-start-skip' to a simpler value that doesn't try to
check if the semicolon is escaped (this is handled by
`syntax-ppss' now).

* lisp/progmodes/scheme.el (scheme-mode-variables): Same.

lisp/ChangeLog
lisp/emacs-lisp/lisp-mode.el
lisp/progmodes/scheme.el

index cf42e8ccef65450b815ef0f0d3caacf648c3e6a9..5f348fbc49955a5bb07183401108e371f5bcfe13 100644 (file)
@@ -1,3 +1,13 @@
+2014-03-17  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * emacs-lisp/lisp-mode.el (lisp-mode-variables): Set
+       `comment-use-syntax' to t to avoid the unnecessary runtime check.
+       Set `comment-start-skip' to a simpler value that doesn't try to
+       check if the semicolon is escaped (this is handled by
+       `syntax-ppss' now).  (Bug#16971)
+
+       * progmodes/scheme.el (scheme-mode-variables): Same.
+
 2014-03-16  Martin Rudalics  <rudalics@gmx.at>
 
        Fix behavior of with-temp-buffer-window (Bug#16816, Bug#17007).
index 7f396b4a344266a7371479085d38fb6aee0068eb..437bf746bcdedf243b281b720f7004ae4eb7ce13 100644 (file)
@@ -449,15 +449,10 @@ font-lock keywords will not be case sensitive."
   (setq-local outline-level 'lisp-outline-level)
   (setq-local add-log-current-defun-function #'lisp-current-defun-name)
   (setq-local comment-start ";")
-  ;; Look within the line for a ; following an even number of backslashes
-  ;; after either a non-backslash or the line beginning.
-  (setq-local comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
-  ;; Font lock mode uses this only when it KNOWS a comment is starting.
-  (setq-local font-lock-comment-start-skip ";+ *")
+  (setq-local comment-start-skip ";+ *")
   (setq-local comment-add 1)           ;default to `;;' in comment-region
   (setq-local comment-column 40)
-  ;; Don't get confused by `;' in doc strings when paragraph-filling.
-  (setq-local comment-use-global-state t)
+  (setq-local comment-use-syntax t)
   (setq-local imenu-generic-expression lisp-imenu-generic-expression)
   (setq-local multibyte-syntax-as-symbol t)
   ;; (setq-local syntax-begin-function 'beginning-of-defun)  ;;Bug#16247.
index 81af43dbef0839ad40ce9703e5db9188603b8d0b..da0b6edf3022c6068c0e60c490588cb9eecc160e 100644 (file)
   (setq-local add-log-current-defun-function #'lisp-current-defun-name)
   (setq-local comment-start ";")
   (setq-local comment-add 1)
-  ;; Look within the line for a ; following an even number of backslashes
-  ;; after either a non-backslash or the line beginning.
-  (setq-local comment-start-skip
-             "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+[ \t]*")
-  (setq-local font-lock-comment-start-skip ";+ *")
+  (setq-local comment-start-skip ";+[ \t]*")
+  (setq-local comment-use-syntax t)
   (setq-local comment-column 40)
   (setq-local parse-sexp-ignore-comments t)
   (setq-local lisp-indent-function 'scheme-indent-function)