From: Eli Zaretskii <eliz@gnu.org>
To: Live System User <nyc4bos@aol.com>
Cc: 28566@debbugs.gnu.org
Subject: bug#28566: 25.2; show-paren error
Date: Sat, 23 Sep 2017 14:09:55 +0300 [thread overview]
Message-ID: <838th5bri4.fsf@gnu.org> (raw)
In-Reply-To: <87d16h4rwh.fsf@aol.com> (message from Live System User on Sat, 23 Sep 2017 06:43:10 -0400)
> From: Live System User <nyc4bos@aol.com>
> Cc: 28566@debbugs.gnu.org
> Date: Sat, 23 Sep 2017 06:43:10 -0400
>
> ;; Show offscreen paren matches in the minibuffer
> (defadvice show-paren-function
> (after show-matching-paren-offscreen activate)
> "If the matching paren is offscreen, show the matching line in the
> echo area. Has no effect if the character before point is not of
> the syntax class ')'."
> (interactive)
> (let ((matching-text nil))
> ;; Only call `blink-matching-open' if the character before point is a close
> ;; parentheses type character. Otherwise, there's not really any point, and
> ;; `blink-matching-open' would just echo "Mismatched parentheses", which gets
> ;; really annoying.
> ;; (or ...) is a hack to handle (bobp, eobp) conditions under 24.x.
> (if (char-equal (char-syntax
> (or (or (char-before (point)) (char-after (point))) ?0)
> ) ?\))
> (setq matching-text (blink-matching-open)))
> (if (not (null matching-text))
> (message matching-text))))
The return value of blink-matching-open is not documented, so it could
be anything. I'd suggest to replace the last 2 lines with
(if (stringp matching-text)
(message "%s" matching-text))
OK to close this bug report?
next prev parent reply other threads:[~2017-09-23 11:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-23 9:58 bug#28566: 25.2; show-paren error Live System User
2017-09-23 10:33 ` Eli Zaretskii
2017-09-23 10:43 ` Live System User
2017-09-23 11:09 ` Eli Zaretskii [this message]
2017-09-23 11:46 ` Live System User
2017-09-23 12:12 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=838th5bri4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=28566@debbugs.gnu.org \
--cc=nyc4bos@aol.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.