[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET
From: |
João Távora |
Subject: |
bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET |
Date: |
Sun, 30 Aug 2020 15:23:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
>> This is odd because I did get a line from Eli to fix some compilation
>> after my changes, and these were not among them. I wonder if this file
>> is always byte-compiled.
>
> It is, but perhaps Eli didn't do a "make bootstrap" to get all the
> warnings. (The CEDET files don't change that much these days, so
> they're rarely re-compiled.)
Anyway, I just had a look at this. This isn't the normal situation of
an ElDoc user switching from the old "call eldoc-message directly"
protocol to the new callback-based protocol.
Rather, idle.el is mostly a reimplementation of ElDoc itself which uses
a substantial amount of ElDoc internals -- and repeats much of its code.
It is, in my opinion a file to be itself obsoleted. Anyway, the
solution with less risk here is to use with-supressed-warnings, which is
what the attached patch does.
João
>From 2d951fbe6d5af21c839e2ff7ab89aeabff945621 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= <joaotavora@gmail.com>
Date: Sun, 30 Aug 2020 15:19:08 +0100
Subject: [PATCH] Suppress ElDoc compiler warnings in
lisp/cedet/semantic/idle.el
Fixes: bug#42777
* lisp/cedet/semantic/idle.el (semantic-idle-summary-refresh-echo-area)
(semantic-idle-summary-idle-function): Use `with-supressed-warnings`.
---
lisp/cedet/semantic/idle.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 76218249c5..8f58f53b14 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -768,7 +768,10 @@ semantic-idle-summary-idle-function
(when (> strlen ea-width)
(setq str (substring str 0 ea-width)))))
;; Display it
- (eldoc-message str))))
+ ;; FIXME: stop using ElDoc's internals and just use ElDoc.
+ (with-suppressed-warnings
+ ((obsolete eldoc-message))
+ (eldoc-message str)))))
(define-minor-mode semantic-idle-summary-mode
"Toggle Semantic Idle Summary mode.
@@ -799,7 +802,10 @@ semantic-idle-summary-refresh-echo-area
(not (and (boundp 'edebug-active) edebug-active))
(not cursor-in-echo-area)
(not (eq (selected-window) (minibuffer-window))))
- (eldoc-message eldoc-last-message)
+ ;; FIXME: stop using ElDoc's internals and just use ElDoc.
+ (with-suppressed-warnings
+ ((obsolete eldoc-message))
+ (eldoc-message eldoc-last-message))
(setq eldoc-last-message nil))))
(semantic-add-minor-mode 'semantic-idle-summary-mode "")
--
2.25.1
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, Lars Ingebrigtsen, 2020/08/09
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, Stefan Kangas, 2020/08/28
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, João Távora, 2020/08/28
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, Lars Ingebrigtsen, 2020/08/30
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, João Távora, 2020/08/30
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, Lars Ingebrigtsen, 2020/08/30
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, Eli Zaretskii, 2020/08/30
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET,
João Távora <=
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, Stefan Kangas, 2020/08/30
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, Lars Ingebrigtsen, 2020/08/30
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, João Távora, 2020/08/30
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, Lars Ingebrigtsen, 2020/08/30
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, João Távora, 2020/08/30
- bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET, João Távora, 2020/08/30