* Angle brackets matching
@ 2006-08-21 18:14 Faheem Mitha
2006-08-21 19:49 ` Harald Hanche-Olsen
0 siblings, 1 reply; 4+ messages in thread
From: Faheem Mitha @ 2006-08-21 18:14 UTC (permalink / raw)
Hi everyone,
Emacs has nice functionality for paren matching. Ie. if I put the
cursor outside a paren, it highlights both that paren and the matching
paren. However, it does not do the same for angle brackets. This would
be very useful, particularly when writing C++ templates. :-)
I was wondering if anyone knew how to get this working with the
version of emacs in Debian Sarge, ie. 21.4a-1.
Thanks.
Faheem.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Angle brackets matching
2006-08-21 18:14 Angle brackets matching Faheem Mitha
@ 2006-08-21 19:49 ` Harald Hanche-Olsen
2006-08-21 19:47 ` David Kastrup
2006-08-21 20:16 ` Faheem Mitha
0 siblings, 2 replies; 4+ messages in thread
From: Harald Hanche-Olsen @ 2006-08-21 19:49 UTC (permalink / raw)
+ Faheem Mitha <faheem@email.unc.edu>:
| Emacs has nice functionality for paren matching. Ie. if I put the
| cursor outside a paren, it highlights both that paren and the matching
| paren. However, it does not do the same for angle brackets. This would
| be very useful, particularly when writing C++ templates. :-)
These might be useful, at least if you use paren-mode:
(modify-syntax-entry ?< "(>")
(modify-syntax-entry ?> ")<")
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Angle brackets matching
2006-08-21 19:49 ` Harald Hanche-Olsen
@ 2006-08-21 19:47 ` David Kastrup
2006-08-21 20:16 ` Faheem Mitha
1 sibling, 0 replies; 4+ messages in thread
From: David Kastrup @ 2006-08-21 19:47 UTC (permalink / raw)
Harald Hanche-Olsen <hanche@math.ntnu.no> writes:
> + Faheem Mitha <faheem@email.unc.edu>:
>
> | Emacs has nice functionality for paren matching. Ie. if I put the
> | cursor outside a paren, it highlights both that paren and the matching
> | paren. However, it does not do the same for angle brackets. This would
> | be very useful, particularly when writing C++ templates. :-)
>
> These might be useful, at least if you use paren-mode:
>
> (modify-syntax-entry ?< "(>")
> (modify-syntax-entry ?> ")<")
I am not sure. C++ syntax is such a mess. For example, you can write
things like
typedef xxx = wurks::typ<a,sizeof(zap)<<2>4>;
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Angle brackets matching
2006-08-21 19:49 ` Harald Hanche-Olsen
2006-08-21 19:47 ` David Kastrup
@ 2006-08-21 20:16 ` Faheem Mitha
1 sibling, 0 replies; 4+ messages in thread
From: Faheem Mitha @ 2006-08-21 20:16 UTC (permalink / raw)
On Mon, 21 Aug 2006 21:49:03 +0200, Harald Hanche-Olsen
<hanche@math.ntnu.no> wrote:
> + Faheem Mitha <faheem@email.unc.edu>:
>
>| Emacs has nice functionality for paren matching. Ie. if I put the
>| cursor outside a paren, it highlights both that paren and the matching
>| paren. However, it does not do the same for angle brackets. This would
>| be very useful, particularly when writing C++ templates. :-)
>
> These might be useful, at least if you use paren-mode:
>
> (modify-syntax-entry ?< "(>")
> (modify-syntax-entry ?> ")<")
Hi,
Thanks for replying.
This does not seem to do anything, as far as I can see.
I have the following lines in my .emacs which involve use of the word paren.
'(show-paren-mode t nil (paren))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(show-paren-match-face ((((class color))
(:foreground "turquoise" :weight bold))))
'(show-paren-mismatch-face ((((class color))
(:foreground "red" :weight bold)))))
Do I need to add something else?
Faheem.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-08-21 20:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-21 18:14 Angle brackets matching Faheem Mitha
2006-08-21 19:49 ` Harald Hanche-Olsen
2006-08-21 19:47 ` David Kastrup
2006-08-21 20:16 ` Faheem Mitha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).