From 372b95f3a29afb3ccb05cd808b281a0bbe926d11 Mon Sep 17 00:00:00 2001 From: Kevin Greiner Date: Wed, 3 Mar 2004 04:03:12 +0000 Subject: [PATCH] * dgnushack.el (loaddir): New variable that is bound to the directory containing the dgnushack.el file. Use loaddir, rather than srcdir, to update load-path. Change lets dgnushack compile code in directories other than GNUS/lisp. --- lisp/dgnushack.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 3e8baae57..93b36107b 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -32,6 +32,7 @@ (require 'cl) (defvar srcdir (or (getenv "srcdir") ".")) +(defvar loaddir (and load-file-name (file-name-directory load-file-name))) (defun my-getenv (str) (let ((val (getenv str))) @@ -40,10 +41,10 @@ (if (my-getenv "lispdir") (push (my-getenv "lispdir") load-path)) -(push (or (my-getenv "URLDIR") (expand-file-name "../../url/lisp/" srcdir)) +(push (or (my-getenv "URLDIR") (expand-file-name "../../url/lisp/" loaddir)) load-path) -(push (or (my-getenv "W3DIR") (expand-file-name "../../w3/lisp/" srcdir)) +(push (or (my-getenv "W3DIR") (expand-file-name "../../w3/lisp/" loaddir)) load-path) ;(push "/usr/share/emacs/site-lisp" load-path) @@ -158,7 +159,8 @@ fixed in Emacs after 21.3." (set-syntax-table stab))))) (push srcdir load-path) -(load (expand-file-name "lpath.el" srcdir) nil t) +(push loaddir load-path) +(load (expand-file-name "lpath.el" loaddir) nil t) (defalias 'device-sound-enabled-p 'ignore) (defalias 'play-sound-file 'ignore) -- 2.34.1