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

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

Re: special-mode buffer changes to fundamental when modified


From: Michael Heerdegen
Subject: Re: special-mode buffer changes to fundamental when modified
Date: Thu, 27 Oct 2016 18:59:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Stefan Huchler <stefan.huchler@mail.de> writes:

> Yes thats exactly what I want. so I thought let is to define new
> temporary varibbales, but in this case you use that to set a value
> temporary? so it goes back to its default nil?
>
> thats neat. so basicly you overwrite the buffer wide variable with a
> let-scope wide, and after it it falls back to the buffer-wide?

Yes, you can say so.  Variables defined with `defvar' are always
dynamical, and you can `let'-bind them to steer how functions behave or
what they return, even when the variable does not appear in your code
textually.

> Still some more example code especialy for special mode would help,
> pointing to other modes as example can be problematic, especialy for
> elisp noobs that are not so good in understanding the code.

Writing and maintaining documentation is very work intensive, not every
question is covered.  The things you do are not so noob... and the elisp
source code of Emacs is an excellent source of nice real-life examples.
No doubt, there is a lot to learn, but maybe more help text would not
even be better than learning to read the sources, use the debugger etc
as early as possible, even if this is harder at the beginning.


Regards,

Michael.



reply via email to

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