* lisp/subr.el (set-transient-map): Don't wait if MAP not present in
overriding-terminal-local-map. (Bug#24149)
(with-demoted-errors "set-transient-map PCH: %S"
(unless (cond
((null keep-pred) nil)
- ((not (eq map (cadr overriding-terminal-local-map)))
+ ((and (not (eq map (cadr overriding-terminal-local-map)))
+ (memq map (cddr overriding-terminal-local-map)))
;; There's presumably some other transient-map in
;; effect. Wait for that one to terminate before we
;; remove ourselves.