From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard G Riley Newsgroups: gmane.emacs.help Subject: Re: show-paren-mode / blink-matching-paren Date: Mon, 11 Aug 2008 10:46:22 +0200 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1218448414 552 80.91.229.12 (11 Aug 2008 09:53:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2008 09:53:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 11 11:54:25 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KSU6W-0007yh-9M for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 11:54:20 +0200 Original-Received: from localhost ([127.0.0.1]:52165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSU5Z-0001Q4-VJ for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 05:53:21 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed.straub-nv.de!news.motzarella.org!motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 45 Original-X-Trace: feeder.motzarella.org U2FsdGVkX18Kn9VJPP0D7OcqdhgIeHm5NP0qQliCMUzuWvkumdYIjkxjicQxKwpyKFvS7/Nws9NOJ+r41zN0OAkiH/nBeC7ksaHkZUxuVvBFU16cRXxuvQsTWCCtm911vNHPNiO6baEJERauFU1f5A== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Mon, 11 Aug 2008 08:46:30 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1+xV9NuYWNnUIrf+m1J5rElYihdAQ0Un7PdgMknNDmXKQ== Cancel-Lock: sha1:l+7VkQEPo5mtsfm5bFXjl2hVtNU= User-Agent: Emacs 22.2.1/No Gnus v0.11 Original-Xref: news.stanford.edu gnu.emacs.help:161097 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56443 Archived-At: Dan Davison 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) `----