emacs-devel
[Top][All Lists]
Advanced

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

Re: with a fresh emacs "(buffer-local-value fundamental-mode (current-


From: Davis Herring
Subject: Re: with a fresh emacs "(buffer-local-value fundamental-mode (current-buffer))" error.
Date: Wed, 8 Apr 2009 15:32:04 -0700 (PDT)
User-agent: SquirrelMail/1.4.8-5.3.lanl2

> (buffer-local-value fundamental-mode (current-buffer))
>
> Still gives an error:
> -----
> Debugger entered--Lisp error: (void-variable fundamental-mode)
>   (buffer-local-value fundamental-mode (current-buffer))
>   eval((buffer-local-value fundamental-mode (current-buffer)))
>   eval-last-sexp-1(nil)
>   eval-last-sexp(nil)
>   call-interactively(eval-last-sexp nil nil)
> -----
>
> Whereas with longlines-mode having been set per above evaluating:
>
> (buffer-local-value longlines-mode (current-buffer))
>
> No longer drops me into the debugger?

First, you need to quote your variable names: (buffer-local-value 'foo
(current-buffer)).

Second, only minor modes are (typically) also variables.  For a major
mode, since there can only be one, you just want

(eq (buffer-local-value 'major-mode [buffer]) [mode])

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

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