unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: which mode am I using?
  2003-09-20 19:15 which mode am I using? Zimmen Gnauh
@ 2003-09-20 16:58 ` Dave Footitt
  2003-09-21 20:16 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Footitt @ 2003-09-20 16:58 UTC (permalink / raw)



(if (eq major-mode 'c-mode)
  (do-something))

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

* which mode am I using?
@ 2003-09-20 19:15 Zimmen Gnauh
  2003-09-20 16:58 ` Dave Footitt
  2003-09-21 20:16 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Zimmen Gnauh @ 2003-09-20 19:15 UTC (permalink / raw)



I need to test whether the current buffer is in c mode or not: 

(if (is-c-mode)
    (do-something))

How can this be done? Thanks for any input. 

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

* Re: which mode am I using?
  2003-09-20 19:15 which mode am I using? Zimmen Gnauh
  2003-09-20 16:58 ` Dave Footitt
@ 2003-09-21 20:16 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2003-09-21 20:16 UTC (permalink / raw)


> I need to test whether the current buffer is in c mode or not: 
> (if (is-c-mode)
>     (do-something))

(if (derived-mode-p 'c-mode) ...)


        Stefan

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

end of thread, other threads:[~2003-09-21 20:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-20 19:15 which mode am I using? Zimmen Gnauh
2003-09-20 16:58 ` Dave Footitt
2003-09-21 20:16 ` Stefan Monnier

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).