[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: emacsen-common: install/package and add-on



   Still, being an elisp layman, I ran into the following problem: As I  
   understand the proposed policy, a package foo should install its files  
   into site-lisp/foo/. Now in a generic site-start file for that  
   package (e.g. /etc/emacs/site-start.d/50foo.el), how do I augment my  
   load-path correctly to take care of the flavor ?

   Would something along the lines of this work ?

   (setq load-path
       (cons
	   (concat "/usr/share/" (symbol-name flavor) "/site-lisp/foo")
	     load-path))

   work ?

A lot of e-lisp packages (i.e., w3, calc, at least) automatically add
themselves to the load path when they are autoloaded.

I didn't know that the flavor was declared as a variable.  Not knowing
this, I came up with the following solution for the bbdb package: Put
(require 'bbdb/load-path) in the 50bbdb.el file; and have the package
install script create a file bbdb/load-path.el file that has the
following in it:

(setq load-path (nconc load-path (list "${elc_dir}")))
(provide 'bbdb/load-path)

where ${elc_dir} gets substituted by the install script.

However, if it works, your solution is more elegant.


--
E-mail the word "unsubscribe" to debian-devel-request@lists.debian.org
TO UNSUBSCRIBE FROM THIS MAILING LIST. Trouble?  E-mail to listmaster@debian.org .


Reply to: