Have noticed that abbrev-mode
only works for the current buffer. Thus using the following configuration does not enable abbrev-mode when I load an org-mode
file.
(require 'toro)
(toro-abbrev)
Here is the file that provides the toro-abbrev
feature.
(defconst tablet2
'( ("is" "s") ("it" "t") ("know" "no")
("like" "lk") ("little" "ll") ("more" "mo")
(defun toro-abbrev ()
"Enables words to be expanded as one types."
(interactive)
(abbrev-mode 1)
(kill-all-abbrevs)
(define-abbrev-table 'global-abbrev-table tablet2))
(provide 'toro)
How could I turn on abbrev-mode
globally or for buffers with a specific major mode?
abbrev
but for the major-mode part of the question (which I added - you are welcome!), you use the major-mode hook.(add-hook 'org-mode-hook #'abbrev-mode)
. But then how can I disable?(M-x abbrev-mode)
?