# HG changeset patch # User Richard M. Stallman # Date 764661198 0 # Node ID b705afc2b2ec297423abeabbda1def49ec2a53c7 # Parent 815a2d384b6e6ebcb917e20292d1d1e5ea18f284 (blink-matching-open): Now three strategies for choosing the text to display when the matching open is off screen. diff -r 815a2d384b6e -r b705afc2b2ec lisp/simple.el --- a/lisp/simple.el Sat Mar 26 05:37:00 1994 +0000 +++ b/lisp/simple.el Sat Mar 26 05:53:18 1994 +0000 @@ -2277,17 +2277,32 @@ (goto-char blinkpos) (message "Matches %s" + ;; Show what precedes the open in its line, if anything. (if (save-excursion (skip-chars-backward " \t") (not (bolp))) (buffer-substring (progn (beginning-of-line) (point)) (1+ blinkpos)) - (buffer-substring blinkpos - (progn - (forward-char 1) - (skip-chars-forward "\n \t") - (end-of-line) - (point))))))) + ;; Show what follows the open in its line, if anything. + (if (save-excursion + (forward-char 1) + (skip-chars-forward " \t") + (not (eolp))) + (buffer-substring blinkpos + (progn (end-of-line) (point))) + ;; Otherwise show the previous nonblank line. + (concat + (buffer-substring (progn + (backward-char 1) + (skip-chars-backward "\n \t") + (beginning-of-line) + (point)) + (progn (end-of-line) + (skip-chars-backward " \t") + (point))) + ;; Replace the newline and other whitespace with `...'. + "..." + (buffer-substring blinkpos (1+ blinkpos)))))))) (cond (mismatch (message "Mismatched parentheses")) ((not blink-matching-paren-distance)