Re: debian-startup.el question
Miles,
Actually, I pasted in the old stuff in my reply. Sorry. I knew I had
changed it, but I had done that at work, and not on my home system (I'm now
using the Debian package, so that's why everything worked). Here's
what really works:
(cond
((equal emacs-major-version '21)
(add-to-list 'load-path "/usr/share/emacs/site-lisp/")
(defconst debian-emacs-flavor 'emacs
"A symbol representing the particular debian flavor of emacs that's
running. Something like 'emacs20, 'xemacs20, etc.")
(load "debian-startup")
(debian-startup 'emacs)))
> > - I'm using (debian-startup 'emacs) and not (debian-startup 'emacs21)
>
> Since `debian-startup' adds "/etc/emacs/site-start.d" itself, the
> effect of using `emacs' instead of `emacs21' seems to be that it won't
> see emacs21-specific packages, which is wrong, since I'm in fact using
> emacs 21.
But there no byte-compilations for emacs21, so what's the point of trying
to add them?
> > > certainly above doesn't seem to address the problem I noted (the
> > > wierd-ass use of `if').
> >
> > http://bugs.debian.org/116126
>
> That's an entirely different bug.
Yes it is. Sorry. I misunderstood.
> The problem is this code (from /usr/share/emacs/site-lisp/debian-startup.el):
>
> (defun debian-startup (flavor)
> (if (not (boundp 'debian-emacs-flavor))
> (defconst debian-emacs-flavor flavor
> "A symbol representing the particular debian flavor of emacs that's
> running. Something like 'emacs20, 'xemacs20, etc.")
>
> (let ((common-dir "/etc/emacs/site-start.d")
> (flavor-dir (concat "/etc/" (symbol-name flavor) "/site-start.d")
> ))
> (debian-run-directories flavor-dir common-dir))))
>
> If you call `debian-startup' once, it will call defconst to define
> `debian-emacs-flavor', but it _won't_ call `debian-run-directories', so
> nothing actually gets initialized. To get it to intialize things
> properly, I have to call `debian-startup' twice (the second time, it
> will see that `debian-emacs-flavor' is defined, and execute the rest of
> the `if').
Which is why I define the defconst before loading it.
I don't understand why the setup is like this either.
Peter
Reply to: