mhayashi1120 / Emacs-langtool

LanguageTool for Emacs
GNU General Public License v3.0
378 stars 31 forks source link

Use a buffer-local variable for the buffer’s language #65

Closed Phundrak closed 1 year ago

Phundrak commented 2 years ago

When working on multiple documents that are not necessarily in the same language, it would be much more comfortable to have the current dictionary held into a buffer-local variable than a global variable. This would also allow specifying the dictionary to be used as a file variable with something like

-*- langtool-dictionary: en-GB -*-

instead of calling langtool-switch-default-language each time we need to switch from one document to another.

PillFall commented 1 year ago

Hi, I created a fork some years ago due to #48. If you want you can take a look at PillFall/languagetool.el

I notice that time ago as I write documents in three different languages, and it was annoying to change between those every time. My package implement that as well.

mhayashi1120 commented 1 year ago

The following code might work.

-*- langtool-default-language: en-GB -*-

Some text contents.

# I have several years absent about Emacs-Lisp (and LanguageTool), sorry if there is misunderstanding.

@PillFall Sorry I haven't been able to react properly over the years. I'm rereading an old issue a bit, but I'd like to take this opportunity to apologize.