[Pkg-jed-commit] r780 - in jed/branches/0.99.19: . debian debian/init.d debian/patches
Jörg Sommer
jo-guest at alioth.debian.org
Sun Jun 17 12:39:23 UTC 2007
Author: jo-guest
Date: 2007-06-17 12:39:22 +0000 (Sun, 17 Jun 2007)
New Revision: 780
Modified:
jed/branches/0.99.19/check_package
jed/branches/0.99.19/debian/changelog
jed/branches/0.99.19/debian/init.d/05jed-common.sl
jed/branches/0.99.19/debian/patches/slang2.dpatch
Log:
• debian/init.d/05jed-common.sl
· Removed the slsh help stuff, because this is now handled by site.sl.
· Activated the keys Home and End by default. It's annoying to open an
editor and these keys do not work.
• debian/patches/slang2.dpatch
· Extended the patch.
· I did remove an EXIT_BLOCK, but this isn't deprecated in SLang2. So, I've
put it back.
• check_package
· We must apply the fix-documentation patch before doing the test.
Modified: jed/branches/0.99.19/check_package
===================================================================
--- jed/branches/0.99.19/check_package 2007-06-11 12:25:35 UTC (rev 779)
+++ jed/branches/0.99.19/check_package 2007-06-17 12:39:22 UTC (rev 780)
@@ -7,6 +7,8 @@
if which tmexpand >/dev/null; then
mkdir $tmp/hlp-new
+ dpatch apply fix-documentation
+
sed -n '/^%!%+/,/^%!%-/ { /^%!%+/d; /^%!%-/ { s/.*/\\done/; }; s/^%//g; p; }' \
lib/*.sl | tmexpand -Mslhlp - $tmp/hlp-new/libfuns.hlp
cat doc/tm/rtl/*.tm | tmexpand -Mslhlp - $tmp/hlp-new/jedfuns.hlp
@@ -16,6 +18,7 @@
diff -ur $tmp/usr/share/doc/jed-common/hlp $tmp/hlp-new || true
+ dpatch deapply fix-documentation
rm -r ../hlp-new ../usr
else
echo "tmexpand not found. Skipped uptodate hlp check"
Modified: jed/branches/0.99.19/debian/changelog
===================================================================
--- jed/branches/0.99.19/debian/changelog 2007-06-11 12:25:35 UTC (rev 779)
+++ jed/branches/0.99.19/debian/changelog 2007-06-17 12:39:22 UTC (rev 780)
@@ -4,8 +4,10 @@
variable is not updated before the _jed_before_key_hook hooks are
called.
- -- Jörg Sommer <joerg at alea.gnuu.de> Mon, 11 Jun 2007 14:16:10 +0200
+ * /etc/jed.d/05jed-common.sl: Activated the keys Home and End by default.
+ -- Jörg Sommer <joerg at alea.gnuu.de> Sun, 17 Jun 2007 14:19:17 +0200
+
jed (1:0.99.19~pre95-1) experimental; urgency=medium
* New upstream release, taken from the upstream SVN repository at
Modified: jed/branches/0.99.19/debian/init.d/05jed-common.sl
===================================================================
--- jed/branches/0.99.19/debian/init.d/05jed-common.sl 2007-06-11 12:25:35 UTC (rev 779)
+++ jed/branches/0.99.19/debian/init.d/05jed-common.sl 2007-06-17 12:39:22 UTC (rev 780)
@@ -30,28 +30,9 @@
Default_Jedrc_Startup_File = $2;
}
-
-% 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
Modified: jed/branches/0.99.19/debian/patches/slang2.dpatch
===================================================================
--- jed/branches/0.99.19/debian/patches/slang2.dpatch 2007-06-11 12:25:35 UTC (rev 779)
+++ jed/branches/0.99.19/debian/patches/slang2.dpatch 2007-06-17 12:39:22 UTC (rev 780)
@@ -2,10 +2,105 @@
## slang2.dpatch by Jörg Sommer <joerg at alea.gnuu.de>
##
## DP: This patch changes old pre‐slang2 language contructs into slang2
-## DP: contructs. The intention of this patch is to help the upstream
-## DP: maintainer John Davis.
+## DP: contructs, e.g. replace ERROR_BLOCK by try-catch-finally.
+## DP: The intention of this patch is to help the upstream maintainer.
@DPATCH@
+diff -urNad 0.99.19~/lib/acompile.sl 0.99.19/lib/acompile.sl
+--- 0.99.19~/lib/acompile.sl 2006-02-13 18:51:58.000000000 +0100
++++ 0.99.19/lib/acompile.sl 2007-06-17 13:34:08.265297107 +0200
+@@ -85,11 +85,9 @@
+ {
+ if (bufferp (Compile_Output_Buffer))
+ error ("A compile process is already running.");
+- ERROR_BLOCK
+- {
+- _clear_error ();
+- }
+- kill_process (Compile_Process_Id);
++ try
++ kill_process (Compile_Process_Id);
++ catch RunTimeError;
+ Compile_Process_Id = -1;
+ }
+
+diff -urNad 0.99.19~/lib/binary.sl 0.99.19/lib/binary.sl
+--- 0.99.19~/lib/binary.sl 2006-02-13 18:51:58.000000000 +0100
++++ 0.99.19/lib/binary.sl 2007-06-17 13:16:45.201297107 +0200
+@@ -5,13 +5,13 @@
+ variable file, bytes, len, pos;
+
+ file = read_file_from_mini ("Find Binary File:");
+- ERROR_BLOCK
++ set_file_translation (1);
++ try
+ {
+- set_file_translation (0);
++ () = find_file (file);
+ }
+- set_file_translation (1);
+- () = find_file (file);
+- EXECUTE_ERROR_BLOCK;
++ finally
++ set_file_translation (0);
+ no_mode();
+ set_overwrite(1);
+ %
+diff -urNad 0.99.19~/lib/bookmark.sl 0.99.19/lib/bookmark.sl
+--- 0.99.19~/lib/bookmark.sl 2006-02-13 18:51:58.000000000 +0100
++++ 0.99.19/lib/bookmark.sl 2007-06-17 13:35:42.753297107 +0200
+@@ -59,13 +59,15 @@
+ {
+ #ifdef HAS_BLOCAL_VAR
+ variable fun;
+- ERROR_BLOCK
++ try
+ {
+- _clear_error ();
+- error ("Mark lies outside visible part of buffer.");
++ fun = get_blocal_var ("bookmark_narrow_hook");
++ mrk; eval (fun);
++ }
++ catch AnyError:
++ {
++ throw UsageError, "Mark lies outside visible part of buffer.";
+ }
+- fun = get_blocal_var ("bookmark_narrow_hook");
+- mrk; eval (fun);
+ #else
+ error ("Mark lies outside visible part of buffer.");
+ #endif
+diff -urNad 0.99.19~/lib/ctags.sl 0.99.19/lib/ctags.sl
+--- 0.99.19~/lib/ctags.sl 2006-11-10 21:17:52.000000000 +0100
++++ 0.99.19/lib/ctags.sl 2007-06-17 13:29:04.581297107 +0200
+@@ -59,19 +59,6 @@
+ sw2buf (buf);
+ }
+
+-#ifnexists AnyError
+- variable error_happened = 0;
+- ERROR_BLOCK
+- {
+- _clear_error ();
+- error_happened = 1;
+- }
+- buf = user_mark_buffer (s.mark);
+- if (error_happened == 0)
+- goto_user_mark (s.mark);
+- if (error_happened == 0)
+- return;
+-#else
+ try
+ {
+ buf = user_mark_buffer (s.mark);
+@@ -79,7 +66,6 @@
+ return;
+ }
+ catch AnyError;
+-#endif
+
+ () = read_file (s.file);
+ goto_line (s.line);
diff -urNad 0.99.19~/lib/emul.sl 0.99.19/lib/emul.sl
--- 0.99.19~/lib/emul.sl 2006-02-13 18:51:58.000000000 +0100
+++ 0.99.19/lib/emul.sl 1970-01-01 01:00:00.000000000 +0100
@@ -20,10 +115,136 @@
- str_replace_all (a, b, c);
-}
-#endif
+diff -urNad 0.99.19~/lib/menu.sl 0.99.19/lib/menu.sl
+--- 0.99.19~/lib/menu.sl 2007-01-23 08:07:54.000000000 +0100
++++ 0.99.19/lib/menu.sl 2007-06-17 13:19:53.069297107 +0200
+@@ -180,16 +180,13 @@
+ {
+ variable n, key, len, next, nlen;
+
+- ERROR_BLOCK
++ try
+ {
+- set_top_status_line (Global_Top_Status_Line);
+- pop ();
++ menu_select_cmd ("File,Edit,Buffers,Windows,Help,Misc,Exit",
++ "menu_files,menu_basics,menu_buffers,menu_window_cmds,menu_help,menu_misc, at exit_jed");
+ }
+-
+- menu_select_cmd ("File,Edit,Buffers,Windows,Help,Misc,Exit",
+- "menu_files,menu_basics,menu_buffers,menu_window_cmds,menu_help,menu_misc, at exit_jed");
+-
+- EXECUTE_ERROR_BLOCK ();
++ finally
++ set_top_status_line (Global_Top_Status_Line);
+
+ %
+ % Show user keybinding of the function.
+diff -urNad 0.99.19~/lib/mouse.sl 0.99.19/lib/mouse.sl
+--- 0.99.19~/lib/mouse.sl 2007-01-18 16:20:00.000000000 +0100
++++ 0.99.19/lib/mouse.sl 2007-06-17 13:27:08.285297107 +0200
+@@ -236,15 +236,15 @@
+
+ if (shift == 1)
+ {
+- ERROR_BLOCK
++ try
+ {
+- _clear_error ();
++ if (but == 1)
++ call ("page_down");
++ else if (but == 4)
++ call ("page_up");
+ }
+- if (but == 1)
+- call ("page_down");
+- else if (but == 4)
+- call ("page_up");
+-
++ catch AnyError;
++
+ return 0;
+ }
+
+diff -urNad 0.99.19~/lib/replace.sl 0.99.19/lib/replace.sl
+--- 0.99.19~/lib/replace.sl 2006-02-13 18:51:58.000000000 +0100
++++ 0.99.19/lib/replace.sl 2007-06-17 13:25:03.117297107 +0200
+@@ -24,8 +24,34 @@
+
+ if (-1 != prefix_argument (-1))
+ REPLACE_PRESERVE_CASE_INTERNAL = not (REPLACE_PRESERVE_CASE_INTERNAL);
+-
+- ERROR_BLOCK
++
++ try
++ {
++ while (n)
++ {
++ buf = (); n--;
++
++ % skip special buffers
++ if ((buf[0] == '*') or (buf[0] == ' ')) continue;
++
++ sw2buf (buf);
++
++ (file,,,flags) = getbuf_info ();
++
++ % skip if no file associated with buffer, or is read only
++ !if (strlen (file) or (flags & 8)) continue;
++
++ % ok, this buffer is what we want.
++
++ push_spot_bob ();
++ try
++ replace_with_query (&search_search_function, pat, rep, 1,
++ &replace_do_replace);
++ finally
++ pop_spot();
++ }
++ }
++ finally
+ {
+ sw2buf (cbuf);
+ pop_spot ();
+@@ -33,34 +59,6 @@
+ REPLACE_PRESERVE_CASE_INTERNAL = 0;
+ }
+
+- while (n)
+- {
+- buf = (); n--;
+-
+- % skip special buffers
+- if ((buf[0] == '*') or (buf[0] == ' ')) continue;
+-
+- sw2buf (buf);
+-
+- (file,,,flags) = getbuf_info ();
+-
+- % skip if no file associated with buffer, or is read only
+- !if (strlen (file) or (flags & 8)) continue;
+-
+- % ok, this buffer is what we want.
+-
+- push_spot_bob ();
+- ERROR_BLOCK
+- {
+- pop_spot ();
+- }
+-
+- replace_with_query (&search_search_function, pat, rep, 1,
+- &replace_do_replace);
+- pop_spot ();
+- }
+-
+- EXECUTE_ERROR_BLOCK;
+ message ("Done.");
+ }
+
diff -urNad 0.99.19~/lib/site.sl 0.99.19/lib/site.sl
---- 0.99.19~/lib/site.sl 2007-01-23 08:07:54.000000000 +0100
-+++ 0.99.19/lib/site.sl 2007-05-27 13:43:34.718340355 +0200
-@@ -246,14 +246,8 @@
+--- 0.99.19~/lib/site.sl 2007-06-17 12:58:31.781297107 +0200
++++ 0.99.19/lib/site.sl 2007-06-17 13:13:21.913297107 +0200
+@@ -260,14 +260,8 @@
%!%-
define str_replace_all (str, old, new)
{
@@ -40,7 +261,7 @@
}
%}}}
-@@ -263,9 +257,6 @@
+@@ -277,9 +271,6 @@
%{{{ Compatibility functions
@@ -50,7 +271,7 @@
#ifnexists strbytelen
define strbytelen (s)
{
-@@ -1738,13 +1729,13 @@
+@@ -1685,13 +1676,13 @@
%!%-
public define redo ()
{
@@ -68,59 +289,87 @@
}
%}}}
-@@ -1841,30 +1832,32 @@
+@@ -2408,46 +2399,45 @@
- widen ();
+ runhooks ("startup_hook");
-- EXIT_BLOCK
+- ERROR_BLOCK
+- {
+- eval (".()jed_startup_hook");
+- }
+-
+- !if (strcmp(whatbuf(), scratch) or buffer_modified())
+ try
-+ {
-+ if ( strlen(mode) )
-+ {
-+ variable mstr = "_mode";
-+ mode = strtrans (mode, "-", "_");
-+ !if (is_substr (mode, mstr)) mode += "_mode"; %mode = strcat (mode, "_mode" );
-+
-+ if (mode == "c++_mode")
-+ mode = "c_mode";
-+
-+ if (is_defined(mode))
-+ {
-+ eval (mode);
-+ 1; % mode was defined
-+ return;
-+ }
-+ }
-+ 0;
-+ }
-+ finally
{
- mode = ();
- if (extra_hook) (mode + modeline_hook2 ()); else mode;
- pop_spot (); % restore place
- }
+- ERROR_BLOCK
+- {
+- setbuf (scratch);
+- erase_buffer ();
+- set_buffer_modified_flag (0);
+- }
-
-- if ( strlen(mode) )
-- {
-- variable mstr = "_mode";
-- mode = strtrans (mode, "-", "_");
-- !if (is_substr (mode, mstr)) mode += "_mode"; %mode = strcat (mode, "_mode" );
--
-- if (mode == "c++_mode")
-- mode = "c_mode";
--
-- if (is_defined(mode))
+- () = insert_file (expand_jedlib_file("cpright.hlp"));
+- set_buffer_modified_flag (0);
+- bob();
+- file = Null_String;
+- message (Null_String);
+- if (Startup_With_File > 0)
- {
-- eval (mode);
-- 1; % mode was defined
-- return;
+- forever
++ !if (strcmp(whatbuf(), scratch) or buffer_modified())
++ {
++ try
+ {
+- file = read_file_from_mini ("Enter Filename:");
+- if (strlen(extract_filename(file))) break;
++ () = insert_file (expand_jedlib_file("cpright.hlp"));
++ set_buffer_modified_flag (0);
++ bob();
++ file = Null_String;
++ message (Null_String);
++ if (Startup_With_File > 0)
++ {
++ forever
++ {
++ file = read_file_from_mini ("Enter Filename:");
++ if (strlen(extract_filename(file))) break;
++ }
++ }
++ else !if (Startup_With_File)
++ {
++ do
++ {
++ update_sans_update_hook (1);
++ }
++ while (not (input_pending(600))); % 1 minute
++ }
+ }
- }
-- }
-- 0;
+- else !if (Startup_With_File)
+- {
+- do
++ finally
+ {
+- update_sans_update_hook (1);
++ setbuf (scratch);
++ erase_buffer ();
++ set_buffer_modified_flag (0);
+ }
+- while (not (input_pending(600))); % 1 minute
+-
+- }
+- EXECUTE_ERROR_BLOCK;
+- if (strlen (file)) () = find_file(file);
++ if (strlen (file)) () = find_file(file);
++ }
+ }
+- EXECUTE_ERROR_BLOCK;
++ finally
++ eval (".()jed_startup_hook");
}
- variable Mode_List_Exts = "h,cc,cpp,hpp,hh,sl,txt,doc,f,for,pro,1,pl,pm,v,verilog,vhd,vhdl,vt,sp,cir,py,cxx,m,bib";
-@@ -2627,9 +2620,10 @@
+ add_to_hook ("_jed_startup_hooks", &jed_startup_hook);
+@@ -2574,9 +2564,10 @@
{
read_with_completion("Insert Buffer:", Null_String, Null_String, 'b');
push_spot();
@@ -134,26 +383,3 @@
}
add_completion("insert_buffer");
-@@ -2856,15 +2850,15 @@
- {
- variable n = strlen (str);
-
-- EXIT_BLOCK
-- {
-- pop_spot ();
-- }
--
- push_spot ();
-
-- if (n != left(n)) return 0;
-- return looking_at (__tmp(str));
-+ try
-+ {
-+ if (n != left(n)) return 0;
-+ return looking_at (__tmp(str));
-+ }
-+ finally
-+ pop_spot ();
- }
-
- %}}}
More information about the Pkg-jed-commit
mailing list