[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114535: * lisp/newcomment.el (comment-use-global-st
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] trunk r114535: * lisp/newcomment.el (comment-use-global-state): Change default value |
Date: |
Sat, 05 Oct 2013 23:40:23 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114535
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15251
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Sun 2013-10-06 02:40:16 +0300
message:
* lisp/newcomment.el (comment-use-global-state): Change default value
to t, mark obsolete.
(comment-beginning): In addition to `comment-to-syntax', check the
value of `comment-use-global-state'.
modified:
etc/NEWS news-20100311060928-aoit31wvzf25yr1z-1
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/newcomment.el
newcomment.el-20091113204419-o5vbwnq5f7feedwu-1719
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2013-09-28 01:52:23 +0000
+++ b/etc/NEWS 2013-10-05 23:40:16 +0000
@@ -157,6 +157,9 @@
** The command `quail-help' is deleted. Use `C-h C-\'
(`describe-input-method') instead.
+** The default value of `comment-use-global-state' is changed to t,
+and this variable has been marked obsolete.
+
* Editing Changes in Emacs 24.4
@@ -214,7 +217,7 @@
See `remember-data-directory' and `remember-directory-file-name-format'
for new options related to this function.
-** More packages look for ~/.emacs.d/<foo> additionally to ~/.<foo>.
+* More packages look for ~/.emacs.d/<foo> additionally to ~/.<foo>.
Affected files:
~/.emacs.d/timelog replaces ~/.timelog
~/.emacs.d/vip replaces ~/.vip
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-10-05 18:37:08 +0000
+++ b/lisp/ChangeLog 2013-10-05 23:40:16 +0000
@@ -1,3 +1,10 @@
+2013-10-05 Dmitry Gutov <address@hidden>
+
+ * newcomment.el (comment-use-global-state): Change default value
+ to t, mark obsolete (Bug#15251).
+ (comment-beginning): In addition to `comment-to-syntax', check the
+ value of `comment-use-global-state'.
+
2013-10-05 Stefan Monnier <address@hidden>
* progmodes/ruby-mode.el (ruby-use-smie): Change default.
=== modified file 'lisp/newcomment.el'
--- a/lisp/newcomment.el 2013-10-01 01:13:48 +0000
+++ b/lisp/newcomment.el 2013-10-05 23:40:16 +0000
@@ -435,12 +435,15 @@
;;;; Navigation
;;;;
-(defvar comment-use-global-state nil
+(defvar comment-use-global-state t
"Non-nil means that the global syntactic context is used.
More specifically, it means that `syntax-ppss' is used to find out whether
-point is within a string or not. Major modes whose syntax is faithfully
-described by the syntax-tables can set this to non-nil so comment markers
-in strings will not confuse Emacs.")
+point is within a string or not. Major modes whose syntax is not faithfully
+described by the syntax-tables (or where `font-lock-syntax-table' is radically
+different from the main syntax table) can set this to nil,
+then `syntax-ppss' cache won't be used in comment-related routines.")
+
+(make-obsolete-variable 'comment-use-global-state 'comment-use-syntax "24.4")
(defun comment-search-forward (limit &optional noerror)
"Find a comment start between point and LIMIT.
@@ -515,7 +518,7 @@
"Find the beginning of the enclosing comment.
Returns nil if not inside a comment, else moves point and returns
the same as `comment-search-backward'."
- (if comment-use-syntax
+ (if (and comment-use-syntax comment-use-global-state)
(let ((state (syntax-ppss)))
(when (nth 4 state)
(goto-char (nth 8 state))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114535: * lisp/newcomment.el (comment-use-global-state): Change default value,
Dmitry Gutov <=