all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* subdirs works for emacs but fails for me -- why?
@ 2009-10-15 17:54 rustom
  2009-10-20 23:45 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: rustom @ 2009-10-15 17:54 UTC (permalink / raw
  To: help-gnu-emacs

Can someone explain the subdirs.el mechanism?

A subdirs.el in the load-path typically has the magic mantra

(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
    (normal-top-level-add-subdirs-to-load-path))

When emacs finds such a file it adds the subdirs to the load-path
If I put a similar file in my load-path it does not do any good.

Also why the fboundp stuff? And not just a simple call

(normal-top-level-add-subdirs-to-load-path)


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

* Re: subdirs works for emacs but fails for me -- why?
  2009-10-15 17:54 subdirs works for emacs but fails for me -- why? rustom
@ 2009-10-20 23:45 ` Glenn Morris
  2009-10-21  4:13   ` Kevin Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2009-10-20 23:45 UTC (permalink / raw
  To: help-gnu-emacs

rustom wrote:

> When emacs finds such a file it adds the subdirs to the load-path
> If I put a similar file in my load-path it does not do any good.

subdirs.el is an internal mechanism that by design only works for
"standard" Emacs directories, not any that you might happen to add to
load-path (eg in .emacs).

> Also why the fboundp stuff?

Perhaps for compatibility for Emacs versions without this function, eg
if they happen to share site-lisp directories.


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

* Re: subdirs works for emacs but fails for me -- why?
  2009-10-20 23:45 ` Glenn Morris
@ 2009-10-21  4:13   ` Kevin Rodgers
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2009-10-21  4:13 UTC (permalink / raw
  To: help-gnu-emacs

Glenn Morris wrote:
> rustom wrote:
> 
>> When emacs finds such a file it adds the subdirs to the load-path
>> If I put a similar file in my load-path it does not do any good.
> 
> subdirs.el is an internal mechanism that by design only works for
> "standard" Emacs directories, not any that you might happen to add to
> load-path (eg in .emacs).

But if one initializes load-path via the EMACSLOADPATH environment variable,
it looks like the subdirs.el trick will work.

>> Also why the fboundp stuff?
> 
> Perhaps for compatibility for Emacs versions without this function, eg
> if they happen to share site-lisp directories.

-- 
Kevin Rodgers
Denver, Colorado, USA





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

end of thread, other threads:[~2009-10-21  4:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-15 17:54 subdirs works for emacs but fails for me -- why? rustom
2009-10-20 23:45 ` Glenn Morris
2009-10-21  4:13   ` Kevin Rodgers

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.