From: Yuan Fu Date: Wed, 5 Oct 2022 21:22:03 +0000 (-0700) Subject: Merge branch 'master' into feature/tree-sitter X-Git-Tag: emacs-29.0.90~1856 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ebbd4efc3d45403cf845d35c36c21756baeeba8;p=emacs.git Merge branch 'master' into feature/tree-sitter --- 7ebbd4efc3d45403cf845d35c36c21756baeeba8 diff --cc lisp/progmodes/python.el index b498baec608,80c5b31b6ea..801432cd188 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@@ -245,9 -261,10 +261,12 @@@ (require 'ansi-color) (require 'cl-lib) (require 'comint) +(eval-when-compile (require 'subr-x)) ;For `string-empty-p' and `string-join'. +(require 'treesit) +(require 'pcase) + (require 'compat nil 'noerror) + (require 'project nil 'noerror) + (require 'seq) -(eval-when-compile (require 'subr-x)) ;For `string-empty-p'. ;; Avoid compiler warnings (defvar compilation-error-regexp-alist) @@@ -267,12 -284,13 +286,20 @@@ :version "24.3" :link '(emacs-commentary-link "python")) +(defcustom python-use-tree-sitter nil + "If non-nil, `python-mode' tries to use tree-sitter. +Currently `python-mode' uses tree-sitter for font-locking, imenu, +and movement functions." + :type 'boolean) + + (defcustom python-interpreter "python" + "Python interpreter for noninteractive use. + To customize the Python shell, modify `python-shell-interpreter' + instead." + :version "29.1" + :type 'string) + ++ ;;; Bindings