[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103356: Prevent hideshow from parsin
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103356: Prevent hideshow from parsing braces inside comments (Bug#8036). |
Date: |
Sat, 19 Feb 2011 17:20:35 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103356
author: Dmitry Bolshakov <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-02-19 17:20:35 -0500
message:
Prevent hideshow from parsing braces inside comments (Bug#8036).
* progmodes/hideshow.el (hs-find-block-beginning)
(hs-hide-level-recursive): Ignore comments when parsing braces.
modified:
lisp/ChangeLog
lisp/progmodes/hideshow.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-02-19 21:23:51 +0000
+++ b/lisp/ChangeLog 2011-02-19 22:20:35 +0000
@@ -1,3 +1,15 @@
+2011-02-19 Dmitry Bolshakov <address@hidden>
+ Dima Kogan <address@hidden> (tiny change)
+
+ * progmodes/hideshow.el (hs-find-block-beginning)
+ (hs-hide-level-recursive): Ignore comments when parsing braces
+ (Bug#8036).
+
+2011-02-19 Chong Yidong <address@hidden>
+
+ * vc/vc-bzr.el (vc-bzr-bound-branch-p): New function.
+ (vc-bzr-pull): Use it.
+
2011-02-19 Chong Yidong <address@hidden>
* vc/vc-bzr.el (vc-bzr--branch-conf): Function deleted.
=== modified file 'lisp/progmodes/hideshow.el'
--- a/lisp/progmodes/hideshow.el 2011-01-25 04:08:28 +0000
+++ b/lisp/progmodes/hideshow.el 2011-02-19 22:20:35 +0000
@@ -689,6 +689,8 @@
(point)
;; look backward for the start of a block that contains the cursor
(while (and (re-search-backward hs-block-start-regexp nil t)
+ (save-match-data
+ (not (nth 4 (syntax-ppss)))) ; not inside comments
(not (setq done
(< here (save-excursion
(hs-forward-sexp (match-data t) 1)
@@ -711,10 +713,12 @@
(forward-comment (buffer-size))
(and (< (point) maxp)
(re-search-forward hs-block-start-regexp maxp t)))
- (if (> arg 1)
- (hs-hide-level-recursive (1- arg) minp maxp)
- (goto-char (match-beginning hs-block-start-mdata-select))
- (hs-hide-block-at-point t)))
+ (when (save-match-data
+ (not (nth 4 (syntax-ppss)))) ; not inside comments
+ (if (> arg 1)
+ (hs-hide-level-recursive (1- arg) minp maxp)
+ (goto-char (match-beginning hs-block-start-mdata-select))
+ (hs-hide-block-at-point t))))
(goto-char maxp))
(defmacro hs-life-goes-on (&rest body)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103356: Prevent hideshow from parsing braces inside comments (Bug#8036).,
Chong Yidong <=