1

Here's a sample of the code that I have:

(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")))

With lexical-binding in the current file, I get Warning: Unused lexical argument e warning, although I'm clearly using e. Is this a bug or a misunderstanding on my part? And how could I avoid this warning?

3
  • 3
    Looks like a bug to me.
    – wvxvw
    Mar 16, 2015 at 15:46
  • 1
    Looks like a bug to me too.
    – Drew
    Mar 16, 2015 at 17:05
  • 1
    Alright, I'll submit the bug.
    – abo-abo
    Mar 16, 2015 at 18:44

1 Answer 1

1

This is related to bug #15103, as is now fixed in 25.1.

Earlier Emacs versions can do this to silence the warning:

(setq byte-compile--use-old-handlers nil)
1
  • 1
    Not all earlier versions, just 24.4, IIRC.
    – Dmitry
    Mar 16, 2015 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.