unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] When spell binary not found, point to ispell
@ 2008-01-09  4:31 Michael Olson
  2008-01-09 14:31 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Olson @ 2008-01-09  4:31 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1462 bytes --]

After receiving a bug report about the spell command not being found, I
wanted a nice way of redirecting new users towards ispell, which is more
likely installed on their systems.

What do others think?

2008-01-09  Michael Olson  <mwolson@gnu.org>

	* textmodes/spell.el (spell-region): If spell-command is not
	found, display a warning that suggests using the more
	commonly-used ispell library instead.  This helps new users out.

diff --git a/lisp/textmodes/spell.el b/lisp/textmodes/spell.el
index e8e085d..1ab9f3b 100644
--- a/lisp/textmodes/spell.el
+++ b/lisp/textmodes/spell.el
@@ -85,6 +85,13 @@ Used in a program, applies from START to END.
 DESCRIPTION is an optional string naming the unit being checked:
 for example, \"word\"."
   (interactive "r")
+  (unless (executable-find spell-command)
+    (display-warning 'spell
+		     (concat (format "Program `%s' not found.\n" spell-command)
+			     "\nYou may want to use the `ispell' commands"
+			     " (ispell-word, ispell-buffer) instead.\n")
+		     :error)
+    (error "Program `%s' not found" spell-command))
   (let ((filter spell-filter)
 	(buf (get-buffer-create " *temp*")))
     (save-excursion

-- 
       Michael Olson -- FSF Associate Member #652     |
 http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
          Programmer -- Hobbies: Lisp, HCoop          | |_] | \| |_|
Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] When spell binary not found, point to ispell
  2008-01-09  4:31 [PATCH] When spell binary not found, point to ispell Michael Olson
@ 2008-01-09 14:31 ` Richard Stallman
  2008-01-09 15:12   ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2008-01-09 14:31 UTC (permalink / raw)
  To: Michael Olson; +Cc: emacs-devel

    After receiving a bug report about the spell command not being found, I
    wanted a nice way of redirecting new users towards ispell, which is more
    likely installed on their systems.

Your patch is a good idea.  But I wonder if we should go even further,
such as mark these spell.el commands obsolete, or make them aliases
for ispell.el commands.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] When spell binary not found, point to ispell
  2008-01-09 14:31 ` Richard Stallman
@ 2008-01-09 15:12   ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2008-01-09 15:12 UTC (permalink / raw)
  To: rms; +Cc: Michael Olson, emacs-devel

>     After receiving a bug report about the spell command not being found, I
>     wanted a nice way of redirecting new users towards ispell, which is more
>     likely installed on their systems.

> Your patch is a good idea.  But I wonder if we should go even further,
> such as mark these spell.el commands obsolete, or make them aliases
> for ispell.el commands.

Indeed, I was thinking that spell.el should be moved to the `obsolete' subdir.


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-09 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-09  4:31 [PATCH] When spell binary not found, point to ispell Michael Olson
2008-01-09 14:31 ` Richard Stallman
2008-01-09 15:12   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).