all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#44651: [PATCH] Silence byte-compiler warning
@ 2020-11-15  2:39 Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-11-16 22:46 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-11-15  2:39 UTC (permalink / raw)
  To: 44651

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

See attached.

-- 
Sent with https://mailfence.com
Secure and private email

[-- Attachment #2: File Attachment: 0001-Silence-byte-compiler-warning.patch --]
[-- Type: text/x-diff, Size: 767 bytes --]

From a958f4a95cd4e16a14c371e1046cbc5cd81a63fb Mon Sep 17 00:00:00 2001
From: Brian Leung <leungbk@mailfence.com>
Date: Sat, 14 Nov 2020 18:36:09 -0800
Subject: [PATCH] ; Silence byte-compiler warning

* lisp/woman.el: Declare imenu-add-to-menubar.
---
 lisp/woman.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/woman.el b/lisp/woman.el
index 96ae7fe579..ebc679a8fc 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1914,6 +1914,8 @@ woman-mode
   (let ((inhibit-read-only t))
     (Man-highlight-references 'WoMan-xref-man-page)))
 
+(declare-function imenu-add-to-menubar "imenu")
+
 (defun woman-imenu (&optional redraw)
   "Add a \"Contents\" menu to the menubar.
 Optional argument REDRAW, if non-nil, forces mode line to be updated."
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#44651: [PATCH] Silence byte-compiler warning
  2020-11-15  2:39 bug#44651: [PATCH] Silence byte-compiler warning Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-11-16 22:46 ` Lars Ingebrigtsen
  2020-11-16 23:52   ` Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-16 22:46 UTC (permalink / raw)
  To: Brian Leung; +Cc: 44651

Brian Leung <leungbk@mailfence.com> writes:

> See attached.

[...]

> * lisp/woman.el: Declare imenu-add-to-menubar.

I don't think that should be necessary?  The function in question is
autoloaded:

;;;###autoload
(defun imenu-add-to-menubar (name)

Where/when do you see this compilation warning?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#44651: [PATCH] Silence byte-compiler warning
  2020-11-16 22:46 ` Lars Ingebrigtsen
@ 2020-11-16 23:52   ` Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-11-17  0:58     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-11-16 23:52 UTC (permalink / raw)
  To: Lars Ingebrigtsen, akrl; +Cc: 44651

> I don't think that should be necessary?  The function in question is
> autoloaded:
> 
> ;;;###autoload
> 
> Where/when do you see this compilation warning?

I noticed this on the feature/native-comp branch, after invoking `helm-man-woman` and having woman.el native-compiled asynchronously. I don't have the log.

I did not notice that it was autoloaded. Andrea, are you aware of any issues that the native-comp branch may have with this kind of thing (autoloaded functions defined in files that do not necessarily get REQUIRE-d)? If not, maybe we can just ignore my patch.

Thanks,
Brian

> ----------------------------------------
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Sent: Mon Nov 16 23:46:05 CET 2020
> To: Brian Leung <leungbk@mailfence.com>
> Cc: <44651@debbugs.gnu.org>
> Subject: Re: bug#44651: [PATCH] Silence byte-compiler warning
> 
> 
> Brian Leung <leungbk@mailfence.com> writes:
> 
> > See attached.
> 
> [...]
> 
> > * lisp/woman.el: Declare imenu-add-to-menubar.
> 
> I don't think that should be necessary?  The function in question is
> autoloaded:
> 
> ;;;###autoload
> (defun imenu-add-to-menubar (name)
> 
> Where/when do you see this compilation warning?
> 
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no


-- 
Sent with https://mailfence.com
Secure and private email





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#44651: [PATCH] Silence byte-compiler warning
  2020-11-16 23:52   ` Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-11-17  0:58     ` Lars Ingebrigtsen
  2020-12-14 17:15       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-17  0:58 UTC (permalink / raw)
  To: Brian Leung; +Cc: 44651, akrl

Brian Leung <leungbk@mailfence.com> writes:

> I did not notice that it was autoloaded. Andrea, are you aware of any
> issues that the native-comp branch may have with this kind of thing
> (autoloaded functions defined in files that do not necessarily get
> REQUIRE-d)? If not, maybe we can just ignore my patch.

I'm getting the same with a number of functions on the native-comp branch:

In end of data:
woman.el:4615:1: Warning: the function ‘imenu-add-to-menubar’ might not be
    defined at runtime.

This function is in lisp/loaddefs.el, though.

Other examples:

In end of data:
calc-units.el:2171:1: Warning: the following functions might not be defined at
    runtime: math-is-multiple, math-simplify, math-to-simple-fraction


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#44651: [PATCH] Silence byte-compiler warning
  2020-11-17  0:58     ` Lars Ingebrigtsen
@ 2020-12-14 17:15       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-14 17:15 UTC (permalink / raw)
  To: Brian Leung; +Cc: 44651, akrl

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I'm getting the same with a number of functions on the native-comp branch:
>
> In end of data:
> woman.el:4615:1: Warning: the function ‘imenu-add-to-menubar’ might not be
>     defined at runtime.

This was fixed recently on the native-comp branch, so I'm closing this
bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-14 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-15  2:39 bug#44651: [PATCH] Silence byte-compiler warning Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-16 22:46 ` Lars Ingebrigtsen
2020-11-16 23:52   ` Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-17  0:58     ` Lars Ingebrigtsen
2020-12-14 17:15       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.