all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: suvayu ali <fatkasuvayu+linux@gmail.com>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Generating autoloads for libraries in contrib
Date: Tue, 26 Jul 2011 23:32:57 +0530	[thread overview]
Message-ID: <81d3gw6hta.fsf@gmail.com> (raw)
In-Reply-To: <CAMXnza3k1v6eKSMSf8bXA4-6TXLwRyYHbWR9Q+G0NhYLY7qe3A@mail.gmail.com> (suvayu ali's message of "Tue, 26 Jul 2011 15:12:52 +0200")

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> Hi,
>
> Does anyone know how to generate autoloads for libraries in the
> contrib directory? I was hoping generating autoloads would let me
> remove some of the (require 'library) from my setup.

(To satisfy my own curiosity)

IIRC, Achim has added support for the above. I am unable to find the
link right now.

The below snippet is stolen from Makefile and adopted for interactive
use. If you call the below command from the rootdir of installation, it
would create an autoload file in
contrib/lisp/org-contrib-install.el. 

Note: Finding out the right paths is left as an exercise to the reader.

--8<---------------cut here---------------start------------->8---
(defun my-org-contrib-autoloads ()
  (interactive)

  (unless (featurep 'autoload)
    (require 'autoload))

  (let ((file "contrib/lisp/org-contrib-install.el"))
    (with-current-buffer (find-file-noselect file)
      (when (equal (point-min) (point-max))
	(save-excursion (insert "\n(provide 'org-contrib-install)\n")))
      (goto-char (point-min))
      (call-interactively 'generate-file-autoloads)      
      (save-buffer)
      (kill-buffer))))
--8<---------------cut here---------------end--------------->8---

or 

If you look at the above org-contrib-install.el file it simply calls

(autoload ...) 

for the autoloaded things.

So if you often invoke a certain library through just a single command
then you can simply add the (autoload ...) for just that command to
.emacs.

>
> Thanks,

-- 

  reply	other threads:[~2011-07-26 18:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26 13:12 Generating autoloads for libraries in contrib suvayu ali
2011-07-26 18:02 ` Jambunathan K [this message]
2011-07-26 18:15   ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81d3gw6hta.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fatkasuvayu+linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.