[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ispell-region with M-$ in transient-mark-mode

From: Juri Linkov
Subject: Re: ispell-region with M-$ in transient-mark-mode
Date: Wed, 19 Jan 2005 02:33:19 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

"Eli Zaretskii" <address@hidden> writes:
>> From: Juri Linkov <address@hidden>
>> When a region is active in Transient Mark mode, typing M-$
>> unexpectedly checks only one word, and quits.  What is more natural
>> to do in such case is to call `ispell-region' on a selected region.
> I don't like such a reinterpretation of a word-related command: it's
> counterintuitive.  It is okay to do that with commands that by default
> work on the whole buffer, but not with commands that work on a word.

It's very intuitive to work on the active region when the user has
explicitly selected it in Transient Mark mode.

I suggested to add this to `ispell-word' because M-$ is only one
keybinding available to active ispell.  So typing M-$ is more
convenient than to execute the command `ispell' which also takes care
about calling `ispell-region' instead of `ispell-buffer' when the
region is active in Transient Mark mode.

Another counterargument for adding this to `ispell-word' is that
`ispell-word' already has other non-word semantics: with a prefix
argument it resumes interrupted spell-checking of a buffer or region.
I guess the reason for adding this non-word functionality to `ispell-word'
was to make M-$ to do more useful things.

> Do we even have other *-word commands that modify their behavior in
> such a way?

`C-h a -word$' displays not too many word-related commands.
Among them there are few that change the word under point:

upcase-word                   M-u
downcase-word                 M-l
kill-word                     M-d

But there is no need to modify their behavior for active regions
in Transient Mark mode because there already exist keybindings to
their corresponding region commands:

upcase-region                 C-x C-u
downcase-region               C-x C-l
kill-region                   C-w

There is one word-related command that has no keybinding for its
region equivalent:

capitalize-word               M-c

but perhaps there is no need to modify it because this is very rarely
used command.

>From all other commands I also have encountered three commands that
operate on non-word parts of the buffer and have no keybindings for
their region equivalents.  These commands are `fill-paragraph' (`M-q'),
`eval-last-sexp' (`C-x C-e') and `eval-defun' (`C-M-x').  I suggest to
modify them to call `fill-region' and `eval-region' when a region is
active in Transient Mark mode.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]