[Pkg-jed-commit] r1113 - jed-extra/trunk/debian/examples
Guenter Milde
milde-guest at alioth.debian.org
Mon May 26 13:36:36 UTC 2008
Author: milde-guest
Date: 2008-05-26 13:36:34 +0000 (Mon, 26 May 2008)
New Revision: 1113
Modified:
jed-extra/trunk/debian/examples/50jed-extra.sl
Log:
Use a privat variable instead of \$1 to store the jed-extra library dir,
as S1 is unsave with evaluation of unknown code inbetween. (report Jörg
Sommer)
Modified: jed-extra/trunk/debian/examples/50jed-extra.sl
===================================================================
--- jed-extra/trunk/debian/examples/50jed-extra.sl 2008-05-23 08:35:08 UTC (rev 1112)
+++ jed-extra/trunk/debian/examples/50jed-extra.sl 2008-05-26 13:36:34 UTC (rev 1113)
@@ -4,37 +4,37 @@
% Released under the terms of the GNU General Public License (v. 2 or later)
% Location of the jed-extra package's library dir
-$1 = "/usr/share/jed/jed-extra/";
+private variable extra_lib = "/usr/share/jed/jed-extra/";
% if jed-extra is removed (not purged), this file (and possibly the
% jed-extra library dir) exist, but nothing else it expects --> abort
-$2 = path_concat($1, "libdir.slc");
-#if (file_status($2) != 1)
+$1 = path_concat(extra_lib, "libdir.slc");
+#if (file_status($1) != 1)
#stop
#endif
% Add (and initialize) library directories
% ----------------------------------------
-() = evalfile($2);
+() = evalfile($1);
% Utilities (required by the other modes)
-% append_libdir($1 + "utils/", 1); % append and initialize
-append_libdir($1 + "utils/", 0); % append but do not initialize
+% append_libdir(extra_lib + "utils/"), 1); % append and initialize
+append_libdir(path_concat(extra_lib, "utils/"), 0); % do not initialize
% "Normal" modes
-append_libdir($1, 1); % append and initialize
-% append_libdir($1, 0); % append but do not initialize
+append_libdir(extra_lib, 1); % append and initialize
+% append_libdir(extra_lib, 0); % do not initialize
-% Drop-In Modes (recent, help, man, ...) need to be prepended
-% (comment out if you want to keep the original behaviour)
-add_libdir($1 + "drop-in/", 1); % append and initialize
-% add_libdir($1 + "drop-in/", 0); % append but do not initialize
+% Drop-In Modes (recent, help, ...)
+% prepend to overwrite originals (comment out to keep the original behaviour)
+add_libdir(path_concat(extra_lib, "drop-in/"), 1); % prepend and initialize
+% add_libdir(path_concat(extra_lib, "drop-in/"), 0); % do not initialize
% Experimental and exotic modes
% (uncomment to initalize, maybe better on a per user basis in ~/jed.rc)
-% append_libdir($1 + "extra/", 0); % append but do not initialize
-% append_libdir($1 + "extra/", 1); % append and initialize
+% append_libdir(path_concat(extra_lib, "extra/"), 1); % append and initialize
+% append_libdir(path_concat(extra_lib, "extra/"), 0); % do not initialize
% "Manual" initialization of stuff not handled by the ini.sl files
@@ -45,18 +45,16 @@
autoload("string_nth_match", "strutils"); % needed by hyperman.sl
autoload("get_keystring", "strutils"); % needed by snake.sl
% alternatively evaluate the utils/ini.sl file (or set the "initialize"
-% argument to 1 in append_libdir($1 + "utils/", 1) above)
-% () = evalfile("utils/ini.sl"); % autoloads for all utilit functions
+% argument to 1 in append_libdir(path_concat(extra_lib, "utils/"), 1) above)
+% () = evalfile("utils/ini.sl"); % autoloads for all utility functions
% Set modes for known filename extensions
add_mode_for_extension ("css1", "css");
add_mode_for_extension ("css1", "css1");
add_mode_for_extension ("gnuplot", "gnuplot"); % gnuplot plotting program
add_mode_for_extension ("gnuplot", "gp");
-foreach (["man", "1", "2", "3", "4", "5", "6", "7", "8"]) {
- $2 = ();
- add_mode_for_extension ("manedit", $2);
-}
+foreach $1 (["man", "1", "2", "3", "4", "5", "6", "7", "8"])
+ add_mode_for_extension ("manedit", $1);
add_mode_for_extension ("mupad", "mu"); % mode for mupad files
add_mode_for_extension ("ruby", "rb");
add_mode_for_extension ("sql", "sql");
More information about the Pkg-jed-commit
mailing list