diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f34fb28826f..12557aecf4d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -5913,7 +5913,7 @@ are also searched. REGEXP is passed to `looking-at' to set | |||
| 5913 | (looking-at regexp))))) | 5913 | (looking-at regexp))))) |
| 5914 | 5914 | ||
| 5915 | (defun python-ts-hs-adjust-block-end-fn (block-beg) | 5915 | (defun python-ts-hs-adjust-block-end-fn (block-beg) |
| 5916 | "Python-ts-mode specific `hs-adjust-block-end' function for `hs-minor-mode'. | 5916 | "Python-ts-mode specific `hs-adjust-block-end-function' function. |
| 5917 | 5917 | ||
| 5918 | BLOCK-BEG is the beginning position where the hiding will be performed. | 5918 | BLOCK-BEG is the beginning position where the hiding will be performed. |
| 5919 | 5919 | ||
| @@ -7360,10 +7360,10 @@ implementations: `python-mode' and `python-ts-mode'." | |||
| 7360 | ;; "\\s)". This way parens at end of defun are properly hidden. | 7360 | ;; "\\s)". This way parens at end of defun are properly hidden. |
| 7361 | (setq-local hs-block-end-regexp "") | 7361 | (setq-local hs-block-end-regexp "") |
| 7362 | (setq-local hs-c-start-regexp "#") | 7362 | (setq-local hs-c-start-regexp "#") |
| 7363 | (setq-local hs-forward-sexp-func #'python-hideshow-forward-sexp-function) | 7363 | (setq-local hs-forward-sexp-function #'python-hideshow-forward-sexp-function) |
| 7364 | (setq-local hs-find-block-beginning-func #'python-nav-beginning-of-block) | 7364 | (setq-local hs-find-block-beginning-function #'python-nav-beginning-of-block) |
| 7365 | (setq-local hs-find-next-block-func #'python-hideshow-find-next-block) | 7365 | (setq-local hs-find-next-block-function #'python-hideshow-find-next-block) |
| 7366 | (setq-local hs-looking-at-block-start-p-func #'python-info-looking-at-beginning-of-block) | 7366 | (setq-local hs-looking-at-block-start-predicate #'python-info-looking-at-beginning-of-block) |
| 7367 | 7367 | ||
| 7368 | (setq-local outline-regexp (python-rx (* space) block-start)) | 7368 | (setq-local outline-regexp (python-rx (* space) block-start)) |
| 7369 | (setq-local outline-level | 7369 | (setq-local outline-level |
| @@ -7438,7 +7438,7 @@ implementations: `python-mode' and `python-ts-mode'." | |||
| 7438 | treesit-sexp-thing 'sexp) | 7438 | treesit-sexp-thing 'sexp) |
| 7439 | 7439 | ||
| 7440 | (setq-local hs-treesit-things '(or defun sexp)) | 7440 | (setq-local hs-treesit-things '(or defun sexp)) |
| 7441 | (setq-local hs-adjust-block-end #'python-ts-hs-adjust-block-end-fn) | 7441 | (setq-local hs-adjust-block-end-function #'python-ts-hs-adjust-block-end-fn) |
| 7442 | 7442 | ||
| 7443 | (setq-local syntax-propertize-function #'python--treesit-syntax-propertize) | 7443 | (setq-local syntax-propertize-function #'python--treesit-syntax-propertize) |
| 7444 | 7444 | ||