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).
(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))))
(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