jed-users mailing list

[2002 Date Index] [2002 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Comments on comments


> Dear Jedies,

My problems with dissapearing mails to the list seems to be solved. Now I'd
like to catch up...


First of all, thanks John for the new edition of the editor. The
before/after key hooks work fine for me.

I have some more suggestions regarding comments.sl, though

> Changes since B0.99-15
> ...
> 24. lib/comments.sl: Add support for java comments (Nathan Smith
>     <nsmith@xxxxxxxxxxxx>)

Why is the support for java comments not added to java? When I wrote
comments.sl, my main intention was to make it "a tool for mode designers".
Actually, there is no need to change comments.sl to implement comments in a
new mode. Just do

   require("comments");
   set_comment_info (modename, "# ", "", 7);


The intention was to move all comment-string definitions to the
mode-defining files, i.e the lines

   % for some modes we have comment string definitons here
   set_comment_info ("html", "<!-- ", " -->", 0);
   set_comment_info ("sgml", "<!-- ", " -->", 0);
   ...
in comments.sl are only there for backward compatibility
(as I could  not change the mode-files).

Also, we could do without spaces in the comment_info, e.g.
   set_comment_info ("html", "<!--", "-->", 0);
and add the spaces in the (un)commenting functions. (Or is there
any mode where one doesnot want to separate the comment
string from the commet by a space?)

I wonder if there is a chance to make it even easier:

Comment strings are currently defined twice for each mode:
  
  define_syntax ("#", "", '%', modename);             % Comments
and
  set_comment_info (modename, "# ", "", 7);

If it were possible, to obtain the comment string(s) set with define_syntax
by a function, we could do without the double definition and gain more
consistency. (Let's say the last defined comment-syntax-string should be
used by comments.sl). set_comment_info would then only be used
by the end-user to eventually override the default.

Feature wish: a reverse function for define_syntax

  String, String  = get_syntax(Integer type, String modename);
or (depending on type)
  String  = get_syntax(Integer type, String modename);


Furthermore, I plan some extensions to comments.sl:

  boc()/eoc()    % begin/end of comment
  mark_comment   % mark comment as a region
  format_comment % format (wrap) the comment

Is there already some work done in this region (just to spare double work)?


Regards

Guenter


--
Milde at ife.et.tu-dresden.de


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]