# HG changeset patch # User Richard M. Stallman # Date 781860545 0 # Node ID d79ecfc2776c03956aff696af58cb1b75c420ac4 # Parent 06c286dec48598e12aceee0ccc31ccc640c9ee12 (blink-matching-open): Check there is a previous nonblank line before trying to display it. No need for backward-char before the skip-chars-backward. diff -r 06c286dec485 -r d79ecfc2776c lisp/simple.el --- a/lisp/simple.el Tue Oct 11 05:29:55 1994 +0000 +++ b/lisp/simple.el Tue Oct 11 07:29:05 1994 +0000 @@ -2412,19 +2412,24 @@ (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)))))))) + ;; Otherwise show the previous nonblank line, + ;; if there is one. + (if (save-excursion + (skip-chars-backward "\n \t") + (not (bobp))) + (concat + (buffer-substring (progn + (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))) + ;; There is nothing to show except the char itself. + (buffer-substring blinkpos (1+ blinkpos)))))))) (cond (mismatch (message "Mismatched parentheses")) ((not blink-matching-paren-distance)