unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20123: 24.4.91; Unwarranted "Unused lexical argument" for condition-case
@ 2015-03-16 18:42 Oleh Krehel
  2015-03-16 18:57 ` Glenn Morris
  2015-03-16 19:09 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Oleh Krehel @ 2015-03-16 18:42 UTC (permalink / raw)
  To: 20123

Hello,

Here's an example code:

    (define-error 'unsupported-mode-error "Unsupported mode")
    (condition-case e
        (if (eq 'a 'a)
            (message "test")
          (signal 'unsupported-mode-error major-mode))
      (unsupported-mode-error
       (signal (car e) (cdr e)))
      (error
       (message "error")))

As you can see, I'm trying to re-throw some of the errors, so the variable `e' is used
inside `condition-case'. But I still get an "Unused lexical argument" warning.

regards,
Oleh





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#20123: 24.4.91; Unwarranted "Unused lexical argument" for condition-case
  2015-03-16 18:42 bug#20123: 24.4.91; Unwarranted "Unused lexical argument" for condition-case Oleh Krehel
@ 2015-03-16 18:57 ` Glenn Morris
  2015-03-16 19:09 ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2015-03-16 18:57 UTC (permalink / raw)
  To: Oleh Krehel; +Cc: 20123


Dupe of http://debbugs.gnu.org/15103





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#20123: 24.4.91; Unwarranted "Unused lexical argument" for condition-case
  2015-03-16 18:42 bug#20123: 24.4.91; Unwarranted "Unused lexical argument" for condition-case Oleh Krehel
  2015-03-16 18:57 ` Glenn Morris
@ 2015-03-16 19:09 ` Stefan Monnier
  2015-03-16 19:15   ` Oleh Krehel
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2015-03-16 19:09 UTC (permalink / raw)
  To: Oleh Krehel; +Cc: 20123

> Hello,
> Here's an example code:

>     (define-error 'unsupported-mode-error "Unsupported mode")
>     (condition-case e
>         (if (eq 'a 'a)
>             (message "test")
>           (signal 'unsupported-mode-error major-mode))
>       (unsupported-mode-error
>        (signal (car e) (cdr e)))
>       (error
>        (message "error")))

> As you can see, I'm trying to re-throw some of the errors, so the variable `e' is used
> inside `condition-case'. But I still get an "Unused lexical argument" warning.

Yes, IIRC this bug was introduced in 24.1.  It should be partially fixed
in 24.4 if you set byte-compile--use-old-handlers to nil.  It should be
fixed in 25.1 where this var defaults to nil.

Can you confirm?


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#20123: 24.4.91; Unwarranted "Unused lexical argument" for condition-case
  2015-03-16 19:09 ` Stefan Monnier
@ 2015-03-16 19:15   ` Oleh Krehel
  2015-03-16 20:22     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Oleh Krehel @ 2015-03-16 19:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 20123

Hi Stefan,

On Mon, Mar 16, 2015 at 8:09 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:

> Yes, IIRC this bug was introduced in 24.1.  It should be partially fixed
> in 24.4 if you set byte-compile--use-old-handlers to nil.  It should be
> fixed in 25.1 where this var defaults to nil.
>
> Can you confirm?

I can confirm that this is fixed in 25.1, thanks. Sorry for the noise.

Oleh





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#20123: 24.4.91; Unwarranted "Unused lexical argument" for condition-case
  2015-03-16 19:15   ` Oleh Krehel
@ 2015-03-16 20:22     ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2015-03-16 20:22 UTC (permalink / raw)
  To: Oleh Krehel; +Cc: 20123-done

Version: 25.1

> I can confirm that this is fixed in 25.1, thanks. Sorry for the noise.

Thanks,


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-16 20:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-16 18:42 bug#20123: 24.4.91; Unwarranted "Unused lexical argument" for condition-case Oleh Krehel
2015-03-16 18:57 ` Glenn Morris
2015-03-16 19:09 ` Stefan Monnier
2015-03-16 19:15   ` Oleh Krehel
2015-03-16 20:22     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).