all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* match if-then-else, brackets etc.
@ 2003-04-10 15:26 Detlef Jockheck
  2003-04-10 15:33 ` Francois Fleuret
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Detlef Jockheck @ 2003-04-10 15:26 UTC (permalink / raw)


Hi,

whenever I analyze a programm in c, perl or pythen I have some problems to 
find the matching statement. Thant means I'm looking for the end of an 
if-declaration. Or where does this bracket belong to. Is there a plugin to 
hilight this dependencies in emacs?

ciao
Detlef

-- 
# Detlef Jockheck

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: match if-then-else, brackets etc.
  2003-04-10 15:26 match if-then-else, brackets etc Detlef Jockheck
@ 2003-04-10 15:33 ` Francois Fleuret
  2003-04-10 15:42 ` Kai Großjohann
  2003-04-10 17:55 ` Stefan Monnier
  2 siblings, 0 replies; 7+ messages in thread
From: Francois Fleuret @ 2003-04-10 15:33 UTC (permalink / raw)


Hi,

Detlef Jockheck wrote on 10 Apr 2003 16:26:20 MET:

> whenever I analyze a programm in c, perl or pythen I have some
> problems to find the matching statement. Thant means I'm looking for
> the end of an if-declaration. Or where does this bracket belong
> to. Is there a plugin to hilight this dependencies in emacs?

This will highlight the matching parenthesis/curly bracket/whatever:

,----
| (setq show-paren-delay 0)
| (show-paren-mode t)
`----

And this will make control-right to move the cursor to the matching
parenthesis/curly bracket/whatever

,----
| (defun match-paren (arg)
|   "Go to the matching parenthesis"
|   (interactive "p")
|   (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
|         ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
|         (t (condition-case nil (progn (re-search-forward "\\s\(") (backward-char 1)) (error nil)))
|         ))
| 
| (define-key global-map [(control right)] 'match-paren)
`----

Regards,

FF

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: match if-then-else, brackets etc.
  2003-04-10 15:26 match if-then-else, brackets etc Detlef Jockheck
  2003-04-10 15:33 ` Francois Fleuret
@ 2003-04-10 15:42 ` Kai Großjohann
  2003-04-11  5:58   ` Detlef Jockheck
  2003-04-10 17:55 ` Stefan Monnier
  2 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2003-04-10 15:42 UTC (permalink / raw)


Detlef Jockheck <djockheck@gauselmann.de> writes:

> whenever I analyze a programm in c, perl or pythen I have some problems to 
> find the matching statement. Thant means I'm looking for the end of an 
> if-declaration. Or where does this bracket belong to. Is there a plugin to 
> hilight this dependencies in emacs?

For parentheses and brackets and curly braces:
M-x show-paren-mode RET
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: match if-then-else, brackets etc.
  2003-04-10 15:26 match if-then-else, brackets etc Detlef Jockheck
  2003-04-10 15:33 ` Francois Fleuret
  2003-04-10 15:42 ` Kai Großjohann
@ 2003-04-10 17:55 ` Stefan Monnier
  2 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2003-04-10 17:55 UTC (permalink / raw)


>>>>> "Detlef" == Detlef Jockheck <djockheck@gauselmann.de> writes:
> whenever I analyze a programm in c, perl or pythen I have some problems to 
> find the matching statement. Thant means I'm looking for the end of an 
> if-declaration. Or where does this bracket belong to. Is there a plugin to 
> hilight this dependencies in emacs?

I suggest you take a look (with C-h k for example) at the key-bindings
C-M-f, C-M-b, and C-M-u.


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: match if-then-else, brackets etc.
  2003-04-10 15:42 ` Kai Großjohann
@ 2003-04-11  5:58   ` Detlef Jockheck
  2003-04-11 10:33     ` Detlef Jockheck
  0 siblings, 1 reply; 7+ messages in thread
From: Detlef Jockheck @ 2003-04-11  5:58 UTC (permalink / raw)


Kai Großjohann wrote:

> Detlef Jockheck <djockheck@gauselmann.de> writes:
> 
>> whenever I analyze a programm in c, perl or pythen I have some problems
>> to find the matching statement. Thant means I'm looking for the end of an
>> if-declaration. Or where does this bracket belong to. Is there a plugin
>> to hilight this dependencies in emacs?
> 
> For parentheses and brackets and curly braces:
> M-x show-paren-mode RET
Kai,

M-x show-paren-mode says  [no-match]. I've tried this in python-mode and in 
c-mode. Do I need to install an additional tool?

ciao
Detlef

-- 
# Detlef Jockheck

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: match if-then-else, brackets etc.
  2003-04-11  5:58   ` Detlef Jockheck
@ 2003-04-11 10:33     ` Detlef Jockheck
  2003-04-11 16:28       ` Kai Großjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Detlef Jockheck @ 2003-04-11 10:33 UTC (permalink / raw)


Detlef Jockheck wrote:

> Kai Großjohann wrote:
> 
>> Detlef Jockheck <djockheck@gauselmann.de> writes:
>> 
>>> whenever I analyze a programm in c, perl or pythen I have some problems
>>> to find the matching statement. Thant means I'm looking for the end of
>>> an if-declaration. Or where does this bracket belong to. Is there a
>>> plugin to hilight this dependencies in emacs?
>> 
>> For parentheses and brackets and curly braces:
>> M-x show-paren-mode RET
> Kai,
> 
> M-x show-paren-mode says  [no-match]. I've tried this in python-mode and
> in c-mode. Do I need to install an additional tool?
Oops!

Now I know why it doesn't work. It's because I'm using xemacs (not emacs). 
I thougt that this is approx. the same but I seems that it isn't.

How can I solve my problem with xemacs?

ciao
Detlef

-- 
# Detlef Jockheck

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: match if-then-else, brackets etc.
  2003-04-11 10:33     ` Detlef Jockheck
@ 2003-04-11 16:28       ` Kai Großjohann
  0 siblings, 0 replies; 7+ messages in thread
From: Kai Großjohann @ 2003-04-11 16:28 UTC (permalink / raw)


Detlef Jockheck <djockheck@gauselmann.de> writes:

> Now I know why it doesn't work. It's because I'm using xemacs (not emacs). 
> I thougt that this is approx. the same but I seems that it isn't.
>
> How can I solve my problem with xemacs?

Menu item:

Options/Display/Paren highlighting...

-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-04-11 16:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-10 15:26 match if-then-else, brackets etc Detlef Jockheck
2003-04-10 15:33 ` Francois Fleuret
2003-04-10 15:42 ` Kai Großjohann
2003-04-11  5:58   ` Detlef Jockheck
2003-04-11 10:33     ` Detlef Jockheck
2003-04-11 16:28       ` Kai Großjohann
2003-04-10 17:55 ` Stefan Monnier

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.