[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] When spell binary not found, point to ispell
From: |
Michael Olson |
Subject: |
[PATCH] When spell binary not found, point to ispell |
Date: |
Tue, 08 Jan 2008 23:31:06 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
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 <address@hidden>
* 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 |
pgpwavfUk0J7E.pgp
Description: PGP signature
- [PATCH] When spell binary not found, point to ispell,
Michael Olson <=