Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f8e2c40c
Commit
f8e2c40c
authored
Feb 20, 1997
by
Karl Heuer
Browse files
(show-paren-function): Handle multibyte characters.
parent
51a02226
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
lisp/paren.el
lisp/paren.el
+12
-8
No files found.
lisp/paren.el
View file @
f8e2c40c
...
...
@@ -104,7 +104,7 @@ after `show-paren-delay' seconds of Emacs idle time."
(
let
((
beg
(
min
pos
oldpos
))
(
end
(
max
pos
oldpos
)))
(
and
(
/=
(
char-syntax
(
char-after
beg
))
?\$
)
(
setq
mismatch
(
not
(
eq
(
char-
after
(
1-
end
)
)
(
not
(
eq
(
char-
before
end
)
;; This can give nil.
(
matching-paren
(
char-after
beg
))))))))
;; If they don't properly match, use a different face,
...
...
@@ -137,9 +137,9 @@ after `show-paren-delay' seconds of Emacs idle time."
;; highlight the paren at point to indicate misbalance.
(
let
((
from
(
if
(
=
dir
1
)
(
point
)
(
1-
(
point
)
)))
(
forward-
point
-1
)))
(
to
(
if
(
=
dir
1
)
(
1+
(
point
)
)
(
forward-
point
1
)
(
point
))))
(
if
show-paren-overlay-1
(
move-overlay
show-paren-overlay-1
...
...
@@ -157,11 +157,15 @@ after `show-paren-delay' seconds of Emacs idle time."
;; If it's an unmatched paren, turn off any such highlighting.
(
or
(
and
(
not
(
integerp
pos
))
(
delete-overlay
show-paren-overlay
))
(
if
show-paren-overlay
(
move-overlay
show-paren-overlay
(
-
pos
dir
)
pos
(
current-buffer
))
(
setq
show-paren-overlay
(
make-overlay
(
-
pos
dir
)
pos
))))
(
save-excursion
(
goto-char
pos
)
(
if
show-paren-overlay
(
move-overlay
show-paren-overlay
(
forward-point
(
-
dir
))
pos
(
current-buffer
))
(
setq
show-paren-overlay
(
make-overlay
(
forward-point
(
-
dir
))
pos
)))))
;; Always set the overlay face, since it varies.
(
overlay-put
show-paren-overlay
'face
face
))
(
t
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment