Change scope of +spell/add-word with universal arg

C-u +spell/add-word -> add word for current buffer
C-u C-u +spell/add-word -> add word for session buffer
This commit is contained in:
Henrik Lissner 2020-09-02 14:07:22 -04:00
parent 3963b83e2a
commit b0cd0e5efe
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -35,7 +35,11 @@ SCOPE can be `buffer' or `session' to exclude words only from the current buffer
or session. Otherwise, the addition is permanent."
(interactive
(list (progn (require 'flyspell)
(flyspell-get-word))))
(flyspell-get-word))
(cond ((equal current-prefix-arg '(16))
'session)
((equal current-prefix-arg '(4))
'buffer))))
(require 'flyspell)
(cond
((null scope)