home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / next / programm / 7798 < prev    next >
Encoding:
Text File  |  1992-12-17  |  3.7 KB  |  110 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!caen!batcomputer!ghost.dsi.unimi.it!itnsg1.cineca.it!lele
  3. From: lele@itnsg1.cineca.it (Lele Gaifax)
  4. Subject: Emacs 3.0 & EMACSLOADPATH
  5. Message-ID: <1992Dec17.132933.14046@itnsg1.cineca.it>
  6. Organization: (none) (standard disclaimer applies)
  7. Date: Thu, 17 Dec 1992 13:29:33 GMT
  8. Lines: 100
  9.  
  10. Hi all,
  11. here is a little patch to add support for the EMACSLOADPATH
  12. to Emacs 3.0. I do not have at hand the email address of the
  13. author (many thanks, it is great), so I hope he will be read
  14. this newsgroup.
  15. I use this feature since i have a separated dir that contains
  16. my elisp hacked packages. Use 
  17. dwrite Emacs EmacsLoadPath "/usr/local/lib/emacs/local-lisp:/usr/lib/emacs/lisp"
  18.  
  19. (or better DefaultMgr.app) to setup the default value. There is also a default
  20. value for this default (... ;-), see Makefile.postamble.
  21.  
  22. That's it. 
  23. Bye, lele
  24.  
  25.  
  26. *** EtermView.m~    Mon Nov 30 17:53:54 1992
  27. --- EtermView.m    Thu Dec 10 22:13:04 1992
  28. ***************
  29. *** 75,80 ****
  30. --- 75,81 ----
  31.         {"HideOnAutoLaunch", "NO" },
  32.         {"EmacsPath", DEFAULT_EMACS_PATH},
  33.         {"LispPath", DEFAULT_LISP_PATH},
  34. +       {"EmacsLoadPath", EMACSLOADPATH },
  35.         {NULL},
  36.       };
  37.     const char *sTypes[2], *rTypes[2];
  38. *** Makefile.postamble~    Mon Nov 30 17:53:54 1992
  39. --- Makefile.postamble    Thu Dec 10 22:12:24 1992
  40. ***************
  41. *** 1,4 ****
  42. --- 1,7 ----
  43. + EMACSLOADPATH = \\\"/usr/local/emacs/lisp/local-lisp:/usr/local/emacs/lisp\\\"
  44.   OTHER_GARBAGE = display.h lisp.el lisp.elc
  45. + OTHER_CFLAGS = -DEMACSLOADPATH=${EMACSLOADPATH}
  46.   
  47.   ELISP_SOURCES = lisp/eterm-mouse.el lisp/eterm-low.el lisp/eterm-fns.el
  48.   
  49. *** etermSupport.c~    Mon Nov 30 17:53:56 1992
  50. --- etermSupport.c    Thu Dec 10 22:05:25 1992
  51. ***************
  52. *** 29,34 ****
  53. --- 29,36 ----
  54.   {
  55.     static char term[] = "TERM=eterm";
  56.     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:";
  57. +   const char * load_path = NXGetDefaultValue("Emacs", "EmacsLoadPath");
  58. +   char * emacs_load_path;
  59.     char *eventhost;
  60.     static char eventport[80];
  61.     char **newEnv;
  62. ***************
  63. *** 45,50 ****
  64. --- 47,57 ----
  65.     strcpy (eventhost, "EVENT_HOST=");
  66.     strcat (eventhost, hostname);
  67.   
  68. +   emacs_load_path = (char *) malloc(sizeof ("EMACSLOADPATH=") +
  69. +                                            strlen (load_path) + 1);
  70. +   sprintf (emacs_load_path, "EMACSLOADPATH=%s", load_path);
  71. +   
  72.     sprintf (eventport, "EVENT_PORT=%d", eventportno);
  73.   
  74.     for (envSize = 0; currentEnv[envSize] != NULL; envSize++);
  75. ***************
  76. *** 53,64 ****
  77.       if (strncmp (currentEnv[x], "TERM=", 5)
  78.       && strncmp (currentEnv[x], "TERMCAP=", 8)
  79.       && strncmp (currentEnv[x], "EVENT_HOST=", 11)
  80. !     && strncmp (currentEnv[x], "EVENT_PORT=", 11))
  81.         newEnv[y++] = currentEnv[x];
  82.     newEnv[y++] = term;
  83.     newEnv[y++] = termcap;
  84.     newEnv[y++] = eventhost;
  85.     newEnv[y++] = eventport;
  86.     newEnv[y] = NULL;
  87.     return newEnv;
  88.   } /* patch_env */
  89. --- 60,73 ----
  90.       if (strncmp (currentEnv[x], "TERM=", 5)
  91.       && strncmp (currentEnv[x], "TERMCAP=", 8)
  92.       && strncmp (currentEnv[x], "EVENT_HOST=", 11)
  93. !     && strncmp (currentEnv[x], "EVENT_PORT=", 11)
  94. !         && strncmp( currentEnv[x], "EMACSLOADPATH=", 14))
  95.         newEnv[y++] = currentEnv[x];
  96.     newEnv[y++] = term;
  97.     newEnv[y++] = termcap;
  98.     newEnv[y++] = eventhost;
  99.     newEnv[y++] = eventport;
  100. +   newEnv[y++] = emacs_load_path;
  101.     newEnv[y] = NULL;
  102.     return newEnv;
  103.   } /* patch_env */
  104. -- 
  105. Lele Gaifax - lele@itnsg1.cineca.it
  106. ...calling Emacs convenient, of course, is like calling oxygen useful
  107.                     Rens Troost
  108.