all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: k.stevens@ieee.org, ispell-el-bugs@itcorp.com, emacs-devel@gnu.org
Subject: Re: ispell-region with M-$ in transient-mark-mode
Date: Wed, 19 Jan 2005 02:33:19 +0200	[thread overview]
Message-ID: <87651u6w4g.fsf@jurta.org> (raw)
In-Reply-To: <01c4fd95$Blat.v2.2.2$b13f8120@zahav.net.il> (Eli Zaretskii's message of "Tue, 18 Jan 2005 21:40:21 +0200")

"Eli Zaretskii" <eliz@gnu.org> writes:
>> From: Juri Linkov <juri@jurta.org>
>> 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
http://www.jurta.org/emacs/

  reply	other threads:[~2005-01-19  0:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-18 10:48 ispell-region with M-$ in transient-mark-mode Juri Linkov
2005-01-18 11:42 ` David Kastrup
2005-01-19  0:28   ` Juri Linkov
2005-01-18 19:40 ` Eli Zaretskii
2005-01-19  0:33   ` Juri Linkov [this message]
2005-01-19  4:46     ` Eli Zaretskii
2005-01-19  7:46       ` Juri Linkov
2005-01-19  9:06         ` Kim F. Storm
2005-01-19 18:02           ` Eli Zaretskii
2005-01-19 21:30           ` Luc Teirlinck
2005-01-19 22:03             ` Kim F. Storm
2005-01-20  0:19               ` Luc Teirlinck
2005-01-20  8:18                 ` Kim F. Storm
2005-01-20  8:45                   ` David Kastrup
2005-01-20  9:44                     ` Kim F. Storm
2005-01-21  8:34                     ` Kai Großjohann
2005-01-19 17:58         ` Eli Zaretskii
2005-01-20  0:40           ` Luc Teirlinck
2005-01-20 21:32           ` Richard Stallman
2005-01-20 22:00             ` Geoff Kuenning
2005-01-20 22:17               ` David Kastrup
2005-01-20 22:23                 ` Geoff Kuenning
2005-01-20 23:11                   ` Luc Teirlinck
2005-01-21 16:26                     ` Eli Zaretskii
2005-01-22  2:53                       ` Richard Stallman
2005-01-20 22:43               ` Luc Teirlinck
2005-01-20 22:36             ` Han Boetes
2005-01-21 20:10               ` Richard Stallman
2005-01-21 20:44                 ` Han Boetes
2005-01-21 21:25                 ` Luc Teirlinck
2005-01-20  2:14   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87651u6w4g.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=ispell-el-bugs@itcorp.com \
    --cc=k.stevens@ieee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.