info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trigger spell checking before sending


From: Emanuel Berg
Subject: Re: Trigger spell checking before sending
Date: Sat, 13 Feb 2016 05:42:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Pietro <pulsarpietro@posteo.net> writes:

> Alternatively I am thinking of writing a function
> which asks the user for the language the ispell
> function should check for, it does not need to
> accept all the languages and for instance I would be
> more than happy to have something like that :
>
> Mini-buffer says: [Which language ?[e : English, i:
> Italian]

I still don't like the idea of having this complicated
a thing in a hook; on the other hand, I just realized
that the code I provided isn't compatible with the
hook solution, so it isn't of any help if you are set
on that idea.

OK, try this, only change the Swedish stuff for
Italian, no?

(defun message-spell-before-send (lang-char)
  (interactive "s(e)nglish or (s)wedish: ")
  (let ((lang (pcase lang-char
                ("e" "american-insane") ; these has to be added outside of Emacs
                ("s" "svenska") )))
    (if lang
        (progn
          (ispell-change-dictionary lang) ; N.B. side-effect - this isn't reset
          (ispell-message) )
      (message "Spelling not done - no support for: %s" lang-char) )))

If you don't want to spell, just hit RET.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]