[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Query Major Mode
From: |
Tim Johnson |
Subject: |
Re: Query Major Mode |
Date: |
Thu, 21 Jul 2005 11:32:58 -0800 |
User-agent: |
Mutt/1.4.2.1i |
> 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