emacs-devel
[Top][All Lists]
Advanced

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

Re: Cleaning up code


From: Stefan Monnier
Subject: Re: Cleaning up code
Date: Thu, 15 Aug 2013 10:37:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> There is also another case where it doesn't work as expected. Often, I
> let bind a variable for side effect, like this:

>       (let ((default-directory (tramp-compat-temporary-file-directory))
>             (outline-regexp tramp-debug-outline-regexp))
>         (outline-mode))

> And I get from the byte compiler

> tramp.el:1400:1:Warning: Unused lexical variable `outline-regexp'

That is a correct warning, telling you that it treated outline-regexp as
a lexical variable and hence that it did not generate the code you want.
IOW you need to add

   (defvar outline-regexp)


-- Stefan



reply via email to

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