all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard G Riley <rileyrgdev@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: show-paren-mode / blink-matching-paren
Date: Mon, 11 Aug 2008 10:46:22 +0200	[thread overview]
Message-ID: <g7ou96$m79$1@registered.motzarella.org> (raw)
In-Reply-To: mailman.16353.1218443902.18990.help-gnu-emacs@gnu.org


Dan Davison <davison@stats.ox.ac.uk> writes:

> q1. I'd like show-paren-mode to wait show-paren-delay seconds, then
> show the matching paren, but only do so for some specified amount of
> time, before going away. However, I don't see a variable specifying
> how long to show the paren for. What I'm after is the following:
> whenever I'm curious about what the matching paren is of some closing
> paren, I can move point to after the closing paren, and it will show
> me, for a second or so. Currently it's seeming to me that I can
> achieve this with neither show-paren-mode nor blink-matching-paren
> (which only blinks on insertion, rather than point being next to
> paren). Any solutions?
>
> q2. A basic question: In my .emacs I'd like to turn on
> e.g. show-paren-mode in e.g. emacs-lisp mode only. How do I do that?
> Adding (show-paren-mode t) to my personal emacs-lisp mode hook turns
> it on in all buffers, right?

http://www.emacswiki.org/cgi-bin/wiki/ShowParenMode

See the bit about mode local to buffer:

,----
| To make this mode local to the buffer use (make-variable-buffer-local ‘show-paren-mode), add something like this to your .emacs:
| 
| (defun lispy-parens ()
|   "Setup parens display for lisp modes"
|   (setq show-paren-delay 0)
|   (setq show-paren-style 'parenthesis)
|   (make-variable-buffer-local 'show-paren-mode)
|   (show-paren-mode 1)
|   (set-face-background 'show-paren-match-face (face-background 'default))
|   (if (boundp 'font-lock-comment-face)
|       (set-face-foreground 'show-paren-match-face 
| 			   (face-foreground 'font-lock-comment-face))
|     (set-face-foreground 'show-paren-match-face 
| 			 (face-foreground 'default)))
|   (set-face-foreground 'show-paren-match-face "red")
|   (set-face-attribute 'show-paren-match-face nil :weight 'extra-bold))
| 
| (add-hook 'scheme-mode-hook 'lispy-parens)
| (add-hook 'lisp-mode-hook 'lispy-parens)
| (add-hook 'emacs-lisp-mode-hook 'lispy-parens)
`----


       reply	other threads:[~2008-08-11  8:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.16353.1218443902.18990.help-gnu-emacs@gnu.org>
2008-08-11  8:46 ` Richard G Riley [this message]
2008-08-11 10:18   ` show-paren-mode / blink-matching-paren Dan Davison
2008-08-11  8:38 Dan Davison
2008-08-11 10:42 ` Nikolaj Schumacher

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='g7ou96$m79$1@registered.motzarella.org' \
    --to=rileyrgdev@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.