[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105700: * lisp/paren.el (show-paren-
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105700: * lisp/paren.el (show-paren-function): Don't show escaped parens. |
Date: |
Sat, 10 Sep 2011 14:28:19 +0300 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105700
fixes bug(s): http://debbugs.gnu.org/9461
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Sat 2011-09-10 14:28:19 +0300
message:
* lisp/paren.el (show-paren-function): Don't show escaped parens.
Let-bind `unescaped' to `t' when paren is not escaped.
modified:
lisp/ChangeLog
lisp/paren.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-09-10 08:26:12 +0000
+++ b/lisp/ChangeLog 2011-09-10 11:28:19 +0000
@@ -1,3 +1,8 @@
+2011-09-10 Juri Linkov <address@hidden>
+
+ * paren.el (show-paren-function): Don't show escaped parens.
+ Let-bind `unescaped' to `t' when paren is not escaped. (Bug#9461)
+
2011-09-10 Eli Zaretskii <address@hidden>
* mail/sendmail.el (mml-to-mime, mml-attach-file)
=== modified file 'lisp/paren.el'
--- a/lisp/paren.el 2011-01-25 04:08:28 +0000
+++ b/lisp/paren.el 2011-09-10 11:28:19 +0000
@@ -135,13 +135,23 @@
;; and show it until input arrives.
(defun show-paren-function ()
(if show-paren-mode
- (let ((oldpos (point))
- (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1)
- ((eq (syntax-class (syntax-after (point))) 4) 1)))
- pos mismatch face)
+ (let* ((oldpos (point))
+ (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1)
+ ((eq (syntax-class (syntax-after (point))) 4) 1)))
+ (unescaped
+ (when dir
+ ;; Verify an even number of quoting characters precede the
paren.
+ ;; Follow the same logic as in `blink-matching-open'.
+ (= (if (= dir -1) 1 0)
+ (logand 1 (- (point)
+ (save-excursion
+ (if (= dir -1) (forward-char -1))
+ (skip-syntax-backward "/\\")
+ (point)))))))
+ pos mismatch face)
;;
;; Find the other end of the sexp.
- (when dir
+ (when unescaped
(save-excursion
(save-restriction
;; Determine the range within which to look for a match.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105700: * lisp/paren.el (show-paren-function): Don't show escaped parens.,
Juri Linkov <=