-
Notifications
You must be signed in to change notification settings - Fork 12
/
16_hl-p.el
46 lines (37 loc) · 1.32 KB
/
16_hl-p.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
;; -*- encoding: utf-8-unix; -*-
(require 'highlight-parentheses)
;; * colors
(custom-set-variables '(hl-paren-colors (quote (
"MediumOrchid1"
"DeepSkyBlue1"
"cyan"
"medium sea green"
"green"
"lawn green"
"yellow"
))))
;; * Try using the following to integrate highlight-parentheses with autopair mode:
(add-hook 'emacs-lisp-mode-hook
'(lambda ()
(highlight-parentheses-mode)
(setq autopair-handle-action-fns
(list 'autopair-default-handle-action
'(lambda (action pair pos-before)
(hl-paren-color-update))))))
;; * Better version to integrate highlight-parentheses with autopair mode:
;; (add-hook 'highlight-parentheses-mode-hook
;; '(lambda ()
;; (setq autopair-handle-action-fns
;; (append
;; (if autopair-handle-action-fns
;; autopair-handle-action-fns
;; '(autopair-default-handle-action))
;; '((lambda (action pair pos-before)
;; (hl-paren-color-update)))))))
;; (add-hook 'emacs-lisp-mode-hook 'skeleton-pair-alist-update)
;; * Enables highlight-parentheses-mode on all buffers:
(define-globalized-minor-mode global-highlight-parentheses-mode
highlight-parentheses-mode
(lambda ()
(highlight-parentheses-mode t)))
(global-highlight-parentheses-mode t)