GNU bug report logs - #20123
24.4.91; Unwarranted "Unused lexical argument" for condition-case

Previous Next

Package: emacs;

Reported by: Oleh Krehel <ohwoeowho <at> gmail.com>

Date: Mon, 16 Mar 2015 18:48:01 UTC

Severity: minor

Merged with 15103

Found in versions 24.3.50, 24.4.91

Fixed in version 25.1

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20123 in the body.
You can then email your comments to 20123 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#20123; Package emacs. (Mon, 16 Mar 2015 18:48:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleh Krehel <ohwoeowho <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 16 Mar 2015 18:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.91; Unwarranted "Unused lexical argument" for condition-case
Date: Mon, 16 Mar 2015 19:42:39 +0100
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20123; Package emacs. (Mon, 16 Mar 2015 18:58:01 GMT) Full text and rfc822 format available.

Message #8 received at 20123 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Oleh Krehel <ohwoeowho <at> gmail.com>
Cc: 20123 <at> debbugs.gnu.org
Subject: Re: bug#20123: 24.4.91;
 Unwarranted "Unused lexical argument" for condition-case
Date: Mon, 16 Mar 2015 14:57:12 -0400
Dupe of http://debbugs.gnu.org/15103




Forcibly Merged 15103 20123. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 16 Mar 2015 18:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20123; Package emacs. (Mon, 16 Mar 2015 19:10:01 GMT) Full text and rfc822 format available.

Message #13 received at 20123 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Oleh Krehel <ohwoeowho <at> gmail.com>
Cc: 20123 <at> debbugs.gnu.org
Subject: Re: bug#20123: 24.4.91;
 Unwarranted "Unused lexical argument" for condition-case
Date: Mon, 16 Mar 2015 15:09:13 -0400
> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20123; Package emacs. (Mon, 16 Mar 2015 19:16:01 GMT) Full text and rfc822 format available.

Message #16 received at 20123 <at> debbugs.gnu.org (full text, mbox):

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 20123 <at> debbugs.gnu.org
Subject: Re: bug#20123: 24.4.91;
 Unwarranted "Unused lexical argument" for condition-case
Date: Mon, 16 Mar 2015 20:15:07 +0100
Hi Stefan,

On Mon, Mar 16, 2015 at 8:09 PM, Stefan Monnier
<monnier <at> 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




Reply sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
You have taken responsibility. (Mon, 16 Mar 2015 20:23:03 GMT) Full text and rfc822 format available.

Notification sent to Oleh Krehel <ohwoeowho <at> gmail.com>:
bug acknowledged by developer. (Mon, 16 Mar 2015 20:23:03 GMT) Full text and rfc822 format available.

Message #21 received at 20123-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Oleh Krehel <ohwoeowho <at> gmail.com>
Cc: 20123-done <at> debbugs.gnu.org
Subject: Re: bug#20123: 24.4.91;
 Unwarranted "Unused lexical argument" for condition-case
Date: Mon, 16 Mar 2015 16:22:12 -0400
Version: 25.1

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

Thanks,


        Stefan




Reply sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
You have taken responsibility. (Mon, 16 Mar 2015 20:23:04 GMT) Full text and rfc822 format available.

Notification sent to Michael Albinus <michael.albinus <at> gmx.de>:
bug acknowledged by developer. (Mon, 16 Mar 2015 20:23:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 14 Apr 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.