help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defining my own newline function


From: Ryan Krauss
Subject: Re: defining my own newline function
Date: Tue, 6 Nov 2007 07:56:15 -0600

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 <drew.adams@oracle.com> wrote:
> > (define-key pypoutline-mode-map "\C-j" 'pypoutline-newline-and-indent)
> > (define-key pypoutline-mode-map [<return>] '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 <return>) 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.]
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]