[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 137a109 01/10: Fix bugs where parsing left point after a s
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 137a109 01/10: Fix bugs where parsing left point after a scope. |
Date: |
Thu, 18 Jun 2015 08:33:54 +0000 |
branch: master
commit 137a109b6d17466526cc6c63a47cae141013a8e7
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Fix bugs where parsing left point after a scope.
---
context-coloring.el | 53 ++++++++++++++++++--------------------------------
1 files changed, 19 insertions(+), 34 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index c4423f0..fa85c43 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -635,37 +635,25 @@ header in CALLBACK."
(forward-char)
(context-coloring-elisp-pop-scope)))
-(defun context-coloring-elisp-parse-header (callback start)
- "Parse a function header at point with CALLBACK. If there is
-no header, skip past the sexp at START."
- (cond
- ((= (context-coloring-get-syntax-code)
context-coloring-OPEN-PARENTHESIS-CODE)
- (funcall callback))
- (t
- ;; Skip it.
- (goto-char start)
- (context-coloring-elisp-forward-sexp))))
+(defun context-coloring-elisp-parse-header (callback)
+ "Parse a function header at point with CALLBACK."
+ (when (= (context-coloring-get-syntax-code)
context-coloring-OPEN-PARENTHESIS-CODE)
+ (funcall callback)))
(defun context-coloring-elisp-colorize-defun-like (callback)
"Color the defun-like function at point, parsing the header
with CALLBACK."
- (let ((start (point)))
- (context-coloring-elisp-colorize-scope
- (lambda ()
- (cond
- ((context-coloring-elisp-identifier-p
(context-coloring-get-syntax-code))
- ;; Color the defun's name with the top-level color.
- (context-coloring-colorize-region
- (point)
- (progn (forward-sexp)
- (point))
- 0)
- (context-coloring-elisp-forward-sws)
- (context-coloring-elisp-parse-header callback start))
- (t
- ;; Skip it.
- (goto-char start)
- (context-coloring-elisp-forward-sexp)))))))
+ (context-coloring-elisp-colorize-scope
+ (lambda ()
+ (when (context-coloring-elisp-identifier-p
(context-coloring-get-syntax-code))
+ ;; Color the defun's name with the top-level color.
+ (context-coloring-colorize-region
+ (point)
+ (progn (forward-sexp)
+ (point))
+ 0)
+ (context-coloring-elisp-forward-sws)
+ (context-coloring-elisp-parse-header callback)))))
(defun context-coloring-elisp-colorize-defun ()
"Color the `defun' at point."
@@ -687,17 +675,14 @@ with CALLBACK."
(t
;; Ignore artifacts.
(context-coloring-elisp-forward-sexp)))
- (context-coloring-elisp-forward-sws))
- ;; Exit.
- (forward-char)))))
+ (context-coloring-elisp-forward-sws))))))
(defun context-coloring-elisp-colorize-lambda-like (callback)
"Color the lambda-like function at point, parsing the header
with CALLBACK."
- (let ((start (point)))
- (context-coloring-elisp-colorize-scope
- (lambda ()
- (context-coloring-elisp-parse-header callback start)))))
+ (context-coloring-elisp-colorize-scope
+ (lambda ()
+ (context-coloring-elisp-parse-header callback))))
(defun context-coloring-elisp-colorize-lambda ()
"Color the `lambda' at point."
- [elpa] master updated (f89ef19 -> 61b8c49), Jackson Ray Hamilton, 2015/06/18
- [elpa] master c6cdb04 03/10: Benchmark coloring time separately., Jackson Ray Hamilton, 2015/06/18
- [elpa] master 296f07b 04/10: Update sexps per pause., Jackson Ray Hamilton, 2015/06/18
- [elpa] master 8536d5d 05/10: Use specified Emacs when running cask., Jackson Ray Hamilton, 2015/06/18
- [elpa] master 841aac4 02/10: Add eval-expression support., Jackson Ray Hamilton, 2015/06/18
- [elpa] master b19a0a2 06/10: Add predicate option for dispatches., Jackson Ray Hamilton, 2015/06/18
- [elpa] master 294b511 09/10: Version 6.5.0., Jackson Ray Hamilton, 2015/06/18
- [elpa] master 456f6e4 08/10: Use evm in build., Jackson Ray Hamilton, 2015/06/18
- [elpa] master 4eacc29 07/10: Update eval-expression recommendation for 24.3., Jackson Ray Hamilton, 2015/06/18
- [elpa] master 137a109 01/10: Fix bugs where parsing left point after a scope.,
Jackson Ray Hamilton <=
- [elpa] master 61b8c49 10/10: Merge commit '294b5117b42d2622f4fb0a1da219d45d98566b6e' from context-coloring, Jackson Ray Hamilton, 2015/06/18