[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: jinx
From: |
Emanuel Berg |
Subject: |
Re: jinx |
Date: |
Wed, 05 Apr 2023 10:15:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Arash Esbati wrote:
>> Another idea is, text-within-code-flyspell-mode.
>
> ispell.el has `ispell-comments-and-strings', so I'd suggest
> `flyspell-comments-and-strings-mode'.
Can any of them spell a single word? If not, here is code
for that.
(defun spell-word (word)
(with-temp-buffer
(save-excursion
(insert word) )
(condition-case nil
(not (ispell-word))
(error nil) )))
;; (spell-word "length") ; t
;; (spell-word "lenght") ; nil
(defun spell-this-word (dict)
"`ispell-word' the word with DICT."
(ispell-change-dictionary dict)
(ispell-word) )
(let ((eng-dict "american-insane"))
(defun spell-english ()
(interactive)
(spell eng-dict) )
(defun word ()
(interactive)
(spell-this-word eng-dict) ))
;; test: hello / hxlle
(let ((swe-dict "svenska"))
(defun spell-swedish ()
(interactive)
(spell swe-dict) )
(defun ord ()
(interactive)
(spell-this-word swe-dict) ))
;; test: hej / hxj
Full source:
https://dataswamp.org/~incal/emacs-init/spell.el
--
underground experts united
https://dataswamp.org/~incal
- Re: jinx, (continued)
- Re: jinx, Michael Heerdegen, 2023/04/04
- Re: jinx, Richard Stallman, 2023/04/04
- Re: jinx, Philip Kaludercic, 2023/04/05
- Re: jinx, Michael Heerdegen, 2023/04/05
- Re: jinx, Michael Heerdegen, 2023/04/05
- Re: jinx, Eli Zaretskii, 2023/04/05
- Re: jinx, Michael Heerdegen, 2023/04/05
- Re: jinx, Richard Stallman, 2023/04/04
- Re: jinx, Po Lu, 2023/04/05
- Re: jinx, Arash Esbati, 2023/04/05
- Re: jinx,
Emanuel Berg <=
- Re: jinx, Lynn Winebarger, 2023/04/01
Re: jinx, Augusto Stoffel, 2023/04/01
Re: jinx, Augusto Stoffel, 2023/04/01
Re: jinx, Augusto Stoffel, 2023/04/01
Re: jinx, Emanuel Berg, 2023/04/01