unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Autoloading (was: bug#5752: 23.1.94; sgml-lexical-context in post-command-hook)
       [not found] ` <qtys7wyoi.fsf@fencepost.gnu.org>
@ 2010-03-23 14:29   ` Stefan Monnier
  2010-03-24  3:38     ` Autoloading Glenn Morris
  2010-07-08 17:41     ` Autoloading (was: bug#5752: 23.1.94; sgml-lexical-context in post-command-hook) Agustin Martin
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Monnier @ 2010-03-23 14:29 UTC (permalink / raw)
  To: emacs-devel

> Fixed in emacs-23 branch by autoloading sgml-lexical-context in
> flyspell.el.

BTW, such manual autoloads are slightly problematic since they fail to
provide docstrings (and arglists).

I'm not sure how best to resolve such issues, but one solution I've been
considering (for quite a while yet, but have never found time to dig
into it) is to introduce a new form (require-autoload <feature>) which
would behave as follows:
- when interpreting, it's just a require (we can't do much better).
- when compiling, it causes the package to be loaded at compile time but
  in the .elc it's replaced by a bunch of autoloads (computed by the
  byte-compiler based on the intersection of the set of functions
  defined by <feature> and the set of functions called from the .elc
  file).


-- Stefan




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

* Re: Autoloading
  2010-03-23 14:29   ` Autoloading (was: bug#5752: 23.1.94; sgml-lexical-context in post-command-hook) Stefan Monnier
@ 2010-03-24  3:38     ` Glenn Morris
  2010-03-24  3:41       ` Autoloading Stefan Monnier
  2010-07-08 17:41     ` Autoloading (was: bug#5752: 23.1.94; sgml-lexical-context in post-command-hook) Agustin Martin
  1 sibling, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2010-03-24  3:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:

> BTW, such manual autoloads are slightly problematic since they fail to
> provide docstrings (and arglists).
>
> I'm not sure how best to resolve such issues

I suggest compilation warnings.




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

* Re: Autoloading
  2010-03-24  3:38     ` Autoloading Glenn Morris
@ 2010-03-24  3:41       ` Stefan Monnier
  2010-03-24  3:56         ` Autoloading Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2010-03-24  3:41 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

>> BTW, such manual autoloads are slightly problematic since they fail to
>> provide docstrings (and arglists).
>> 
>> I'm not sure how best to resolve such issues

> I suggest compilation warnings.

What kinds of wanrings?  You mean the byte-compiler should compare the
docstring and arglist from the (manual) autoload statement to the
docstring and arglist from the package?


        Stefan




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

* Re: Autoloading
  2010-03-24  3:41       ` Autoloading Stefan Monnier
@ 2010-03-24  3:56         ` Glenn Morris
  0 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2010-03-24  3:56 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:

>>> BTW, such manual autoloads are slightly problematic since they fail to
>>> provide docstrings (and arglists).
>>> 
>>> I'm not sure how best to resolve such issues
>
>> I suggest compilation warnings.
>
> What kinds of wanrings? 

The kind that make an-obviously-not-very-funny-joke... ;)




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

* Re: Autoloading (was: bug#5752: 23.1.94; sgml-lexical-context in  post-command-hook)
  2010-03-23 14:29   ` Autoloading (was: bug#5752: 23.1.94; sgml-lexical-context in post-command-hook) Stefan Monnier
  2010-03-24  3:38     ` Autoloading Glenn Morris
@ 2010-07-08 17:41     ` Agustin Martin
  1 sibling, 0 replies; 5+ messages in thread
From: Agustin Martin @ 2010-07-08 17:41 UTC (permalink / raw)
  To: emacs-devel

2010/3/23 Stefan Monnier <monnier@iro.umontreal.ca>:
>> Fixed in emacs-23 branch by autoloading sgml-lexical-context in
>> flyspell.el.
>
> BTW, such manual autoloads are slightly problematic since they fail to
> provide docstrings (and arglists).

I am seeing an obscure problem with sgml-lexical-context  and Debian
emacs-snapshot, when used together with psgml as preferred sgml mode.
psgml provides 'sgml-mode, but has no `sgml-lexical-context'
definition. Either if I manually load 'sgml-mode' or trust autoload at
some points I get errors like.

Error in post-command-hook: (wrong-type-argument stringp nil)
sgml-lexical-context: Wrong type argument: stringp, nil

Function seems loaded since describe-function sgml-lexical-context
works, and I can even explicitly evaluate it in the buffer (and seems
to evaluate correctly).

Cheers,



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

end of thread, other threads:[~2010-07-08 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20100322113620.2500673506.qww314159@motoko.argon.local>
     [not found] ` <qtys7wyoi.fsf@fencepost.gnu.org>
2010-03-23 14:29   ` Autoloading (was: bug#5752: 23.1.94; sgml-lexical-context in post-command-hook) Stefan Monnier
2010-03-24  3:38     ` Autoloading Glenn Morris
2010-03-24  3:41       ` Autoloading Stefan Monnier
2010-03-24  3:56         ` Autoloading Glenn Morris
2010-07-08 17:41     ` Autoloading (was: bug#5752: 23.1.94; sgml-lexical-context in post-command-hook) Agustin Martin

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