[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/07: emacs: devel: Fix 'modify-phases' highlighting.
From: |
Alex Kost |
Subject: |
02/07: emacs: devel: Fix 'modify-phases' highlighting. |
Date: |
Fri, 09 Oct 2015 13:53:24 +0000 |
alezost pushed a commit to branch master
in repository guix.
commit 88908d55e0ce020f9cbdfc2a505b27f43a863554
Author: Alex Kost <address@hidden>
Date: Fri Oct 2 17:25:40 2015 +0300
emacs: devel: Fix 'modify-phases' highlighting.
* emacs/guix-devel.el (guix-devel-modify-phases-font-lock-pre): Handle
the case when 'modify-phases' is commented.
---
emacs/guix-devel.el | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/emacs/guix-devel.el b/emacs/guix-devel.el
index 2e85a7e..1f760b6 100644
--- a/emacs/guix-devel.el
+++ b/emacs/guix-devel.el
@@ -132,8 +132,12 @@ This function is used as a MATCHER for
`font-lock-keywords'."
"Skip the next sexp, and return the end point of the current list.
This function is used as a PRE-MATCH-FORM for `font-lock-keywords'
to find 'modify-phases' keywords."
- (ignore-errors (forward-sexp))
- (save-excursion (up-list) (point)))
+ (let ((in-comment? (nth 4 (syntax-ppss))))
+ ;; If 'modify-phases' is commented, do not try to search for its
+ ;; keywords.
+ (unless in-comment?
+ (ignore-errors (forward-sexp))
+ (save-excursion (up-list) (point)))))
(defvar guix-devel-font-lock-keywords
`((,(rx (or "#~" "#$" "#$@" "#+" "#+@")) .
- branch master updated (b588177 -> b94ef11), Alex Kost, 2015/10/09
- 04/07: emacs: Fix 'guix-devel-setup-repl'., Alex Kost, 2015/10/09
- 07/07: emacs: Add 'guix-devel-lint-package', Alex Kost, 2015/10/09
- 02/07: emacs: devel: Fix 'modify-phases' highlighting.,
Alex Kost <=
- 03/07: emacs: Fix 'guix-build-log-phase-toggle-all'., Alex Kost, 2015/10/10
- 06/07: lint: Export 'run-checkers'., Alex Kost, 2015/10/10
- 05/07: emacs: Add 'guix-devel-with-definition'., Alex Kost, 2015/10/10
- 01/07: emacs: devel: Highlight gexp symbols., Alex Kost, 2015/10/10