I would like for all my text-based modes (org, markdown, message, mu4e-compose, etc) to use a single abbrev-table, and especially, to add new abbrevs to that shared table whenever I'm in one of those modes.
I know that inheritance between modes is possible, and I think something like this should allow one mode to inherit from another:
(defun endless/ispell-word-then-abbrev (p) "Call `ispell-word'. Then create an abbrev for the correction made. With prefix P, create local abbrev. Otherwise it will be global." (interactive "P") (let ((bef (downcase (or (thing-at-point 'word) ""))) aft) (call-interactively 'ispell-word) (setq aft (downcase (or (thing-at-point 'word) ""))) (unless (string= aft bef) (message "\"%s\" now expands to \"%s\" %sally" bef aft (if p "glob" "loc" )) (define-abbrev (if p global-abbrev-table local-abbrev-table) bef aft))) (write-abbrev-file))
So I would really prefer to set
local-abbrev-table to the same table in all those text modes. Is there a good way to do this?