diff options
| author | Richard M. Stallman | 1994-08-17 22:31:16 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-08-17 22:31:16 +0000 |
| commit | 329ff3a4e7733f960adac638526ae1aec21873f3 (patch) | |
| tree | ef5965f2b09420edb33c80111794e2c6cd3d969d | |
| parent | d18c3d0d3d535d0b9de27bd3907c179d0db1b1f3 (diff) | |
| download | emacs-329ff3a4e7733f960adac638526ae1aec21873f3.tar.gz emacs-329ff3a4e7733f960adac638526ae1aec21873f3.zip | |
(show-paren-command-hook): Set the face of an overlay
each time we move it somewhere.
| -rw-r--r-- | lisp/paren.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/paren.el b/lisp/paren.el index 758ac66c124..eb108910e28 100644 --- a/lisp/paren.el +++ b/lisp/paren.el | |||
| @@ -102,8 +102,9 @@ | |||
| 102 | (+ (point) dir) (point) | 102 | (+ (point) dir) (point) |
| 103 | (current-buffer)) | 103 | (current-buffer)) |
| 104 | (setq show-paren-overlay-1 | 104 | (setq show-paren-overlay-1 |
| 105 | (make-overlay (- pos dir) pos)) | 105 | (make-overlay (- pos dir) pos))) |
| 106 | (overlay-put show-paren-overlay-1 'face face))) | 106 | ;; Always set the overlay face, since it varies. |
| 107 | (overlay-put show-paren-overlay-1 'face face)) | ||
| 107 | ;; Otherwise, turn off any such highlighting. | 108 | ;; Otherwise, turn off any such highlighting. |
| 108 | (and show-paren-overlay-1 | 109 | (and show-paren-overlay-1 |
| 109 | (overlay-buffer show-paren-overlay-1) | 110 | (overlay-buffer show-paren-overlay-1) |
| @@ -113,8 +114,9 @@ | |||
| 113 | (move-overlay show-paren-overlay (- pos dir) pos | 114 | (move-overlay show-paren-overlay (- pos dir) pos |
| 114 | (current-buffer)) | 115 | (current-buffer)) |
| 115 | (setq show-paren-overlay | 116 | (setq show-paren-overlay |
| 116 | (make-overlay (- pos dir) pos)) | 117 | (make-overlay (- pos dir) pos))) |
| 117 | (overlay-put show-paren-overlay 'face face))) | 118 | ;; Always set the overlay face, since it varies. |
| 119 | (overlay-put show-paren-overlay 'face face)) | ||
| 118 | (t | 120 | (t |
| 119 | ;; If not at a paren that has a match, | 121 | ;; If not at a paren that has a match, |
| 120 | ;; turn off any previous paren highlighting. | 122 | ;; turn off any previous paren highlighting. |