branch: elpa/haskell-tng-mode commit f99ca777608ac4d8fe882f47e5c011dafecde3c6 Author: Tseen She <ts33n....@gmail.com> Commit: Tseen She <ts33n....@gmail.com>
fixup! expand parens --- haskell-tng-font-lock.el | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/haskell-tng-font-lock.el b/haskell-tng-font-lock.el index 9883266..4529e27 100644 --- a/haskell-tng-font-lock.el +++ b/haskell-tng-font-lock.el @@ -173,10 +173,8 @@ Expand the region to include the opening parenthesis. The caller loops until everything is opened." (goto-char font-lock-beg) - (let* ((scan (syntax-ppss)) - (open (nth 1 scan))) - (when (and open - (goto-char open) + (when-let (open (nth 1 (syntax-ppss))) + (when (and (goto-char open) (looking-at "(")) ;;(haskell-tng:debug-extend (point)) (setq font-lock-beg (point))))) @@ -186,14 +184,12 @@ The caller loops until everything is opened." Expand the region to include a closing parenthesis. The caller loops until everything is closed." (goto-char font-lock-end) - (let* ((scan (syntax-ppss)) - (open (nth 1 scan))) - (when (and open - (goto-char open) + (when-let (open (nth 1 (syntax-ppss))) + (when (and (goto-char open) (looking-at "(") (goto-char font-lock-end) (re-search-forward ")" (point-max) t)) - (haskell-tng:debug-extend (point)) + ;;(haskell-tng:debug-extend (point)) (setq font-lock-end (point))))) (defun haskell-tng:multiline-faces ()