diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2014-03-17 08:22:58 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2014-03-17 08:22:58 +0200 |
commit | 4f8aeb84b61f3be4eb0b5a7e3be0f7f8e9d5200e (patch) | |
tree | cb6bb5a1ebe11f0b7f2c74041448c5d532f7e505 /lisp/emacs-lisp/lisp-mode.el | |
parent | dd72e25cb2561f180437db5e84b08dd7670809ae (diff) | |
download | emacs-4f8aeb84b61f3be4eb0b5a7e3be0f7f8e9d5200e.tar.gz |
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.
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 7f396b4a344..437bf746bcd 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -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. |