@@ -3260,15 +3260,6 @@ display the current class and method instead."
32603260 " ^\\ s-*[uU]?[rR]?\"\"\"\n ?\\ s-*"
32613261 " Version of `hs-block-start-regexp' for docstrings." )
32623262
3263- ; ; Herlpers
3264- (defun elpy-info-docstring-p (&optional syntax-ppss )
3265- " Return non-nil if point is in a docstring."
3266- (save-excursion
3267- (and (progn (python-nav-beginning-of-statement )
3268- (looking-at " \\ (\" \\ |'\\ )" ))
3269- (progn (forward-line -1 )
3270- (beginning-of-line )
3271- (python-info-looking-at-beginning-of-defun )))))
32723263; ; Indicators
32733264(defun elpy-folding--display-code-line-counts (ov )
32743265 " Display a folded region indicator with the number of folded lines.
@@ -3415,11 +3406,11 @@ docstring body."
34153406 " Hide the docstring at point."
34163407 (hs-life-goes-on
34173408 (let ((hs-block-start-regexp elpy-docstring-block-start-regexp))
3418- (when (and (elpy -info-docstring-p) (not (hs-already-hidden-p )))
3409+ (when (and (python -info-docstring-p) (not (hs-already-hidden-p )))
34193410 (let (beg end line-beg line-end)
34203411 ; ; Get first doc line
34213412 (if (not (save-excursion (forward-line -1 )
3422- (elpy -info-docstring-p)))
3413+ (python -info-docstring-p)))
34233414 (setq beg (line-beginning-position ))
34243415 (forward-line -1 )
34253416 (end-of-line )
@@ -3432,7 +3423,7 @@ docstring body."
34323423 (setq line-beg (line-number-at-pos ))
34333424 ; ; Get last line
34343425 (if (not (save-excursion (forward-line 1 )
3435- (elpy -info-docstring-p)))
3426+ (python -info-docstring-p)))
34363427 (progn
34373428 (setq end (line-end-position ))
34383429 (setq line-end (line-number-at-pos )))
@@ -3447,7 +3438,7 @@ docstring body."
34473438 " Show docstring at point."
34483439 (hs-life-goes-on
34493440 (let ((hs-block-start-regexp elpy-docstring-block-start-regexp))
3450- (when (elpy -info-docstring-p)
3441+ (when (python -info-docstring-p)
34513442 (hs-show-block )))))
34523443
34533444(defvar-local elpy-folding-docstrings-hidden nil
@@ -3464,7 +3455,7 @@ docstring body."
34643455 (while (python-nav-forward-defun )
34653456 (search-forward-regexp " )\\ s-*:" nil t )
34663457 (forward-line )
3467- (when (and (elpy -info-docstring-p)
3458+ (when (and (python -info-docstring-p)
34683459 (progn
34693460 (beginning-of-line )
34703461 (search-forward-regexp elpy-folding-docstring-regex
@@ -3577,18 +3568,19 @@ If a region is selected, fold that region."
35773568 (elpy-folding--hide-region (region-beginning ) (region-end ))
35783569 ; ; Adapt starting regexp if on a docstring
35793570 (let ((hs-block-start-regexp
3580- (if (elpy -info-docstring-p)
3571+ (if (python -info-docstring-p)
35813572 elpy-docstring-block-start-regexp
35823573 hs-block-start-regexp)))
35833574 ; ; Hide or fold
35843575 (cond
35853576 ((hs-already-hidden-p )
35863577 (hs-show-block ))
3587- ((elpy -info-docstring-p)
3578+ ((python -info-docstring-p)
35883579 (elpy-folding--hide-docstring-at-point))
35893580 (t
35903581 (hs-hide-block ))))))))
35913582
3583+
35923584; ;;;;;;;;;;;;;;;;;;
35933585; ;; Module: Flymake
35943586
0 commit comments