dot/lisp-init.lisp, dot/shell-rc: Support CCL and ABCL as Lisp systems.
[profile] / dot / profile
index 6730a25..fd50a46 100644 (file)
@@ -57,6 +57,17 @@ __mdw_setconf () {
   fi
 }
 
+## __mdw_export_if_defined VAR ...
+##
+## If VARs are defined, then export them.
+__mdw_export_if_defined () {
+  local var t
+  for var in "$@"; do
+    eval t=\${$var+t}
+    case $t in t) export $var ;; esac
+  done
+}
+
 ###--------------------------------------------------------------------------
 ### Other preliminaries.
 
@@ -98,6 +109,12 @@ done
 ###--------------------------------------------------------------------------
 ### Some other preliminaries.
 
+## Set a per-process memory limit.  It's much less common for a process to
+## need a lot of memory for a legitimate reason than for it to be a memory
+## leak or some other bug that's going to cause swap death for no good
+## reason.
+ulimit -Sv $(mdw-conf memory-limit 4194304)
+
 ## Establish a temporary directory.
 case ${TMPDIR+t} in
   t) ;;
@@ -185,6 +202,9 @@ if __mdw_programp global; then
   export LESSGLOBALTAGS
 fi
 
+## Get Debian `groff' to produce control sequences rather than overstriking.
+GROFF_SGR=t; export GROFF_SGR
+
 ###--------------------------------------------------------------------------
 ### Miscellaneous things.
 
@@ -290,6 +310,10 @@ DPKG_COLORS=never; export DPKG_COLORS
 GCC_COLORS=; export GCC_COLORS
 CCC_OVERRIDE_OPTIONS="#^-fno-color-diagnostics"; export CCC_OVERRIDE_OPTIONS
 
+## Local library directories.
+__mdw_addto PERLLIB l $HOME/lib/perl; __mdw_export_if_defined PERLLIB
+__mdw_addto PYTHONPATH l $HOME/lib/python; __mdw_export_if_defined PYTHONPATH
+
 ## Disable core dumps.
 ulimit -S -c 0