-(defconst eldoc-eval--old-message-function (and (boundp 'eldoc-message-function)
- eldoc-message-function))
-
-(defun eldoc-display-message-no-interference-p ()
- (let (result)
- (and eldoc-mode
- (not executing-kbd-macro)
- (setq result (not (and (boundp 'edebug-active) edebug-active)))
- (if (and (not eldoc-in-minibuffer-mode)
- ;; If this is non--nil we are in emacs-24.4
- eldoc-eval--old-message-function)
- result
- ;; Having this mode operate in an active minibuffer/echo area causes
- ;; interference with what's going on there.
- (not cursor-in-echo-area)
- (not (eq (selected-window) (minibuffer-window)))))))
+(defconst eldoc-eval--old-message-function
+ (and (boundp 'eldoc-message-function) eldoc-message-function))
+
+(defadvice eldoc-display-message-no-interference-p
+ (after eldoc-eval activate)
+ (when eldoc-in-minibuffer-mode
+ (setq ad-return-value
+ (and ad-return-value
+ ;; Having this mode operate in an active minibuffer/echo area
+ ;; causes interference with what's going on there.
+ (not cursor-in-echo-area)
+ (not (eq (selected-window) (minibuffer-window)))))))