[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/php-mode e515cc9d0e 10/13: Merge pull request #739 from em
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/php-mode e515cc9d0e 10/13: Merge pull request #739 from emacs-php/apply-monnier-patch |
Date: |
Mon, 10 Apr 2023 10:03:18 -0400 (EDT) |
branch: elpa/php-mode
commit e515cc9d0e9202278df7e0ec7c93c745b1f9172e
Merge: 1e4e93c805 9e952d47a9
Author: USAMI Kenta <tadsan@pixiv.com>
Commit: GitHub <noreply@github.com>
Merge pull request #739 from emacs-php/apply-monnier-patch
Apply Stefan Monnier's patch (2)
---
lisp/php-mode.el | 26 +++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index aff188f5e9..cabb11cb09 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -365,7 +365,7 @@ as a function. Call with AS-NUMBER keyword to compare by
`version<'.
;; Use the Emacs standard indentation binding. This may upset c-mode
;; which does not follow this at the moment, but I see no better
;; choice.
- (define-key map [tab] 'indent-for-tab-command)
+ (define-key map "\t" nil) ;Hide CC-mode's `TAB' binding.
map)
"Keymap for `php-mode'.")
@@ -1080,13 +1080,7 @@ Borrow the `interactive-form' from `c-set-style' and use
the original
`c-set-style' function to set all declared stylevars.
For compatibility with `c-set-style' pass DONT-OVERRIDE to it.
-After setting the stylevars run hooks according to STYLENAME
-
- \"pear\" `php-mode-pear-hook'
- \"drupal\" `php-mode-drupal-hook'
- \"wordpress\" `php-mode-wordpress-hook'
- \"symfony2\" `php-mode-symfony2-hook'
- \"psr2\" `php-mode-psr2-hook'"
+After setting the stylevars run hook `php-mode-STYLENAME-hook'."
(interactive
(list (let ((completion-ignore-case t)
(prompt (format "Which %s indentation style? "
@@ -1110,15 +1104,10 @@ After setting the stylevars run hooks according to
STYLENAME
;; Restore variables
(cl-loop for (name . value) in backup-vars
do (set (make-local-variable name) value)))
-
- (if (eq (symbol-value 'php-style-delete-trailing-whitespace) t)
- (add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
- (remove-hook 'before-save-hook 'delete-trailing-whitespace t))
- (cond ((equal stylename "pear") (run-hooks 'php-mode-pear-hook))
- ((equal stylename "drupal") (run-hooks 'php-mode-drupal-hook))
- ((equal stylename "wordpress") (run-hooks 'php-mode-wordpress-hook))
- ((equal stylename "symfony2") (run-hooks 'php-mode-symfony2-hook))
- ((equal stylename "psr2") (run-hooks 'php-mode-psr2-hook))))
+ (if (eq php-style-delete-trailing-whitespace t)
+ (add-hook 'before-save-hook #'delete-trailing-whitespace nil t)
+ (remove-hook 'before-save-hook #'delete-trailing-whitespace t))
+ (run-hooks (intern (format "php-mode-%s-hook" stylename))))
(defun php-mode--disable-delay-set-style (&rest _args)
"Disable `php-mode-set-style-delay' on after hook. ARGS be ignore."
@@ -1143,8 +1132,7 @@ After setting the stylevars run hooks according to
STYLENAME
"Reset PHP-irrelevant variables set by Cc Mode initialization."
(setq-local c-mode-hook nil)
(setq-local java-mode-hook nil)
- (when (eval-when-compile (boundp 'flymake-diagnostic-functions))
- (remove-hook 'flymake-diagnostic-functions 'flymake-cc t))
+ (remove-hook 'flymake-diagnostic-functions 'flymake-cc t)
t)
(defvar php-mode-syntax-table
- [nongnu] elpa/php-mode updated (47e0813079 -> 9896cccd64), ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode ca7485696f 02/13: Merge pull request #738 from emacs-php/fix/cask-source, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode dfec538042 03/13: Remove unnecessary :group 'php-mode from defcustom, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode 1e4e93c805 06/13: Merge pull request #737 from emacs-php/apply-monnier-patch, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode 06763946a0 08/13: Simplify code for style-specific hooks, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode e45117f0e2 05/13: Properly quote symbols in documentation strings, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode 9a5ace8c95 07/13: Hide CC-mode's `TAB' binding, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode e515cc9d0e 10/13: Merge pull request #739 from emacs-php/apply-monnier-patch,
ELPA Syncer <=
- [nongnu] elpa/php-mode 4b03e9b956 12/13: Use syntax-propertize-precompile-rules for php-syntax-propertize-function, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode 9896cccd64 13/13: Merge pull request #740 from emacs-php/apply-monnier-patch, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode 2f9fa61516 04/13: Replace function name with #'function-form instead of 'symbol, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode 65b8db569e 11/13: Fixed incorrect use of 'local' (nonexistent) advice, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode f8913f9a5f 01/13: Add GNU ELPA (gnu) to Cask source, ELPA Syncer, 2023/04/10
- [nongnu] elpa/php-mode 9e952d47a9 09/13: Remove unnecessary boundp guards from remove-hook call, ELPA Syncer, 2023/04/10