[Pkg-jed-commit] r256 - trunk/packages/jed/debian

Jörg Sommer joerg at alea.gnuu.de
Mon Apr 10 20:56:58 UTC 2006


Hi G.,

G. Milde schrieb am Mon 10. Apr, 14:23 (+0200):
> So, how about libfuns and slangfun?
> My current (0.99.17) Jed_Doc_Files has:
> 
>  /usr/share/jed/doc/txt/jedfuns.txt,
>  /usr/share/jed/doc/txt/libfuns.txt,

They are now in /u/s/j/hlp/.

>  /usr/share/doc/libslang2/slangfun.txt"

I would like to see Jed_Doc_Files removed and only
get_doc_string_from_file and *_doc_file get used. I thought John has said
something on the mailing list, but I couldn't find a message that states
he will replace Jed_Doc_Files by the slang internal *_doc_file stuff.

Currently only two files in jed/lib and tree files in jed-modes uses this
variable:

jedmodes% grep -lr Jed_Doc_Files . 
./libdir/libdir.sl
./hyperhelp/help.sl
./home-lib/home-lib.sl
jed/lib% grep -l Jed_Doc_Files *
help.sl
site.sl

I think it would be really easy to replace the Jed_Doc_Files by
*_doc_files. Here is a patch for jedmodes:

#v+
--- /usr/share/jed/jed-extra/drop-in/help.sl	2006-03-21 09:20:22.000000000 +0100
+++ jedmodes/hyperhelp/help.sl	2006-04-10 22:39:31.000000000 +0200
@@ -375,7 +375,13 @@
    variable docfile, matches_p;
 
    variable fp, buf="", pos=1, buffer, beg=0, len=0, entry;
-   foreach (strchop(Jed_Doc_Files, ',', 0)) % get_doc_files() is not defined in 99.16
+   foreach (
+#if (_jed_version > 9916)
+            get_doc_files()
+#else
+            strchop(Jed_Doc_Files, ',', 0) % get_doc_files() is not defined in 99.16
+#endif
+            )
      {
 	docfile=();
 	fp = fopen(docfile, "r");
@@ -635,7 +641,13 @@
      help_str += obj + function_types[type];
 
    % get doc string
-   foreach (strchop(Jed_Doc_Files, ',', 0))
+   foreach (
+#if (_jed_version > 9916)
+            get_doc_files()
+#else
+            strchop(Jed_Doc_Files, ',', 0) % get_doc_files() is not defined in 99.16
+#endif
+            )
      {
 	file = ();
 	doc_str = get_doc_string_from_file (file, obj);
--- /usr/share/jed/jed-extra/libdir.sl	2005-11-07 12:31:48.000000000 +0100
+++ jedmodes/libdir/libdir.sl	2006-04-10 22:42:59.000000000 +0200
@@ -74,7 +74,12 @@
    % documentation
    path = path_concat(lib, "libfuns.txt");
    if (1 == file_status(path))
+#if (_jed_version > 9916)
+     add_doc_file(path);
+#else
      Jed_Doc_Files = path + "," + Jed_Doc_Files;
+#endif
+
    % dfa cache
 #ifdef HAS_DFA_SYNTAX
    % Jed_Highlight_Cache_Dir = lib;
@@ -120,7 +125,11 @@
    % documentation
    path = path_concat(lib, "libfuns.txt");
    if (1 == file_status(path))
-     Jed_Doc_Files = Jed_Doc_Files + "," + path;
+#if (_jed_version > 9916)
+     add_doc_file(path);
+#else
+     Jed_Doc_Files = path + "," + Jed_Doc_Files;
+#endif
    % dfa cache
 #ifdef HAS_DFA_SYNTAX
    Jed_Highlight_Cache_Path = Jed_Highlight_Cache_Path + "," + lib;
--- jedmodes-2.1/home-lib/home-lib.sl	2005-11-18 11:50:28.000000000 +0100
+++ jedmodes/home-lib/home-lib.sl	2006-04-10 22:47:33.000000000 +0200
@@ -140,7 +140,11 @@
    % documentation
    path = path_concat(lib, "libfuns.txt");
    if (1 == file_status(path))
+#if (_jed_version > 9916)
+     add_doc_file(path);
+#else
      Jed_Doc_Files = path + "," + Jed_Doc_Files;
+#endif
    % dfa cache
 #ifdef HAS_DFA_SYNTAX
    Jed_Highlight_Cache_Dir = lib;
#v-

I will send a patch to the jed mailinglist in the hope John would apply it.

Regards, Jörg.
-- 
Der kommt den Göttern am nächsten, der auch dann schweigen kann,
wenn er im Recht ist.                         (Cato; 234-149 v. Chr.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-jed-devel/attachments/20060410/56fafd0d/attachment.pgp


More information about the Pkg-jed-devel mailing list