]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Skeletons menu-bar menu in Python modes
authorEli Zaretskii <eliz@gnu.org>
Sat, 20 May 2023 14:56:40 +0000 (17:56 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 20 May 2023 14:56:40 +0000 (17:56 +0300)
* lisp/progmodes/python.el (python-mode, python-ts-mode): Call
'python-skeleton-add-menu-items' here, not in 'python-base-mode',
since the "Python" menu is not yet set up in the latter.
(Bug#63598)

lisp/progmodes/python.el

index f810f1e2164457c0460a70f62cd377189691fb49..6fc05b246a6b530e076c66c8222b334d30db2257 100644 (file)
@@ -6694,8 +6694,6 @@ implementations: `python-mode' and `python-ts-mode'."
 
   (setq-local prettify-symbols-alist python-prettify-symbols-alist)
 
-  (python-skeleton-add-menu-items)
-
   (make-local-variable 'python-shell-internal-buffer)
 
   (add-hook 'flymake-diagnostic-functions #'python-flymake nil t))
@@ -6719,6 +6717,8 @@ implementations: `python-mode' and `python-ts-mode'."
 
   (add-hook 'which-func-functions #'python-info-current-defun nil t)
 
+  (python-skeleton-add-menu-items)
+
   (when python-indent-guess-indent-offset
     (python-indent-guess-indent-offset)))
 
@@ -6745,6 +6745,8 @@ implementations: `python-mode' and `python-ts-mode'."
                 #'python--treesit-defun-name)
     (treesit-major-mode-setup)
 
+    (python-skeleton-add-menu-items)
+
     (when python-indent-guess-indent-offset
       (python-indent-guess-indent-offset))