diff options
| author | Stefan Monnier | 2004-12-03 22:26:13 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-12-03 22:26:13 +0000 |
| commit | c6db81aa8d5eae02b6bcced44a50eee4ec5676a0 (patch) | |
| tree | f290c157a25e2bf33580163f953306104a8e2491 | |
| parent | 35dccc628789210230c6d655e38c5eaac2291333 (diff) | |
| download | emacs-c6db81aa8d5eae02b6bcced44a50eee4ec5676a0.tar.gz emacs-c6db81aa8d5eae02b6bcced44a50eee4ec5676a0.zip | |
(blink-matching-open): Obey syntax-table text properties.
| -rw-r--r-- | lisp/simple.el | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index f591559b8aa..c11430c3395 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; simple.el --- basic editing commands for Emacs | 1 | ;;; simple.el --- basic editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 99, | 3 | ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; 2000, 01, 02, 03, 2004 | 4 | ;; 2000, 2001, 2002, 2003, 2004 |
| 5 | ;; Free Software Foundation, Inc. | 5 | ;; Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | ;; Maintainer: FSF | 7 | ;; Maintainer: FSF |
| @@ -736,7 +736,7 @@ that uses or sets the mark." | |||
| 736 | (defun what-line () | 736 | (defun what-line () |
| 737 | "Print the current buffer line number and narrowed line number of point." | 737 | "Print the current buffer line number and narrowed line number of point." |
| 738 | (interactive) | 738 | (interactive) |
| 739 | (let ((opoint (point)) (start (point-min)) | 739 | (let ((start (point-min)) |
| 740 | (n (line-number-at-pos))) | 740 | (n (line-number-at-pos))) |
| 741 | (if (= start 1) | 741 | (if (= start 1) |
| 742 | (message "Line %d" n) | 742 | (message "Line %d" n) |
| @@ -3124,8 +3124,7 @@ Outline mode sets this." | |||
| 3124 | ;; for intermediate positions. | 3124 | ;; for intermediate positions. |
| 3125 | (let ((inhibit-point-motion-hooks t) | 3125 | (let ((inhibit-point-motion-hooks t) |
| 3126 | (opoint (point)) | 3126 | (opoint (point)) |
| 3127 | (forward (> arg 0)) | 3127 | (forward (> arg 0))) |
| 3128 | new line-end line-beg) | ||
| 3129 | (unwind-protect | 3128 | (unwind-protect |
| 3130 | (progn | 3129 | (progn |
| 3131 | (if (not (memq last-command '(next-line previous-line))) | 3130 | (if (not (memq last-command '(next-line previous-line))) |
| @@ -3928,16 +3927,12 @@ when it is off screen)." | |||
| 3928 | (setq blinkpos (scan-sexps oldpos -1))) | 3927 | (setq blinkpos (scan-sexps oldpos -1))) |
| 3929 | (error nil))) | 3928 | (error nil))) |
| 3930 | (and blinkpos | 3929 | (and blinkpos |
| 3931 | (save-excursion | 3930 | (not (eq (car (syntax-after blinkpos)) 8)) ;Not syntax '$'. |
| 3932 | (goto-char blinkpos) | ||
| 3933 | (not (looking-at "\\s$"))) | ||
| 3934 | (setq matching-paren | 3931 | (setq matching-paren |
| 3935 | (or (and parse-sexp-lookup-properties | 3932 | (let ((syntax (syntax-after blinkpos))) |
| 3936 | (let ((prop (get-text-property blinkpos 'syntax-table))) | 3933 | (and (consp syntax) |
| 3937 | (and (consp prop) | 3934 | (eq (car syntax) 4) |
| 3938 | (eq (car prop) 4) | 3935 | (cdr syntax))) |
| 3939 | (cdr prop)))) | ||
| 3940 | (matching-paren (char-after blinkpos))) | ||
| 3941 | mismatch | 3936 | mismatch |
| 3942 | (or (null matching-paren) | 3937 | (or (null matching-paren) |
| 3943 | (/= (char-after (1- oldpos)) | 3938 | (/= (char-after (1- oldpos)) |