From: Tim Johnson <tim@johnsons-web.com>
Subject: Re: Query Major Mode
Date: Thu, 21 Jul 2005 11:32:58 -0800 [thread overview]
Message-ID: <20050721193258.GF2692@johnsons-web.com> (raw)
In-Reply-To: <DNEMKBNJBGPAOPIJOOICCEMOCKAA.drew.adams@oracle.com>
> There are lots of ways, depending on what you mean by query. Does `C-h m'
> do what you want?
Oops! Poorly phrased question. My apologies. What I would like to
do is perform this query programmatically.
Is that possible?
Now perhaps I should elaborate in case I am barking up the wrong
tree and there is a better way:
Let's suppose I want to write a subroutine that first, queries
the major mode, and then calls the appropriate subroutine for
the mode.
*pseudo-code* example:
(defun previous-subroutine ()
(cond
(eq major-mode "python")(previous-python-subroutine)
(eq major-mode "C")(previous-C-subroutine)
(eq major-mode "rebol")(previous-rebol-subroutine)
))
;; and then keymap of course.
thanks
tim
> Pointers to docs should suffice.
>
> `C-h i' Emacs
>
>
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
next prev parent reply other threads:[~2005-07-21 19:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-21 18:33 Query Major Mode Tim Johnson
2005-07-21 18:45 ` Drew Adams
2005-07-21 19:32 ` Tim Johnson [this message]
2005-07-21 19:46 ` Peter Dyballa
2005-07-21 20:03 ` Tim Johnson
2005-07-21 19:58 ` Drew Adams
2005-07-21 22:55 ` Kevin Rodgers
[not found] ` <mailman.1216.1121974434.20277.help-gnu-emacs@gnu.org>
2005-07-21 22:59 ` drkm
2005-07-22 5:51 ` Tim X
2005-07-21 18:45 ` Peter Dyballa
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050721193258.GF2692@johnsons-web.com \
--to=tim@johnsons-web.com \
/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.
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).