From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.help Subject: Heuristics for: is a major-mode a "programming language" mode? Date: Wed, 15 Sep 2010 09:28:59 +0000 (UTC) Organization: U.C. Berkeley Math. Department. Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1291872937 22126 80.91.229.12 (9 Dec 2010 05:35:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 05:35:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 06:35:33 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQZAC-00009j-3t for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 06:35:32 +0100 Original-Received: from localhost ([127.0.0.1]:56615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQZAB-0002F9-9o for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 00:35:31 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Injection-Date: Wed, 15 Sep 2010 09:28:59 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="LlLjF8LevGdIZWbTvv+SXA"; logging-data="4146"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+L95VwG2LtRmMNPHVpSHPH" User-Agent: slrn/0.9.8.1pl1 (Linux) Cancel-Lock: sha1:Pckal5kV3lnZ4kYkKWlC5XuATFw= Original-Xref: usenet.stanford.edu gnu.emacs.help:181321 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:76747 Archived-At: I want a certain keypress act as forward-sexp in "programming language" modes, and as forward-sentence (sp?) in other modes (likewise for go-to-function-begin (sp?) and forward-paragraph (sp?)). So there must be some code which decides "which type" is the given major mode. I would prefer the bulk of the decision to be made programmatically, THEN let the user override if the auto-choice was wrong. Anyone with ideas how to do this? Thanks, Ilya P.S. In addition to sexp/sentence and function/paragraph, are there other "merges" one can do to do navigation?