diff options
| -rw-r--r-- | oni-php/oni-php.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/oni-php/oni-php.el b/oni-php/oni-php.el index 1eebc29..630e4bc 100644 --- a/oni-php/oni-php.el +++ b/oni-php/oni-php.el @@ -126,9 +126,10 @@ Do the insert N times." Otherwise call FUNC with ARGS. This is meant as advice around ‘comment-dwim’ to make it smarter for PHP code." (if (and (derived-mode-p 'php-mode) - (looking-back (rx blank) (line-beginning-position)) + (looking-back (rx (minimal-match (zero-or-more blank))) (line-beginning-position)) (looking-at (rx (minimal-match (zero-or-more (any whitespace "\n"))) - (regexp php-beginning-of-defun-regexp)))) + (or (regexp php-beginning-of-defun-regexp) + (regexp php--re-classlike-pattern))))) (oni-php-doc-comment) (apply func args))) |
