bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#72298: Should python-mode-abbrev-table declare :parents python-base-


From: Ship Mints
Subject: bug#72298: Should python-mode-abbrev-table declare :parents python-base-mode-abbrev-table?
Date: Thu, 25 Jul 2024 14:33:03 -0400

An example of a personal hack to make this work could be to add something like this to a python-mode-hook:

(if (derived-mode-p 'python-base-mode)
  (setq local-abbrev-table python-base-mode-abbrev-table))

On Thu, Jul 25, 2024 at 2:15 PM Ship Mints <shipmints@gmail.com> wrote:
I was expecting that python-base-mode-abbrev-table would apply to both python-mode and python-ts-mode buffers. python-ts-mode doesn't derive from python-mode so the abbrev tables aren't shared by default. Unless I'm missing something, using a base table doesn't work for me.

(define-abbrev-table 'python-mode-abbrev-table ()
  "Abbrev table for Python mode."
;; should this:
  :parents (list python-mode-skeleton-abbrev-table))
;; be defined thusly?
  :parents (list python-base-mode-abbrev-table python-mode-skeleton-abbrev-table))

I tried to find guidance on this outside of hacking abbrev tables manually to be shared. Perhaps other people have the same expectation.

Thank you,

Stephane

reply via email to

[Prev in Thread] Current Thread [Next in Thread]