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: Drew Adams
Subject: RE: defining my own newline function
Date: Tue, 6 Nov 2007 06:29:41 -0800

> 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.

You did it right. Sorry, I meant `current-local-map'. But that won't help
much. To check the current mode, just do `C-h v major-mode' - that's what I
should have said.

You can also do `M-x pp-eval-expression RET (current-local-map)'. That will
show you the keymap for the current mode, but in the form of a list. If you
don't recognize your keys there, then the map is not what you expect.

My questions were meant only as a quick sanity check - to make sure that you
did in fact enter your mode and that your mode does in fact use the map you
expect. HTH.







reply via email to

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