emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116778: Fix debbugs#16971


From: Dmitry Gutov
Subject: [Emacs-diffs] trunk r116778: Fix debbugs#16971
Date: Mon, 17 Mar 2014 06:23:10 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116778
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16971
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Mon 2014-03-17 08:22:58 +0200
message:
  Fix debbugs#16971
  
  * 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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/lisp-mode.el   lispmode.el-20091113204419-o5vbwnq5f7feedwu-205
  lisp/progmodes/scheme.el       scheme.el-20091113204419-o5vbwnq5f7feedwu-122
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-03-16 09:26:58 +0000
+++ b/lisp/ChangeLog    2014-03-17 06:22:58 +0000
@@ -1,3 +1,13 @@
+2014-03-17  Dmitry Gutov  <address@hidden>
+
+       * 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  <address@hidden>
 
        Fix behavior of with-temp-buffer-window (Bug#16816, Bug#17007).

=== modified file 'lisp/emacs-lisp/lisp-mode.el'
--- a/lisp/emacs-lisp/lisp-mode.el      2014-02-10 01:34:22 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el      2014-03-17 06:22:58 +0000
@@ -449,15 +449,10 @@
   (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.

=== modified file 'lisp/progmodes/scheme.el'
--- a/lisp/progmodes/scheme.el  2014-01-01 07:43:34 +0000
+++ b/lisp/progmodes/scheme.el  2014-03-17 06:22:58 +0000
@@ -140,11 +140,8 @@
   (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]