[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Annoying paren match messages in minibuffer
From: |
Juri Linkov |
Subject: |
Re: Annoying paren match messages in minibuffer |
Date: |
Wed, 14 Jan 2009 01:28:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) |
> emacs -Q
> M-%
> )
>
> This is perfectly sensible input for replace-string, so seeing the nag
> message (and have it momentarily displace the minibuffer display) is
> irritating. I know that this is not a big deal as any further input
> will immediately dismiss the message, but I'd think it would be better
> not to show it in the first place. Perhaps paren matching should be
> inhibited for minibuffer input that need not be balanced?
>
> I attempted to implement this by binding blink-matching-paren and
> show-paren-mode. Unfortunately that continues to inhibit paren
> matching if the user moves out of the minibuffer, so is not
> satisfactory. The example patch below does this for query-replace.
>
> Thoughts?
Please don't disable these notifications in the minibuffer.
They are useful for detecting unbalanced parenthesis while writing
short Lisp snippets or regexps with a lot of grouping constructs
in the minibuffer.
An annoyance like you reported can be eliminated with the following
simple patch:
Index: lisp/simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.966
diff -u -r1.966 simple.el
--- lisp/simple.el 9 Jan 2009 04:44:21 -0000 1.966
+++ lisp/simple.el 13 Jan 2009 23:28:42 -0000
@@ -5229,7 +5229,9 @@
;; a matching-char info, in which case the two CDRs
;; should match.
(eq matching-paren (cdr (syntax-after (1- oldpos))))))
- (message "Mismatched parentheses"))
+ (if (window-minibuffer-p (selected-window))
+ (minibuffer-message " [Mismatched parentheses]")
+ (message "Mismatched parentheses")))
((not blinkpos)
(or blink-matching-paren-distance
;; Don't complain when `$' with no blinkpos, because it
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: Annoying paren match messages in minibuffer, (continued)
- Re: Annoying paren match messages in minibuffer, Stefan Monnier, 2009/01/12
- Re: Annoying paren match messages in minibuffer, Miles Bader, 2009/01/12
- Re: Annoying paren match messages in minibuffer, Stefan Monnier, 2009/01/13
- Re: Annoying paren match messages in minibuffer, Dan Nicolaescu, 2009/01/13
- Re: Annoying paren match messages in minibuffer, Stefan Monnier, 2009/01/13
- Re: Annoying paren match messages in minibuffer, Dan Nicolaescu, 2009/01/13
- Re: Annoying paren match messages in minibuffer, Stefan Monnier, 2009/01/14
- RE: Annoying paren match messages in minibuffer, Drew Adams, 2009/01/14
Re: Annoying paren match messages in minibuffer, Geoff Gole, 2009/01/13
Re: Annoying paren match messages in minibuffer,
Juri Linkov <=
- Re: Annoying paren match messages in minibuffer, Chong Yidong, 2009/01/14
- Re: Annoying paren match messages in minibuffer, Stefan Monnier, 2009/01/14
- RE: Annoying paren match messages in minibuffer, Drew Adams, 2009/01/14
- Re: Annoying paren match messages in minibuffer, Juri Linkov, 2009/01/14
- Re: Annoying paren match messages in minibuffer, Stefan Monnier, 2009/01/14
- RE: Annoying paren match messages in minibuffer, Drew Adams, 2009/01/14
- Re: Annoying paren match messages in minibuffer, Stefan Monnier, 2009/01/14
- RE: Annoying paren match messages in minibuffer, Drew Adams, 2009/01/14
- Re: Annoying paren match messages in minibuffer, Stefan Monnier, 2009/01/14
- RE: Annoying paren match messages in minibuffer, Drew Adams, 2009/01/16