emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Annoying paren match messages in minibuffer


From: Geoff Gole
Subject: Annoying paren match messages in minibuffer
Date: Mon, 12 Jan 2009 21:18:35 +0900

By default, emacs will display a minibuffer message on seeing the user
type an unmatched paren. This is usually a welcome feature, but can
become annoying when point is in the minibuffer where well-formed
input is not necessarily balanced.

For example:

  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?

--- emacs/lisp/replace.el       2009-01-09 14:01:00.000000000 +0900
+++ /tmp/buffer-content-17773Bqy        2009-01-12 20:33:21.000000000 +0900
@@ -225,12 +225,14 @@

 To customize possible responses, change the \"bindings\" in
`query-replace-map'."
   (interactive
-   (let ((common
-         (query-replace-read-args
-          (concat "Query replace"
-                  (if current-prefix-arg " word" "")
-                  (if (and transient-mark-mode mark-active) " in region" ""))
-          nil)))
+   (let* (blink-matching-paren
+         show-paren-mode
+         (common
+          (query-replace-read-args
+           (concat "Query replace"
+                   (if current-prefix-arg " word" "")
+                   (if (and transient-mark-mode mark-active) " in region" ""))
+           nil)))
      (list (nth 0 common) (nth 1 common) (nth 2 common)
           ;; These are done separately here
           ;; so that command-history will record these expressions




reply via email to

[Prev in Thread] Current Thread [Next in Thread]