🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #2114

Emacs 3.0 & EMACSLOADPATH

#2114
From: Lele Gaifax
Date: Thu, 17 Dec 1992 13:29
100 lines
3899 bytes
Hi all,
here is a little patch to add support for the EMACSLOADPATH
to Emacs 3.0. I do not have at hand the email address of the
author (many thanks, it is great), so I hope he will be read
this newsgroup.
I use this feature since i have a separated dir that contains
my elisp hacked packages. Use 
dwrite Emacs EmacsLoadPath "/usr/local/lib/emacs/local-lisp:/usr/lib/emacs/lisp"

(or better DefaultMgr.app) to setup the default value. There is also a default
value for this default (... ;-), see Makefile.postamble.

That's it. 
Bye, lele


*** EtermView.m~	Mon Nov 30 17:53:54 1992
--- EtermView.m	Thu Dec 10 22:13:04 1992
***************
*** 75,80 ****
--- 75,81 ----
        {"HideOnAutoLaunch", "NO" },
        {"EmacsPath", DEFAULT_EMACS_PATH},
        {"LispPath", DEFAULT_LISP_PATH},
+       {"EmacsLoadPath", EMACSLOADPATH },
        {NULL},
      };
    const char *sTypes[2], *rTypes[2];
*** Makefile.postamble~	Mon Nov 30 17:53:54 1992
--- Makefile.postamble	Thu Dec 10 22:12:24 1992
***************
*** 1,4 ****
--- 1,7 ----
+ EMACSLOADPATH = \\\"/usr/local/emacs/lisp/local-lisp:/usr/local/emacs/lisp\\\"
+ 
  OTHER_GARBAGE = display.h lisp.el lisp.elc
+ OTHER_CFLAGS = -DEMACSLOADPATH=${EMACSLOADPATH}
  
  ELISP_SOURCES = lisp/eterm-mouse.el lisp/eterm-low.el lisp/eterm-fns.el
  
*** etermSupport.c~	Mon Nov 30 17:53:56 1992
--- etermSupport.c	Thu Dec 10 22:05:25 1992
***************
*** 29,34 ****
--- 29,36 ----
  {
    static char term[] = "TERM=eterm";
    static char termcap[] = "TERMCAP=69|eterm|Terminal emulator for Gnu-emacs:co#80:li#24:cm=^u%d^u%d.:IC=^u%d_:DC=^u%d^d:AL=^u%d^o:DL=^u%d^k:bc=^b:bl=^g:cd=^[k:ce=^k:ch=^u%d.:cl=^[c:cr=^a:do=^n:im=^i:ei=^i:le=^b:mi:ms:nd=^f:nl=^j:se=^s:so=^s:up=^p:am:km:";
+   const char * load_path = NXGetDefaultValue("Emacs", "EmacsLoadPath");
+   char * emacs_load_path;
    char *eventhost;
    static char eventport[80];
    char **newEnv;
***************
*** 45,50 ****
--- 47,57 ----
    strcpy (eventhost, "EVENT_HOST=");
    strcat (eventhost, hostname);
  
+   emacs_load_path = (char *) malloc(sizeof ("EMACSLOADPATH=") +
+                                            strlen (load_path) + 1);
+ 
+   sprintf (emacs_load_path, "EMACSLOADPATH=%s", load_path);
+   
    sprintf (eventport, "EVENT_PORT=%d", eventportno);
  
    for (envSize = 0; currentEnv[envSize] != NULL; envSize++);
***************
*** 53,64 ****
      if (strncmp (currentEnv[x], "TERM=", 5)
  	&& strncmp (currentEnv[x], "TERMCAP=", 8)
  	&& strncmp (currentEnv[x], "EVENT_HOST=", 11)
! 	&& strncmp (currentEnv[x], "EVENT_PORT=", 11))
        newEnv[y++] = currentEnv[x];
    newEnv[y++] = term;
    newEnv[y++] = termcap;
    newEnv[y++] = eventhost;
    newEnv[y++] = eventport;
    newEnv[y] = NULL;
    return newEnv;
  } /* patch_env */
--- 60,73 ----
      if (strncmp (currentEnv[x], "TERM=", 5)
  	&& strncmp (currentEnv[x], "TERMCAP=", 8)
  	&& strncmp (currentEnv[x], "EVENT_HOST=", 11)
! 	&& strncmp (currentEnv[x], "EVENT_PORT=", 11)
!         && strncmp( currentEnv[x], "EMACSLOADPATH=", 14))
        newEnv[y++] = currentEnv[x];
    newEnv[y++] = term;
    newEnv[y++] = termcap;
    newEnv[y++] = eventhost;
    newEnv[y++] = eventport;
+   newEnv[y++] = emacs_load_path;
    newEnv[y] = NULL;
    return newEnv;
  } /* patch_env */
-- 
Lele Gaifax - lele@itnsg1.cineca.it
...calling Emacs convenient, of course, is like calling oxygen useful
					Rens Troost
Technical Details
Message-ID: <1992Dec17.132933.14046@itnsg1.cineca.it>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!caen!batcomputer!ghost.dsi.unimi.it!itnsg1.cineca.it!lele

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!caen!batcomputer!ghost.dsi.unimi.it!itnsg1.cineca.it!lele
From: lele@itnsg1.cineca.it (Lele Gaifax)
Subject: Emacs 3.0 & EMACSLOADPATH
Message-ID: <1992Dec17.132933.14046@itnsg1.cineca.it>
Organization: (none) (standard disclaimer applies)
Date: Thu, 17 Dec 1992 13:29:33 GMT
Lines: 100