unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ispell single word
@ 2019-02-17  7:15 Emanuel Berg
  2019-02-17 15:33 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Emanuel Berg @ 2019-02-17  7:15 UTC (permalink / raw)
  To: emacs-devel

How do I spell a single word, from Lisp, with
ispell? (Indeed, how do ispell with ispell...)

I just wrote this. It does seem to work but the
code looks - well, like something you are not
supposed to understand!

(require 'ispell)

(defun spell-one-word (word)
  (with-temp-buffer
    (save-excursion
      (insert word) )
    (condition-case nil
        (not (ispell-word))
      (error nil)
      )))
;; (spell-one-word "length") ; t
;; (spell-one-word "lenght") ; nil

But I guess I like it fine - so far.

More on this:

    http://user.it.uu.se/~embe8573/emacs-init/spell-new.el

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

end of thread, other threads:[~2019-02-17 19:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-17  7:15 ispell single word Emanuel Berg
2019-02-17 15:33 ` Eli Zaretskii
2019-02-17 16:36   ` Emanuel Berg
2019-02-17 18:58     ` Eli Zaretskii
2019-02-17 19:27       ` Emanuel Berg

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).