From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#42777: 28.0.50; Obsolete eldoc-message function used in CEDET Date: Sun, 30 Aug 2020 15:23:13 +0100 Message-ID: <87d038i566.fsf@gmail.com> References: <874kpbetd6.fsf@gnus.org> <87sgc69zaz.fsf@gmail.com> <87wo1gs0tw.fsf@gnus.org> <87k0xgs0ay.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31483"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 42777@debbugs.gnu.org, Stefan Kangas To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 30 16:31:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCOMR-00086N-RU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Aug 2020 16:31:11 +0200 Original-Received: from localhost ([::1]:46492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCOMQ-0004ph-Sp for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Aug 2020 10:31:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCOMK-0004pT-BD for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2020 10:31:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38934) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCOMH-0007NW-Tm for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2020 10:31:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kCOMH-0004N2-Q5 for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2020 10:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Aug 2020 14:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42777 X-GNU-PR-Package: emacs Original-Received: via spool by 42777-submit@debbugs.gnu.org id=B42777.159879785816790 (code B ref 42777); Sun, 30 Aug 2020 14:31:01 +0000 Original-Received: (at 42777) by debbugs.gnu.org; 30 Aug 2020 14:30:58 +0000 Original-Received: from localhost ([127.0.0.1]:50480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCOME-0004Mk-Jw for submit@debbugs.gnu.org; Sun, 30 Aug 2020 10:30:58 -0400 Original-Received: from mail-wm1-f42.google.com ([209.85.128.42]:53551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCOMC-0004MU-AQ for 42777@debbugs.gnu.org; Sun, 30 Aug 2020 10:30:56 -0400 Original-Received: by mail-wm1-f42.google.com with SMTP id u18so3133953wmc.3 for <42777@debbugs.gnu.org>; Sun, 30 Aug 2020 07:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rlI3zWqSjT5WOkbgZNA2pQaGp3xtlpORjSDcvTaw3n4=; b=R+5eNlifr72IkHM5mvemRj2D+F3y/oAgfKJXZWe+3amU8qgrWE1m56H0Kezp1/5Lw0 rk29L2/J25Kh/sJDyRpniJ63snN7cgHOvHfJilObCGuuecyV2EGeXrhhCZtKFa0eoPw7 mHgRaxD8TCDLvN+H/7+XV+c16IJzqjgbVol8MKqUP8yCv0SqEfdWgOcEa7QaW7SgG49Z mvL3oV+eYrABZT48oyNmC3Bq4AdqKuiy3xtwHnGVjoxsY9kCRKdNeb3tUWNpv+D1ok2Z lA2wWRnl1IAHCxXNFPHMRXRVUc/brwyoJ4LPM9BJeYJEXB9xomQ5/1Cb+g0gK7JnajOm qXOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=rlI3zWqSjT5WOkbgZNA2pQaGp3xtlpORjSDcvTaw3n4=; b=rwO5fAS0NwzJDTqbNOaeZdGh2fOo6s0gwjKMLUEhq/NmgQC+xJnZ/fo/R0naBUFRAg eIFjk5uMssflxynEN/rGaci/TL/5jzTbK4kejslJ5scesYb1g8H/XDttoAgrj7UoL0DG 1KiyM8XvInDz/JOeH1ZfrTDzTLqYiSyNW/TkjW/J7YIb/KoFoeD/S7OpsrQW1oxClv5G cUptmTwF+uB28Uc3kTZt6tO5ZDsWyFQtUlqQFk/oOpC7AUr+uM2nyrZlHVcSQp94aiuh rFO2zkZlaAjuXxGL4dM+mNwZuLKPaKgbNfhv8KPgA92gir5EY6ZTzfL0PQNLb7faH3A2 s8wA== X-Gm-Message-State: AOAM5320kfBGA4WL3NZexOYK5mXqIAe37Tc8FXuVHMaJD99EuaB+Km2h tuWZXsXCkCz3S5m353HyBFtfF1nwvfy0Uw== X-Google-Smtp-Source: ABdhPJzUk78669bOC0EhNcpQG0gy2tuO61aJghEPrIfaMXESS8N1n+CwRORRNEv+WDiriyakzZ9Y0w== X-Received: by 2002:a1c:b60b:: with SMTP id g11mr4178940wmf.48.1598797396289; Sun, 30 Aug 2020 07:23:16 -0700 (PDT) Original-Received: from krug ([89.180.151.132]) by smtp.gmail.com with ESMTPSA id h8sm7566249wrw.68.2020.08.30.07.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Aug 2020 07:23:15 -0700 (PDT) In-Reply-To: <87k0xgs0ay.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 30 Aug 2020 15:58:13 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186699 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lars Ingebrigtsen writes: >> This is odd because I did get a line from Eli to fix some compilation=20 >> 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=C3=A3o --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Suppress-ElDoc-compiler-warnings-in-lisp-cedet-seman.patch >From 2d951fbe6d5af21c839e2ff7ab89aeabff945621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= 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 --=-=-=--