From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: Query Major Mode Date: Thu, 21 Jul 2005 11:32:58 -0800 Message-ID: <20050721193258.GF2692@johnsons-web.com> References: <20050721183342.GE2692@johnsons-web.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1121974623 7418 80.91.229.2 (21 Jul 2005 19:37:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Jul 2005 19:37:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 21 21:37:02 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DvgqT-0004bx-Bf for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jul 2005 21:36:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DvgsZ-0001qn-LL for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jul 2005 15:38:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dvgnm-00087A-VC for help-gnu-emacs@gnu.org; Thu, 21 Jul 2005 15:33:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dvgnk-00085n-Gt for help-gnu-emacs@gnu.org; Thu, 21 Jul 2005 15:33:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dvgnk-000850-1R for help-gnu-emacs@gnu.org; Thu, 21 Jul 2005 15:33:48 -0400 Original-Received: from [208.218.214.44] (helo=ns3.cniweb.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DvgvJ-0001rl-Ay for help-gnu-emacs@gnu.org; Thu, 21 Jul 2005 15:41:37 -0400 Original-Received: from linus.johnson.com (rdbck-static-445.palmer.mtaonline.net [64.4.232.191]) by ns3.cniweb.net (8.13.3/8.13.3) with ESMTP id j6LJIm0O007842 for ; Thu, 21 Jul 2005 15:18:49 -0400 (EDT) Original-Received: from linus.johnson.com (localhost.johnson.com [127.0.0.1]) by linus.johnson.com (8.12.8/8.12.8) with ESMTP id j6LJWwHo005530 for ; Thu, 21 Jul 2005 11:32:59 -0800 Original-Received: (from tim@localhost) by linus.johnson.com (8.12.8/8.12.8/Submit) id j6LJWwCQ005528 for help-gnu-emacs@gnu.org; Thu, 21 Jul 2005 11:32:58 -0800 Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: Tim Johnson , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28058 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28058 > 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 http://www.alaska-internet-solutions.com