mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
paren.el: Fix part of bug#81035
* lisp/paren.el (show-paren--default): Syntax-propertize before narrowing.
This commit is contained in:
parent
fd1b5cd890
commit
e9d1367a32
1 changed files with 8 additions and 3 deletions
|
|
@ -272,9 +272,14 @@ It is the default value of `show-paren-data-function'."
|
||||||
(save-restriction
|
(save-restriction
|
||||||
;; Determine the range within which to look for a match.
|
;; Determine the range within which to look for a match.
|
||||||
(when blink-matching-paren-distance
|
(when blink-matching-paren-distance
|
||||||
(narrow-to-region
|
(let ((beg (max (point-min)
|
||||||
(max (point-min) (- (point) blink-matching-paren-distance))
|
(- (point) blink-matching-paren-distance))))
|
||||||
(min (point-max) (+ (point) blink-matching-paren-distance))))
|
;; `syntax-propertize' can't widen so make sure it won't
|
||||||
|
;; need to (bug#81035).
|
||||||
|
(syntax-propertize beg)
|
||||||
|
(narrow-to-region
|
||||||
|
beg
|
||||||
|
(min (point-max) (+ (point) blink-matching-paren-distance)))))
|
||||||
;; Scan across one sexp within that range.
|
;; Scan across one sexp within that range.
|
||||||
;; Errors or nil mean there is a mismatch.
|
;; Errors or nil mean there is a mismatch.
|
||||||
(condition-case ()
|
(condition-case ()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue