[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/gnus-cloud 30107d5 21/61: Merge branch 'master' of
From: |
Teodor Zlatanov |
Subject: |
[Emacs-diffs] scratch/gnus-cloud 30107d5 21/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs |
Date: |
Fri, 1 Jul 2016 17:37:53 +0000 (UTC) |
branch: scratch/gnus-cloud
commit 30107d5677ea0bef82225c5498ebcadcbfa80a33
Merge: cc0e1f6 7a20ebe
Author: Ted Zlatanov <address@hidden>
Commit: Ted Zlatanov <address@hidden>
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
---
lisp/progmodes/cc-engine.el | 55 ++++++++++++++++++++++---------------------
lisp/progmodes/cc-fonts.el | 4 ++--
2 files changed, 30 insertions(+), 29 deletions(-)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 595d577..5fa0403 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -305,7 +305,7 @@ comment at the start of cc-engine.el for more info."
(forward-line -1))
(back-to-indentation)
(if (and (<= (point) here)
- (looking-at c-opt-cpp-start)
+ (save-match-data (looking-at c-opt-cpp-start))
(c-macro-is-genuine-p))
(progn
(setq c-macro-cache (cons (point) nil)
@@ -2304,32 +2304,33 @@ comment at the start of cc-engine.el for more info."
;; 7 (comment type) and 8 (start of comment/string) (and possibly 9) of
;; STATE are valid.
(save-excursion
- (let ((s (parse-partial-sexp from to))
- ty co-st)
- (cond
- ((or (nth 3 s) (nth 4 s)) ; in a string or comment
- (setq ty (cond
- ((nth 3 s) 'string)
- ((nth 7 s) 'c++)
- (t 'c)))
- (parse-partial-sexp (point) (point-max)
- nil ; TARGETDEPTH
- nil ; STOPBEFORE
- s ; OLDSTATE
- 'syntax-table) ; stop at end of literal
- `(,s ,ty (,(nth 8 s) . ,(point))))
-
- ((and (not not-in-delimiter) ; inside a comment starter
- (not (bobp))
- (progn (backward-char)
- (and (not (looking-at "\\s!"))
- (looking-at c-comment-start-regexp))))
- (setq ty (if (looking-at c-block-comment-start-regexp) 'c 'c++)
- co-st (point))
- (forward-comment 1)
- `(,s ,ty (,co-st . ,(point))))
-
- (t `(,s))))))
+ (save-match-data
+ (let ((s (parse-partial-sexp from to))
+ ty co-st)
+ (cond
+ ((or (nth 3 s) (nth 4 s)) ; in a string or comment
+ (setq ty (cond
+ ((nth 3 s) 'string)
+ ((nth 7 s) 'c++)
+ (t 'c)))
+ (parse-partial-sexp (point) (point-max)
+ nil ; TARGETDEPTH
+ nil ; STOPBEFORE
+ s ; OLDSTATE
+ 'syntax-table) ; stop at end of literal
+ `(,s ,ty (,(nth 8 s) . ,(point))))
+
+ ((and (not not-in-delimiter) ; inside a comment starter
+ (not (bobp))
+ (progn (backward-char)
+ (and (not (looking-at "\\s!"))
+ (looking-at c-comment-start-regexp))))
+ (setq ty (if (looking-at c-block-comment-start-regexp) 'c 'c++)
+ co-st (point))
+ (forward-comment 1)
+ `(,s ,ty (,co-st . ,(point))))
+
+ (t `(,s)))))))
(defun c-state-safe-place (here)
;; Return a buffer position before HERE which is "safe", i.e. outside any
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 65ec5c3..3a8c9ec 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1396,7 +1396,7 @@ casts and declarations are fontified. Used on level 2
and higher."
'c-decl-id-start)))))
(c-font-lock-declarators
- (point-max) decl-list (cadr decl-or-cast)))
+ (min limit (point-max)) decl-list (cadr decl-or-cast)))
;; A declaration has been successfully identified, so do all the
;; fontification of types and refs that've been recorded.
@@ -1542,7 +1542,7 @@ casts and declarations are fontified. Used on level 2
and higher."
(c-forward-syntactic-ws))
;; At a real declaration?
(if (memq (c-forward-type t) '(t known found decltype))
- (c-font-lock-declarators (point-max) t is-typedef)))
+ (c-font-lock-declarators limit t is-typedef)))
nil)))))
(defun c-font-lock-enclosing-decls (limit)
- [Emacs-diffs] scratch/gnus-cloud 8136bd2 12/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, (continued)
- [Emacs-diffs] scratch/gnus-cloud 8136bd2 12/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 8e9940f 07/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 9703790 13/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 2f858df 19/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud ad87a3e 15/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 2204fd1 17/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud a744c73 16/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud cc0e1f6 20/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 586ee65 22/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud bd8a5e4 08/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 30107d5 21/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs,
Teodor Zlatanov <=
- [Emacs-diffs] scratch/gnus-cloud 5afcf2f 29/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud c402cc0 30/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud c8f94d8 26/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 4fd911a 10/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 3706ef2 11/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 0d2d058 40/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud b992a2e 42/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud c5b259f 49/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 3d35d2f 24/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01
- [Emacs-diffs] scratch/gnus-cloud 3ae2fbf 35/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/01