From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: ispell-region with M-$ in transient-mark-mode Date: Wed, 19 Jan 2005 02:33:19 +0200 Organization: JURTA Message-ID: <87651u6w4g.fsf@jurta.org> References: <87zmz7m2qr.fsf@jurta.org> <01c4fd95$Blat.v2.2.2$b13f8120@zahav.net.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106099254 17748 80.91.229.6 (19 Jan 2005 01:47:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Jan 2005 01:47:34 +0000 (UTC) Cc: k.stevens@ieee.org, ispell-el-bugs@itcorp.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 19 02:47:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cr4wR-0002gA-00 for ; Wed, 19 Jan 2005 02:47:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cr58N-0005M7-Bx for ged-emacs-devel@m.gmane.org; Tue, 18 Jan 2005 20:59:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cr56k-0004lY-HQ for emacs-devel@gnu.org; Tue, 18 Jan 2005 20:58:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cr56d-0004go-Pb for emacs-devel@gnu.org; Tue, 18 Jan 2005 20:58:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cr56d-0004fL-Hf for emacs-devel@gnu.org; Tue, 18 Jan 2005 20:57:59 -0500 Original-Received: from [194.126.101.111] (helo=MXR-1.estpak.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cr4oo-0004al-CI; Tue, 18 Jan 2005 20:39:35 -0500 Original-Received: from mail.neti.ee (80-235-33-91-dsl.mus.estpak.ee [80.235.33.91]) by MXR-1.estpak.ee (Postfix) with ESMTP id CFCBB151881; Wed, 19 Jan 2005 03:39:30 +0200 (EET) Original-To: Eli Zaretskii 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") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32358 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32358 "Eli Zaretskii" writes: >> From: Juri Linkov >> 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/