[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6bc14c4 16/27: Beautify hes-ruby-escape-sequence-keywords
From: |
Dmitry Gutov |
Subject: |
[elpa] master 6bc14c4 16/27: Beautify hes-ruby-escape-sequence-keywords |
Date: |
Sat, 29 Oct 2016 00:04:18 +0000 (UTC) |
branch: master
commit 6bc14c47f8646bac5bcaafce32baff5a0527e1b1
Author: Pavel Matcula <address@hidden>
Commit: Pavel Matcula <address@hidden>
Beautify hes-ruby-escape-sequence-keywords
---
highlight-escape-sequences.el | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/highlight-escape-sequences.el b/highlight-escape-sequences.el
index 98cf84c..8f50fc0 100644
--- a/highlight-escape-sequences.el
+++ b/highlight-escape-sequences.el
@@ -138,24 +138,17 @@ Currently doesn't handle \\C-, \\M-, etc.")
(defconst hes-ruby-escape-sequence-keywords
`((,hes-ruby-escape-sequence-re
- (1 (let* ((state (syntax-ppss))
- (term (nth 3 state)))
- (when (or (and (eq term ?')
- (member (match-string 2) '("\\" "'")))
- (if (fboundp 'ruby-syntax-expansion-allowed-p)
- (ruby-syntax-expansion-allowed-p state)
- (memq term '(?\" ?/ ?\n ?` t))))
- 'hes-escape-backslash-face))
- prepend)
- (2 (let* ((state (syntax-ppss))
- (term (nth 3 state)))
- (when (or (and (eq term ?')
- (member (match-string 2) '("\\" "'")))
- (if (fboundp 'ruby-syntax-expansion-allowed-p)
- (ruby-syntax-expansion-allowed-p state)
- (memq term '(?\" ?/ ?\n ?` t))))
- 'hes-escape-sequence-face))
- prepend))))
+ (0 (let* ((state (syntax-ppss))
+ (term (nth 3 state)))
+ (when (or (and (eq term ?')
+ (member (match-string 2) '("\\" "'")))
+ (if (fboundp 'ruby-syntax-expansion-allowed-p)
+ (ruby-syntax-expansion-allowed-p state)
+ (memq term '(?\" ?/ ?\n ?` t))))
+ (add-face-text-property (match-beginning 1) (match-end 1)
'hes-escape-backslash-face)
+ (add-face-text-property (match-beginning 2) (match-end 2)
'hes-escape-sequence-face)
+ nil))
+ prepend))))
(defun hes-make-simple-escape-sequence-keywords(re)
`((,re
- [elpa] master updated (2a0dbe5 -> 0e74c8c), Dmitry Gutov, 2016/10/28
- [elpa] master 7777860 03/27: Autoload the mode function, Dmitry Gutov, 2016/10/28
- [elpa] master 74340d0 02/27: hes-ruby-keywords, fallback predicate: Allow in backquoted literals, Dmitry Gutov, 2016/10/28
- [elpa] master 4425527 04/27: hes-simple-mode setter: Fix initialization; turn on when needed, Dmitry Gutov, 2016/10/28
- [elpa] master f7a0074 06/27: Wrong words on the screenshot, Dmitry Gutov, 2016/10/28
- [elpa] master 0df3e63 12/27: Remove explicit group, Dmitry Gutov, 2016/10/28
- [elpa] master 6bc14c4 16/27: Beautify hes-ruby-escape-sequence-keywords,
Dmitry Gutov <=
- [elpa] master 828cdbb 08/27: Improve regexp and add two faces, Dmitry Gutov, 2016/10/28
- [elpa] master fc8f4e7 01/27: Initial commit, Dmitry Gutov, 2016/10/28
- [elpa] master 8098664 05/27: Add readme and screenshot, Dmitry Gutov, 2016/10/28
- [elpa] master 5d45ca5 13/27: Fix the Author: header, Dmitry Gutov, 2016/10/28
- [elpa] master a031ee2 20/27: Add Emacs Lisp and Clojure (same as Java), Dmitry Gutov, 2016/10/28
- [elpa] master 083954e 19/27: Restore compatibility with earlier Emacsen, Dmitry Gutov, 2016/10/28
- [elpa] master 20d3190 22/27: Update copyright, Dmitry Gutov, 2016/10/28
- [elpa] master 02b8d09 10/27: Add more specific regexps, Dmitry Gutov, 2016/10/28
- [elpa] master 9c80a93 18/27: Merge pull request #1 from dev-plvlml/master, Dmitry Gutov, 2016/10/28
- [elpa] master 72c3cdc 07/27: Change wording, Dmitry Gutov, 2016/10/28