Menu

#4 Feature is provided prematurely

Emacs
closed-fixed
nobody
5
2015-03-04
2013-01-27
No

First of all, thanks for a tremendously useful library!

I recently experienced an issue trying to integrate other code with it.

It is conventional to "provide" your library at the end of its definition, but "session.el" incorrectly provides the feature at the beginning of the file.

It is therefore not possible to use "eval-after-load" to hook into the loading of "session" because (at least in Emacs 23.3 and earlier) when the hook code runs at the time "provide" is called, at which point the "session" variables and functions are not yet defined.

Might I please request that the "provide" statement be moved to the end of the file, just before the ";;; session.el ends here" line? This would bring the file into line with library guidelines.

Best wishes, and thanks in advance!

-Steve

Discussion

  • Christoph Wedler

    • labels: Initialization & Exit --> Initialization & Exit, 2.4a
    • status: open --> open-accepted
    • Group: --> Emacs
     
  • Christoph Wedler

    Thanks Steve.
    The first real reason I read why provide should be at the end (although it is more a problem of eval-after-load which seems to be fixed with 24.4). Should work with (eval-after-load "session" ...) instead (eval-after-load 'session ...) even with Emacs below 24.4.
    I upload a new version anyway...

    • Christoph
     

    Last edit: Christoph Wedler 2015-03-04
  • Christoph Wedler

    • status: open-accepted --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.