diff options
| -rw-r--r-- | lisp/simple.el | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 2a90fa6740c..508569d55fa 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3500,7 +3500,8 @@ when it is off screen)." | |||
| 3500 | (point))))) | 3500 | (point))))) |
| 3501 | (let* ((oldpos (point)) | 3501 | (let* ((oldpos (point)) |
| 3502 | (blinkpos) | 3502 | (blinkpos) |
| 3503 | (mismatch)) | 3503 | (mismatch) |
| 3504 | matching-paren) | ||
| 3504 | (save-excursion | 3505 | (save-excursion |
| 3505 | (save-restriction | 3506 | (save-restriction |
| 3506 | (if blink-matching-paren-distance | 3507 | (if blink-matching-paren-distance |
| @@ -3514,12 +3515,20 @@ when it is off screen)." | |||
| 3514 | (setq blinkpos (scan-sexps oldpos -1))) | 3515 | (setq blinkpos (scan-sexps oldpos -1))) |
| 3515 | (error nil))) | 3516 | (error nil))) |
| 3516 | (and blinkpos | 3517 | (and blinkpos |
| 3517 | (/= (char-syntax (char-after blinkpos)) | 3518 | (save-excursion |
| 3518 | ?\$) | 3519 | (goto-char blinkpos) |
| 3519 | (setq mismatch | 3520 | (not (looking-at "\\s$"))) |
| 3520 | (or (null (matching-paren (char-after blinkpos))) | 3521 | (setq matching-paren |
| 3522 | (or (and parse-sexp-lookup-properties | ||
| 3523 | (let ((prop (get-text-property blinkpos 'syntax-table))) | ||
| 3524 | (and (consp prop) | ||
| 3525 | (eq (car prop) 4) | ||
| 3526 | (cdr prop)))) | ||
| 3527 | (matching-paren (char-after blinkpos))) | ||
| 3528 | mismatch | ||
| 3529 | (or (null matching-paren) | ||
| 3521 | (/= (char-after (1- oldpos)) | 3530 | (/= (char-after (1- oldpos)) |
| 3522 | (matching-paren (char-after blinkpos)))))) | 3531 | matching-paren)))) |
| 3523 | (if mismatch (setq blinkpos nil)) | 3532 | (if mismatch (setq blinkpos nil)) |
| 3524 | (if blinkpos | 3533 | (if blinkpos |
| 3525 | ;; Don't log messages about paren matching. | 3534 | ;; Don't log messages about paren matching. |