unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 42777@debbugs.gnu.org, Stefan Kangas <stefan@marxist.se>
Subject: bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET
Date: Sun, 30 Aug 2020 15:23:13 +0100	[thread overview]
Message-ID: <87d038i566.fsf@gmail.com> (raw)
In-Reply-To: <87k0xgs0ay.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 30 Aug 2020 15:58:13 +0200")

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Suppress-ElDoc-compiler-warnings-in-lisp-cedet-seman.patch --]
[-- Type: text/x-diff, Size: 1703 bytes --]

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


  parent reply	other threads:[~2020-08-30 14:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-09 15:23 bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET Lars Ingebrigtsen
2020-08-28 17:55 ` Stefan Kangas
2020-08-28 22:32   ` João Távora
2020-08-30 13:46     ` Lars Ingebrigtsen
2020-08-30 13:54       ` João Távora
2020-08-30 13:58         ` Lars Ingebrigtsen
2020-08-30 14:10           ` João Távora
2020-08-30 14:23           ` João Távora [this message]
2020-08-30 14:56             ` Stefan Kangas
2020-08-30 15:46             ` Lars Ingebrigtsen
2020-08-30 16:00               ` João Távora
2020-08-30 16:01                 ` Lars Ingebrigtsen
2020-08-30 19:22                   ` João Távora
2020-09-01 14:14                     ` Lars Ingebrigtsen
2020-09-01 18:22                       ` João Távora
2020-09-01 18:57                         ` Stefan Kangas
2020-09-01 23:43                           ` João Távora
2020-09-02 13:38                             ` Lars Ingebrigtsen
2020-09-02 18:46                               ` João Távora
2020-09-04  2:23                                 ` Lars Ingebrigtsen
2021-07-06 15:21                                   ` Lars Ingebrigtsen
2020-08-30 14:27           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d038i566.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=42777@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).