Stephen J. Turnbull wrote:
Andreas Roehler writes:
> comment-lor.el --comment line-or-region--
I'm sorry, I don't have time to try this out at the moment (I don't
use comment functions much anyway), but I have a couple of remarks.
First, the idea is a good one IMO; most of the comment functions have
a fair amount of DWIM-ishness to them anyway.
Not -lor. It comes with a set of specific functions.
comment-indent-lor
comment-indent-single-lor
comment-indent-span-lor
comment-plain-single-lor
...
etc
dwim then only pertains to line-or-region
but not to start at beginning or comment-column
However, it's possible that some people won't like it.
altogether as it has some bugs still.
Didn't find perfect realisation to fetch line-or-region
Try it inside a let with
(beg (cond (beg beg)
((region-active-p)
(region-beginning))
(t (line-beginning-position))))
(end (cond (end (copy-marker end))
((region-active-p)
(copy-marker (region-end)))
(t (copy-marker (line-end-position))))))
Can't use interactive "r", as it complains if region doesn't
exist. However (region-active-p) seems not reliable.
Any alternatives?
Maybe there
should be a mode to control how much DWIM there is?
see first
In the keywords, I don't think "wp" is appropriate.
Word processors
don't use comments. Should be "languages" (unless GNU have edited
their finder keywords list, in which case we should update).
The use of the suffix "-lor" reads well on a symbol-for-symbol basis,
but "lor-comment-" reads almost as well and is compatible with the
traditional use of prefixes to create pseudo-namespaces. It's also
less confusing when used with functions that don't DWIM line-or-region.
ok, I'll change that
I'm not sure what you want to do with this. Replace newcomment
entirely? Merge it into newcomment?
See it rather as an alternative. It's faster with one line, offers copying it.
Also commenting two or three line via repeat is faster and needs less attention than
selecting the region.
But: Has some bugs with region. newcomments dwim works more reliable on the region still.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta