unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Tips to suppress compilation warnings
@ 2005-05-25 23:50 Bill Wohler
  0 siblings, 0 replies; 6+ messages in thread
From: Bill Wohler @ 2005-05-25 23:50 UTC (permalink / raw)
  Cc: mh-e-devel

I'm seeing the following compiler warning:

  mh-customize.el:2462:1:Warning: the function `Info-goto-node' might not be
      defined at runtime.

Line 2462 is the last line.

Here is the function that yields the warning:

  (defun mh-tool-bar-letter-help ()
    "Visit \"(mh-e)Draft Editing\"."
    (interactive)
    (Info-goto-node "(mh-e)Draft Editing")
    (delete-other-windows))

However, I have this near the top of the file:

  (autoload 'Info-goto-node "info")

I don't see this warning under Emacs 21.4.

What is needed under CVS Emacs to fix this warning? (Besides (require
'info) which seems like an awfully big stick.)

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.

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

* Re: Tips to suppress compilation warnings
       [not found] <87psve50hh.fsf@olgas.newt.com>
@ 2005-05-26 14:54 ` Richard Stallman
  2005-05-26 17:08   ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2005-05-26 14:54 UTC (permalink / raw)
  Cc: emacs-devel, mh-e-devel

      mh-customize.el:2462:1:Warning: the function `Info-goto-node' might not be
	  defined at runtime.

    However, I have this near the top of the file:

      (autoload 'Info-goto-node "info")

It seems to me that this is a compiler bug.  That call to autoload,
being in this file, should prevent the warning.

However, if Info-goto-node is a useful thing to use from outside Info,
perhaps it should be defined as autoloaded in info.el rather than in mh-e.


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005

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

* Re: Tips to suppress compilation warnings
  2005-05-26 14:54 ` Tips to suppress compilation warnings Richard Stallman
@ 2005-05-26 17:08   ` Stefan Monnier
  2005-05-27  1:08     ` Bill Wohler
  2005-05-27  4:46     ` Jay Belanger
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2005-05-26 17:08 UTC (permalink / raw)
  Cc: Bill Wohler, mh-e-devel, emacs-devel

> However, if Info-goto-node is a useful thing to use from outside Info,
> perhaps it should be defined as autoloaded in info.el rather than in mh-e.

No.  Elisp packages that want to invoke info this way should use the `info'
function, which can be called just the same: (info "(mh-e)Draft Editing").


        Stefan


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005

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

* Re: Tips to suppress compilation warnings
  2005-05-26 17:08   ` Stefan Monnier
@ 2005-05-27  1:08     ` Bill Wohler
  2005-05-27  4:46     ` Jay Belanger
  1 sibling, 0 replies; 6+ messages in thread
From: Bill Wohler @ 2005-05-27  1:08 UTC (permalink / raw)
  Cc: mh-e-devel

Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > However, if Info-goto-node is a useful thing to use from outside Info,
> > perhaps it should be defined as autoloaded in info.el rather than in mh-e.
> 
> No.  Elisp packages that want to invoke info this way should use the `info'
> function, which can be called just the same: (info "(mh-e)Draft Editing").

Stefan,

Thanks very much. Replacing Info-goto-node with info did the trick!

I used this information to solve the following in a similar fashion:

  mh-seq.el:1719:1:Warning: the function `view-mode' might not be defined at
      runtime.

RFTM revealed that we should be using view-mode-enter instead.

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005

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

* Re: Tips to suppress compilation warnings
  2005-05-26 17:08   ` Stefan Monnier
  2005-05-27  1:08     ` Bill Wohler
@ 2005-05-27  4:46     ` Jay Belanger
  2005-05-27  9:57       ` Juri Linkov
  1 sibling, 1 reply; 6+ messages in thread
From: Jay Belanger @ 2005-05-27  4:46 UTC (permalink / raw)
  Cc: belanger


Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> However, if Info-goto-node is a useful thing to use from outside Info,
>> perhaps it should be defined as autoloaded in info.el rather than in mh-e.
>
> No.  Elisp packages that want to invoke info this way should use the `info'
> function, which can be called just the same: (info "(mh-e)Draft Editing").

Info-goto-node is already autoloaded in info.el.
(This looks recent.)

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

* Re: Tips to suppress compilation warnings
  2005-05-27  4:46     ` Jay Belanger
@ 2005-05-27  9:57       ` Juri Linkov
  0 siblings, 0 replies; 6+ messages in thread
From: Juri Linkov @ 2005-05-27  9:57 UTC (permalink / raw)
  Cc: emacs-devel

>>> However, if Info-goto-node is a useful thing to use from outside Info,
>>> perhaps it should be defined as autoloaded in info.el rather than in mh-e.
>>
>> No.  Elisp packages that want to invoke info this way should use the `info'
>> function, which can be called just the same: (info "(mh-e)Draft Editing").
>
> Info-goto-node is already autoloaded in info.el.

I wonder why there is the warning in mh-customize.el if Info-goto-node
currently has an autoload cookie in info.el?

> (This looks recent.)

autoload for Info-goto-node was added in info.el to avoid errors in
packages that don't call (require info) and don't autoload Info-goto-node
before calling Info-goto-node.

If `info' is the preferred method instead of `Info-goto-node',
autoload could be removed from info.el after replacing `Info-goto-node'
with `info' in all places in Emacs source code and mentioning the preferred
method in the NEWS file and Info documentation.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

end of thread, other threads:[~2005-05-27  9:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87psve50hh.fsf@olgas.newt.com>
2005-05-26 14:54 ` Tips to suppress compilation warnings Richard Stallman
2005-05-26 17:08   ` Stefan Monnier
2005-05-27  1:08     ` Bill Wohler
2005-05-27  4:46     ` Jay Belanger
2005-05-27  9:57       ` Juri Linkov
2005-05-25 23:50 Bill Wohler

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).