From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ryan Krauss" Newsgroups: gmane.emacs.help Subject: Re: defining my own newline function Date: Tue, 6 Nov 2007 07:56:15 -0600 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1194357407 29732 80.91.229.12 (6 Nov 2007 13:56:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Nov 2007 13:56:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 06 14:56:50 2007 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.50) id 1IpOvB-0006x5-Rc for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Nov 2007 14:56:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpOv1-0005CL-3j for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Nov 2007 08:56:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IpOug-00059k-SA for help-gnu-emacs@gnu.org; Tue, 06 Nov 2007 08:56:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IpOuf-00055D-8M for help-gnu-emacs@gnu.org; Tue, 06 Nov 2007 08:56:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpOue-00054t-Uu for help-gnu-emacs@gnu.org; Tue, 06 Nov 2007 08:56:17 -0500 Original-Received: from nz-out-0506.google.com ([64.233.162.228]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IpOue-0007Wj-Jm for help-gnu-emacs@gnu.org; Tue, 06 Nov 2007 08:56:16 -0500 Original-Received: by nz-out-0506.google.com with SMTP id f1so1299151nzc for ; Tue, 06 Nov 2007 05:56:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=SGjXUiWKhtncul78k8I3m5Fw+tE7IGx+jnKe5zCLqiY=; b=D6gA4nKd4CSD2c2f2JF8A7Mb0an703fiW7Z65sj/1FB+CEBkWKYaHBMjzc2+UaUZx2+iexTr9bru7KcaYF13Jo/KinJ+XHnFnaYiPATO7MEMV4JEs/pyaBirZPkKvy7O/2Mb8ArdHXB9Lsv3a+BbWnb7ERIXntPe28wWEJ3y6HI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=X64owy9SvlUPaonn4rkHuh7HhvIUIpIh/f3JSwWzzFy8UB3G3tAYeQcyIA7SVZK/9L3SRWGN88ziAb8q7U5BaffQGu2FkYJUrdgrlRGb+0S2GE1cPB0ChJBIte9ApHtd1tsLhButQCpBEnEc/c4k8iGWWPxMs0sHPMIBjmpw5vw= Original-Received: by 10.115.58.1 with SMTP id l1mr6451546wak.1194357375091; Tue, 06 Nov 2007 05:56:15 -0800 (PST) Original-Received: by 10.114.171.19 with HTTP; Tue, 6 Nov 2007 05:56:15 -0800 (PST) In-Reply-To: Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:49051 Archived-At: Sorry, I meant to cc the list as well. I can't make 'M-: (current-local-mode)' do anything. I assume you want me to press Alt-Shift-: (the shift is needed to make a colon rather than a semi-colon?). When I do that, I prompted with Eval: so, I typed (current-local-mode) there and I get Debugger entered--Lisp error: (void-function current-local-mode) (current-local-mode) eval((current-local-mode)) eval-expression((current-local-mode) nil) call-interactively(eval-expression) But the info line lists my major mode as the one being run. The syntax highlighting is what I have defined, and my indent function is being used. My local key map is also available, with an outdent function bound to backtab. These keys don't work if I create a .txt file where my mode isn't running. So, I think my mode is running and my local key map is happening with other keys. Ryan On 11/5/07, Drew Adams wrote: > > (define-key pypoutline-mode-map "\C-j" 'pypoutline-newline-and-indent) > > (define-key pypoutline-mode-map [] 'pypoutline-newline-and-indent) > > (define-key py-mode-map "\C-m" 'pypoutline-newline-and-indent) > > > but none of them seem to be working. If I type C-h k and > > then hit return (in a buffer running my mode), I get: > > > RET (translated from ) runs the command newline > > > What am I doing wrong? Is there something I need to add > > to the syntax table of my mode or somewhere else? > > Are you sure that you are in your mode and that your mode has your mode map > as its local map? What does `M-: (current-local-mode)' tell you? > > [BTW, it's generally better to use plain text, not HTML, for email to a > mailing list.] > >