Commit c26fdcf5 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Say that we were unable to find the match within the limit

* simple.el (blink-matching-open): Say that we were unable to find
the match within the limit, if we're limited (bug#5122).
parent bb388cc5
2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
* simple.el (blink-matching-open): Say that we were unable to find
the match within the limit, if we're limited (bug#5122).
* international/mule-cmds.el (prefer-coding-system): Add an
example (bug#4869).
......
......@@ -5487,15 +5487,19 @@ The function should return non-nil if the two tokens do not match.")
(when (and (not (bobp))
blink-matching-paren)
(let* ((oldpos (point))
(limit-message "")
(message-log-max nil) ; Don't log messages about paren matching.
(blinkpos
(save-excursion
(save-restriction
(if blink-matching-paren-distance
(narrow-to-region
(max (minibuffer-prompt-end) ;(point-min) unless minibuf.
(- (point) blink-matching-paren-distance))
oldpos))
(when blink-matching-paren-distance
(let ((start (- (point) blink-matching-paren-distance)))
(when (> start (minibuffer-prompt-end))
(setq limit-message " within the limit"))
(narrow-to-region
(max (minibuffer-prompt-end) ;(point-min) unless minibuf.
start)
oldpos)))
(let ((parse-sexp-ignore-comments
(and parse-sexp-ignore-comments
(not blink-matching-paren-dont-ignore-comments))))
......@@ -5517,11 +5521,11 @@ The function should return non-nil if the two tokens do not match.")
(mismatch
(if blinkpos
(if (minibufferp)
(minibuffer-message "Mismatched parentheses")
(message "Mismatched parentheses"))
(minibuffer-message "Mismatched parentheses%s" limit-message)
(message "Mismatched parentheses%s" limit-message))
(if (minibufferp)
(minibuffer-message "Unmatched parenthesis")
(message "Unmatched parenthesis"))))
(minibuffer-message "Unmatched parenthesis%s" limit-message)
(message "Unmatched parenthesis%s" limit-message))))
((not blinkpos) nil)
((pos-visible-in-window-p blinkpos)
;; Matching open within window, temporarily move to blinkpos but only
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment