* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info):
When a clause's body consists of a single constant expression, use
that expression as the body to be compiled. This fixes switch bytecode
evaluating to nil to such clauses.
;; discard duplicate clauses
(not (assq obj2 cases)))
(push (list (if (consp obj2) (eval obj2) obj2) body) cases)
- (if (eq condition t)
- (progn (push (list 'default body) cases)
+ (if (and (macroexp-const-p condition) condition)
+ (progn (push (list 'default (or body `(,condition))) cases)
(throw 'break t))
(setq ok nil)
(throw 'break nil))))))