Skip to content

Commit 06c68d8

Browse files
committed
Add php-project-align-lines variable
1 parent b3b6138 commit 06c68d8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

php-align.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
;;; Code:
4343
(require 'align)
4444
(require 'regexp-opt)
45+
(require 'php-project)
4546

4647
(defvar php-align-rules-list
4748
`((php-comma-delimiter
@@ -105,7 +106,8 @@
105106
;;;###autoload
106107
(defun php-align-setup ()
107108
"Setup alignment configuration for PHP code."
108-
(php-align-mode 1))
109+
(when php-project-align-lines
110+
(php-align-mode 1)))
109111

110112
(defvar php-align-mode-lighter " PHP-Align")
111113

php-project.el

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ defines constants, and sets the class loaders.")
152152
Typically it is `pear', `drupal', `wordpress', `symfony2' and `psr2'.")
153153
(put 'php-project-coding-style 'safe-local-variable #'symbolp)
154154

155+
(defvar-local php-project-align-lines t
156+
"If T, automatically turn on `php-align-mode' by `php-align-setup'.")
157+
(put 'php-project-align-lines 'safe-local-variable #'booleanp)
158+
155159
(defvar-local php-project-php-file-as-template 'auto
156160
"
157161
`auto' (default)

0 commit comments

Comments
 (0)