Why do elisp files usually end with ;;; file.el ends here?

Is there some historical reason why this was useful? I've seen it recommended in elisp style guides and I still see it in modern elisp packages. auto-insert-mode also adds such a comment to new elisp files by default.

1 Answer 1


From the Emacs Documentation:

‘;;; filename ends here’

This is the footer line; it appears at the very end of the file. Its purpose is to enable people to detect truncated versions of the file from the lack of a footer line.

  • 1
    Is there anything beyond that? It seems like a pretty weak reason.
    – Qudit
    Commented May 4, 2015 at 5:52
  • 7
    @Qudit Today, maybe so. I think it is a testament to the age of emacs.
    – Atsby
    Commented May 4, 2015 at 8:22
  • 3
    Nowadays it is essentially tradition, but back before reliable / always available internet connectivity it made a lot more sense. It also stems from the fact that elisp packages are generally shared as source files rather than some sort of binary that can easily be determined to be incomplete/corrupt.
    – glucas
    Commented May 4, 2015 at 13:55
  • 4
    @Qudit, also, people would share elisp code via email, and Emacs predates MIME, so there were no email attachments. You just pasted the code into the email message. It was useful to have a marker for the end of the elisp file.
    – cjm
    Commented May 4, 2015 at 18:13
  • What about "<filename> ends soon"?
    – mgalgs
    Commented Jul 11, 2015 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.