[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ispell-region with M-$ in transient-mark-mode
From: |
Juri Linkov |
Subject: |
ispell-region with M-$ in transient-mark-mode |
Date: |
Tue, 18 Jan 2005 12:48:09 +0200 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
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.
This change also makes it more convenient to check a region with
a single key `M-$' than with typing `M-x ispell-region'.
Index: lisp/textmodes/ispell.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/ispell.el,v
retrieving revision 1.152
diff -u -r1.152 ispell.el
--- lisp/textmodes/ispell.el 13 Jan 2005 04:33:05 -0000 1.152
+++ lisp/textmodes/ispell.el 18 Jan 2005 10:27:17 -0000
@@ -1454,6 +1464,9 @@
(interactive (list ispell-following-word ispell-quietly current-prefix-arg))
(if continue
(ispell-continue)
+ (if (and (boundp 'transient-mark-mode) transient-mark-mode
+ (boundp 'mark-active) mark-active)
+ (ispell-region (region-beginning) (region-end))
(ispell-accept-buffer-local-defs) ; use the correct dictionary
(let ((cursor-location (point)) ; retain cursor location
(word (ispell-get-word following))
@@ -1538,7 +1551,7 @@
;; NB: Cancels ispell-quit incorrectly if called from ispell-region
(if ispell-quit (setq ispell-quit nil replace 'quit))))
(goto-char cursor-location) ; return to original location
- replace)))
+ replace))))
Another idea is to call ispell-word on each word with the `w' syntax
in the region, but this may have problems as was pointed out in
the recent discussion.
--
Juri Linkov
http://www.jurta.org/emacs/
- ispell-region with M-$ in transient-mark-mode,
Juri Linkov <=
- Re: ispell-region with M-$ in transient-mark-mode, David Kastrup, 2005/01/18
- Re: ispell-region with M-$ in transient-mark-mode, Eli Zaretskii, 2005/01/18
- Re: ispell-region with M-$ in transient-mark-mode, Juri Linkov, 2005/01/18
- Re: ispell-region with M-$ in transient-mark-mode, Eli Zaretskii, 2005/01/19
- Re: ispell-region with M-$ in transient-mark-mode, Juri Linkov, 2005/01/19
- Re: ispell-region with M-$ in transient-mark-mode, Kim F. Storm, 2005/01/19
- Re: ispell-region with M-$ in transient-mark-mode, Eli Zaretskii, 2005/01/19
- Re: ispell-region with M-$ in transient-mark-mode, Luc Teirlinck, 2005/01/19
- Re: ispell-region with M-$ in transient-mark-mode, Kim F. Storm, 2005/01/19