From 026549eff77b8c17a879d186962ed5907f2211d4 Mon Sep 17 00:00:00 2001 From: kj Date: Fri, 14 Apr 2023 22:39:15 -0400 Subject: [PATCH] Fix conflict with vs-comment-return-mode and php-doc-block. --- configs/lang-php.el | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/configs/lang-php.el b/configs/lang-php.el index 45f09f0..6f140e5 100644 --- a/configs/lang-php.el +++ b/configs/lang-php.el @@ -12,10 +12,19 @@ (use-package php-mode :defer t :straight t - :hook ((php-mode . (lambda () - (local-set-key (kbd "C-c d b") 'php-doc-block) ;; atajo para docblock - )) - ) + :bind ("C-c d b" . kj/php-doc-block) + :config + (defun kj/php-doc-block () + "Llama a \"php-dock-block\", sin conflicto con \"vs-comment-return-mode\"." + (interactive) + (if (bound-and-true-p vs-comment-return-mode) + (funcall (lambda() + (vs-comment-return-mode -1) + (php-doc-block) + (vs-comment-return-mode 1))) + (php-doc-block) + ) + ) ) (use-package php-doc-block