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

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

RE: RE: Removing line and column number settings from some buffers


From: Drew Adams
Subject: RE: RE: Removing line and column number settings from some buffers
Date: Sat, 5 Dec 2020 15:37:32 -0800 (PST)

> > > Look at this code.  Correct, you don't need a variable for storing,
> > > but what is happening with n in the following code.
> > >
> > > The byte compiler complains about the variable n
> > >
> > > (defun auto-fill-cycle ()
> > >    (interactive)
> > >    (setq-local n (get 'auto-fill-cycle 'state))...)
> >
> > `n' is a free variable.  Add a `defvar' for it, if you
> > don't want Emacs to tell you about that.
> 
> Would that be a valid approach or is it just to stop emacs complaining?

Valid.  The variable is free in your function.

> Was considering to use (let (n) ...

Where are you going to put your `let'?

You want the value to persist beyond an invocation of
your function, right?



reply via email to

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