Package: emacsen-common Version: 1.4.17 Severity: normal Tags: patch File: /usr/share/emacs/site-lisp/debian-startup.el
Firing up "emacs -q" leaves a load-path with the various package additions at the start, whereas I thought the idea of debian-pkg-add-load-path-item was to have them after /usr/local. I think debian-run-directories ends up forcibly moving any additions made by the /etc/emacs/site-start.d files up to the front of the load-path. I get some joy from the change below to have debian-run-directories merely remove the things it wanted temporarily in the load-path (ie. /etc/emacs/site-start.d and /etc/flavour/site-start.d) and leave anything else done by the site-start parts alone. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i586) Kernel: Linux 2.6.22-2-486 Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages emacsen-common depends on: ii bsdmainutils 6.1.9 collection of more utilities from emacsen-common recommends no packages. -- no debconf information
--- debian-startup.el.old 2007-12-07 15:34:55.000000000 +1100 +++ debian-startup.el 2007-12-07 15:37:15.000000000 +1100 @@ -107,14 +107,11 @@ files))) ;; Finally sort them, and delete duplicates - (base-names (debian-unique-strings (sort stripped-names 'string<))) - - (old-load-path load-path)) + (base-names (debian-unique-strings (sort stripped-names 'string<)))) ;; Set a new load path with the directories specified in the ;; proper order, and first. - (let ((new-path (append paths load-path))) - (setq load-path new-path) + (setq load-path (append paths load-path)) ;; Now load the files. "load" will make sure we get the byte ;; compiled one first, if any, and will respect load-path's ;; ordering. @@ -124,16 +121,10 @@ (load file nil) (error (message "Error while loading %s" file)))) base-names) - ;; restore the old load-path -- including any new paths added by - ;; files loaded in directory traversal. - (let ((add-on-package-paths - (delq nil (mapcar - (lambda (item) - (if (not (member item new-path)) - item - nil)) - load-path)))) - (setq load-path (append add-on-package-paths old-load-path)))))) + ;; remove the `paths' we added to load-path -- but leave anything the + ;; files added + (dolist (item paths) + (setq load-path (remq item load-path))))) (defun debian-startup (flavor)