LINUX.ORG.RU

Emacs стал слишком умным и по дефолту открывает юникодный текст с кириллицей в fundamental-mode

 , ,


0

1

Собственно, сабж. А я-то думаю чего это у меня проверка орфографии куда-то пропадать стала...

Полез возвращать и... Додебажился до того, что обратил внимание на режим, в котором открывается текстовый файл. Проверка орфографии для text-mode, а не для fundamental-mode, для которого принципиально отсутствуют хуки.

В итоге пришлось прописывать

(setq-default major-mode 'text-mode)

ЗЫ. Версия Emacs'а, если что:

GNU Emacs 29.3 (build 1, x86_64-alt-linux-gnu, GTK+ Version 3.24.32, cairo version 1.16.0)

★★★★★

Ответ на: комментарий от cobold

Every buffer possesses a major mode, which determines the editing behavior of Emacs while that buffer is current. The mode line normally shows the name of the current major mode, in parentheses (see The Mode Line).

The least specialized major mode is called Fundamental mode. This mode has no mode-specific redefinitions or variable settings, so that each Emacs command behaves in its most general manner, and each user option variable is in its default state.

For editing text of a specific type that Emacs knows about, such as Lisp code or English text, you typically use a more specialized major mode, such as Lisp mode or Text mode. Most major modes fall into three major groups. The first group contains modes for normal text, either plain or with mark-up. It includes Text mode, HTML mode, SGML mode, TeX mode and Outline mode. The second group contains modes for specific programming languages. These include Lisp mode (which has several variants), C mode, Fortran mode, and others. The third group consists of major modes that are not associated directly with files; they are used in buffers created for specific purposes by Emacs. Examples include Dired mode for buffers made by Dired (see Dired, the Directory Editor), Message mode for buffers made by C-x m (see Sending Mail), and Shell mode for buffers used to communicate with an inferior shell process (see Interactive Subshell).

Usually, the major mode is automatically set by Emacs, when you first visit a file or create a buffer (see Choosing File Modes).

https://www.gnu.org/software/emacs/manual/html_node/emacs/Major-Modes.html

saahriktu ★★★★★
() автор топика