diff options
| author | 2026-03-09 16:45:50 -0700 | |
|---|---|---|
| committer | 2026-03-09 16:50:31 -0700 | |
| commit | ba9102ed1b484bb9e30ff48008da5cbb14b2de8d (patch) | |
| tree | c2dfea0ea3fada18fbdbcb5f89643a7a5414f51e /oni-php | |
| parent | 48a4ac764474a79c21fedca449903a45947e68a6 (diff) | |
| download | emacs-config-ba9102ed1b484bb9e30ff48008da5cbb14b2de8d.tar.gz emacs-config-ba9102ed1b484bb9e30ff48008da5cbb14b2de8d.zip | |
oni-php: oni-php-comment-dwim: Require inactive region
If the region is active, don't try to be smart about what to insert, just do the
normal ‘comment-dwim’.
Diffstat (limited to 'oni-php')
| -rw-r--r-- | oni-php/oni-php.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/oni-php/oni-php.el b/oni-php/oni-php.el index fd12545..f910d23 100644 --- a/oni-php/oni-php.el +++ b/oni-php/oni-php.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 2026.0209.115456 +;; Version: 2026.0306.123604 ;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-hydra oni-smartparens ggtags fic-mode company-php rainbow-delimiters rainbow-identifiers) ;; This program is free software; you can redistribute it and/or modify @@ -134,6 +134,7 @@ 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) + (not (region-active-p)) (looking-back (rx (minimal-match (zero-or-more blank))) (line-beginning-position)) (looking-at (rx (minimal-match (zero-or-more (any whitespace "\n"))) (or (regexp php-beginning-of-defun-regexp) |
