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?

share|improve this question
3  
Looks like a bug to me. – wvxvw Mar 16 '15 at 15:46
1  
Looks like a bug to me too. – Drew Mar 16 '15 at 17:05
1  
Alright, I'll submit the bug. – abo-abo Mar 16 '15 at 18:44
up vote 1 down vote accepted

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)
share|improve this answer
1  
Not all earlier versions, just 24.4, IIRC. – Dmitry Mar 16 '15 at 19:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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