diff options
| author | Dmitry Gutov | 2014-03-17 08:22:58 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2014-03-17 08:22:58 +0200 |
| commit | 4f8aeb84b61f3be4eb0b5a7e3be0f7f8e9d5200e (patch) | |
| tree | cb6bb5a1ebe11f0b7f2c74041448c5d532f7e505 | |
| parent | dd72e25cb2561f180437db5e84b08dd7670809ae (diff) | |
| download | emacs-4f8aeb84b61f3be4eb0b5a7e3be0f7f8e9d5200e.tar.gz emacs-4f8aeb84b61f3be4eb0b5a7e3be0f7f8e9d5200e.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 9 | ||||
| -rw-r--r-- | lisp/progmodes/scheme.el | 7 |
3 files changed, 14 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf42e8ccef6..5f348fbc499 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2014-03-17 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * emacs-lisp/lisp-mode.el (lisp-mode-variables): Set | ||
| 4 | `comment-use-syntax' to t to avoid the unnecessary runtime check. | ||
| 5 | Set `comment-start-skip' to a simpler value that doesn't try to | ||
| 6 | check if the semicolon is escaped (this is handled by | ||
| 7 | `syntax-ppss' now). (Bug#16971) | ||
| 8 | |||
| 9 | * progmodes/scheme.el (scheme-mode-variables): Same. | ||
| 10 | |||
| 1 | 2014-03-16 Martin Rudalics <rudalics@gmx.at> | 11 | 2014-03-16 Martin Rudalics <rudalics@gmx.at> |
| 2 | 12 | ||
| 3 | Fix behavior of with-temp-buffer-window (Bug#16816, Bug#17007). | 13 | Fix behavior of with-temp-buffer-window (Bug#16816, Bug#17007). |
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." | |||
| 449 | (setq-local outline-level 'lisp-outline-level) | 449 | (setq-local outline-level 'lisp-outline-level) |
| 450 | (setq-local add-log-current-defun-function #'lisp-current-defun-name) | 450 | (setq-local add-log-current-defun-function #'lisp-current-defun-name) |
| 451 | (setq-local comment-start ";") | 451 | (setq-local comment-start ";") |
| 452 | ;; Look within the line for a ; following an even number of backslashes | 452 | (setq-local comment-start-skip ";+ *") |
| 453 | ;; after either a non-backslash or the line beginning. | ||
| 454 | (setq-local comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") | ||
| 455 | ;; Font lock mode uses this only when it KNOWS a comment is starting. | ||
| 456 | (setq-local font-lock-comment-start-skip ";+ *") | ||
| 457 | (setq-local comment-add 1) ;default to `;;' in comment-region | 453 | (setq-local comment-add 1) ;default to `;;' in comment-region |
| 458 | (setq-local comment-column 40) | 454 | (setq-local comment-column 40) |
| 459 | ;; Don't get confused by `;' in doc strings when paragraph-filling. | 455 | (setq-local comment-use-syntax t) |
| 460 | (setq-local comment-use-global-state t) | ||
| 461 | (setq-local imenu-generic-expression lisp-imenu-generic-expression) | 456 | (setq-local imenu-generic-expression lisp-imenu-generic-expression) |
| 462 | (setq-local multibyte-syntax-as-symbol t) | 457 | (setq-local multibyte-syntax-as-symbol t) |
| 463 | ;; (setq-local syntax-begin-function 'beginning-of-defun) ;;Bug#16247. | 458 | ;; (setq-local syntax-begin-function 'beginning-of-defun) ;;Bug#16247. |
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index 81af43dbef0..da0b6edf302 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el | |||
| @@ -140,11 +140,8 @@ | |||
| 140 | (setq-local add-log-current-defun-function #'lisp-current-defun-name) | 140 | (setq-local add-log-current-defun-function #'lisp-current-defun-name) |
| 141 | (setq-local comment-start ";") | 141 | (setq-local comment-start ";") |
| 142 | (setq-local comment-add 1) | 142 | (setq-local comment-add 1) |
| 143 | ;; Look within the line for a ; following an even number of backslashes | 143 | (setq-local comment-start-skip ";+[ \t]*") |
| 144 | ;; after either a non-backslash or the line beginning. | 144 | (setq-local comment-use-syntax t) |
| 145 | (setq-local comment-start-skip | ||
| 146 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+[ \t]*") | ||
| 147 | (setq-local font-lock-comment-start-skip ";+ *") | ||
| 148 | (setq-local comment-column 40) | 145 | (setq-local comment-column 40) |
| 149 | (setq-local parse-sexp-ignore-comments t) | 146 | (setq-local parse-sexp-ignore-comments t) |
| 150 | (setq-local lisp-indent-function 'scheme-indent-function) | 147 | (setq-local lisp-indent-function 'scheme-indent-function) |