Configuration problem
Guenter Milde
milde at users.sourceforge.net
Thu Nov 6 14:03:23 UTC 2008
On 6.11.08, Jörg Sommer wrote:
> "G. Milde" <milde at users.sourceforge.net> wrote:
> > The attached version of /etc/jed.d/05jed-common.sl should fix this
> > issue and provide backwards compatibility.
> >
> > Jörg, could we apply this fix to jed-common and adapt the documentation?
> You've removed the fix for #446444 and the definition for the keys Home
> and End.
Both are not in my version of this file (jed (1:0.99.18+dfsg.1-10)).
Interestingly enough, your version seems to miss the fixes to
+% Add slsh library dir
and
+% Add slsh documentation (site.sl misses this)
present in the current release.
I deleted the removing of the fix for #446444.
Key_Home and Key_End should IMO be set in the emulation file. cua.sl does
this already, maybe emacs.sl should be fixed.
Günter
diff --git a/debian/init.d/05jed-common.sl b/debian/init.d/05jed-common.sl
index ad5260d..07a3f56 100644
--- a/debian/init.d/05jed-common.sl
+++ b/debian/init.d/05jed-common.sl
@@ -23,7 +23,7 @@
% Override (obsolete) code in site.sl that calls JED_ROOT/lib/jed.rc as
% fallback configuration file
-Default_Jedrc_Startup_File = NULL;
+Default_Jedrc_Startup_File = NULL; % eventually overwritten below
% Jed_Home_Directory (defined in site.sl, defaulting to $HOME)
%
@@ -31,18 +31,49 @@
% so .jedrc and .jedrecent are not spoiling the $HOME dir (FHS 2.3)
$1 = path_concat(Jed_Home_Directory, ".jed");
if ( 2 == file_status($1) ) {
- Jed_Home_Directory = $1;
- % set the default jedrc file path to ~/.jed/jed.rc
- $2 = path_concat(Jed_Home_Directory, "jed.rc");
+ % Adapt the user config file path:
+ % a) command_line_hook() in site.sl tries with ~/.jed/.jedrc
+ % b) recommended location: ~/.jed/jed.rc
+ % c) backwards compatible: ~/.jedrc
+ $2 = path_concat($1, "jed.rc");
if (file_status($2) == 1)
Default_Jedrc_Startup_File = $2;
+ $2 = path_concat(Jed_Home_Directory, ".jedrc");
+ if (file_status($2) == 1)
+ Default_Jedrc_Startup_File = $2;
+ % now set the variable:
+ Jed_Home_Directory = $1;
+}
+
+% Add slsh library dir
+% (Bug in site.sl misses this if slsh/local-packages does not exist)
+$1 = path_concat (_slang_install_prefix, "share/slsh/");
+if (2 == file_status($1))
+ set_jed_library_path(strcat(get_jed_library_path(), ",", $1));
+
+% Add slsh documentation (site.sl misses this)
+%
+% You might add directories containing site-wide local help files to the array
+foreach (["/usr/share/slsh/help",
+ "/usr/share/slsh/local-packages/help"])
+{
+ $1 = ();
+ if (file_status($1) != 2)
+ continue;
+
+ foreach (listdir($1))
+ {
+ $2 = ();
+ if (path_extname($2) == ".hlp")
+ % the doc path set with add_doc_file() is currently not
+ % recognized by the standard help.sl
+ % add_doc_file( path_concat($1, $2) );
+ Jed_Doc_Files += "," + path_concat($1, $2);
+ }
}
% do not call info_mode() for *.info files
% (as info_mode is no editing mode but an info reader mode!)
add_mode_for_extension("no", "info");
-
-setkey("beg_of_line", "\e[1~"); % Home
-setkey("eol_cmd", "\e[4~"); % End
Bye, Jörg.
More information about the Pkg-jed-devel
mailing list