summaryrefslogtreecommitdiff
path: root/elisp.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-02-22 11:51:15 +0800
committerJSDurand <mmemmew@gmail.com>2021-02-22 11:51:15 +0800
commit7743f3ed1b81fbc693d58585596bf7caf783d1c7 (patch)
treee236de03db2b36c4d45b2fcf92ec89ea67859ba5 /elisp.el
parent01c080b98c6c7b645ac5c502c896b0965b784cb1 (diff)
More configurations
Now TeX and elfeed are roughly configured.
Diffstat (limited to 'elisp.el')
-rw-r--r--elisp.el33
1 files changed, 28 insertions, 5 deletions
diff --git a/elisp.el b/elisp.el
index 8045f64..c1c62fb 100644
--- a/elisp.el
+++ b/elisp.el
@@ -40,16 +40,39 @@
(search-forward "\"" end t))
((nth 4 ppss) ; comments
(forward-line +1))
- ((let ((symbol (intern-soft (match-string-no-properties 0))))
+ ((let* ((symbol (intern-soft (match-string-no-properties 0)))
+ (paren-starts (nth 9 ppss)))
(and (cond ((null symbol) nil)
((eq symbol t) nil)
((keywordp symbol) nil)
((special-variable-p symbol)
(setq emacs-lisp-face 'font-lock-variable-name-face))
- ((and (fboundp symbol)
- (eq (char-before (match-beginning 0)) ?\()
- (not (memq (char-before (1- (match-beginning 0)))
- (list ?\' ?\`))))
+ ((let ((quote-before-p
+ (mapcar
+ (function
+ (lambda (start)
+ (let ((temp-char (char-before start)))
+ (cond
+ ((eq temp-char ?`) 1)
+ ((eq temp-char ?') 2)))))
+ paren-starts)))
+ (and (fboundp symbol)
+ (eq (char-before (match-beginning 0)) ?\()
+ (not
+ (or (memq 2 quote-before-p)
+ (and (memq 1 quote-before-p)
+ (not
+ (or (eq (char-before
+ (max (1- (match-beginning 0))
+ (point-min)))
+ ?,)
+ (eq (char-before
+ (max (- (match-beginning 0) 2)
+ (point-min)))
+ ?,))))))
+ ;; (not (memq (char-before (1- (match-beginning 0)))
+ ;; (list ?\' ?\`)))
+ ))
(let ((unaliased (indirect-function symbol)))
(cond ((special-form-p unaliased)
(setq emacs-lisp-face 'font-lock-constant-face))