GNU bug report logs -
#21501
new Emacs functions for capitalizing text intelligently
Previous Next
Reported by: Zachary Kanfer <zkanfer <at> gmail.com>
Date: Thu, 17 Sep 2015 04:33:02 UTC
Severity: wishlist
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 21501 <at> debbugs.gnu.org (full text, mbox):
> From: Zachary Kanfer <zkanfer <at> gmail.com>
> Date: Sun, 20 Sep 2015 02:13:39 -0400
> Cc: 21501 <at> debbugs.gnu.org
>
> Here's a changed patch.
Thanks. Allow me a couple of minor comments.
> I'm in favor of changing M-u, M-l, and M-c to the new commands; I think it's
> much improved behavior. The only time a user would have to do more work to
> perform a capitalization action is if they've selected a region, but want to
> act only on the next word. I would bet that's rare, and even so, the user only
> has to press C-g before the capitalization. So if we're ok changing default
> commands, I think changing M-u, M-l, and M-c is a win.
For us to be able to bind M-u etc. to these new commands, they need to
support the prefix argument to upcase-word etc. The way you wrote
these new commands, that feature will be lost.
> +;;; Functions relating to capitalization that Do What I Mean
> +(defun upcase-dwim ()
> + "Call the upcase command you want (Do What I Mean).
> +If the region is active, call `upcase-region'. Otherwise call
> +`upcase-word'."
Every doc string should state the effect of the function/variable in
its first line, because some Help commands (like 'apropos') show only
the first line. The above doc string (and the others in your patch)
don't do that; the effect is only clear if one reads the rest of the
doc string.
I suggest to change the doc strings like this:
Upcase words in the region, if active; otherwise upcase word at point.
If the region is active, this function calls `upcase-region'.
Otherwise it calls `upcase-word'.
This bug report was last modified 9 years and 319 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.