1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

Support python-ts-mode in align.el

* lisp/align.el (align-dq-string-modes, align-sq-string-modes)
(align-open-comment-modes, align-rules-list): Use python-base-mode
instead of python-mode.
This commit is contained in:
Stefan Kangas 2023-08-02 09:25:26 +02:00
parent 0de20a595c
commit 8c0e59136a

View File

@ -211,20 +211,20 @@ If nil, then no messages will ever be printed to the minibuffer."
(defcustom align-dq-string-modes
(append align-lisp-modes align-c++-modes align-perl-modes
'(python-mode vhdl-mode))
'(python-base-mode vhdl-mode))
"A list of modes where double quoted strings should be excluded."
:type '(repeat symbol)
:group 'align)
(defcustom align-sq-string-modes
(append align-perl-modes '(python-mode))
(append align-perl-modes '(python-base-mode))
"A list of modes where single quoted strings should be excluded."
:type '(repeat symbol)
:group 'align)
(defcustom align-open-comment-modes
(append align-lisp-modes align-c++-modes align-perl-modes
'(python-mode makefile-mode vhdl-mode))
'(python-base-mode makefile-mode vhdl-mode))
"A list of modes with a single-line comment syntax.
These are comments as in Lisp, which have a beginning, but end with
the line (i.e., `comment-end' is an empty string)."
@ -450,7 +450,7 @@ The possible settings for `align-region-separate' are:
(regexp . ,(concat "[^=!<> \t\n]\\(\\s-*\\)="
"\\(\\s-*\\)\\([^>= \t\n]\\|$\\)"))
(group . (1 2))
(modes . '(python-mode))
(modes . '(python-base-mode))
(tab-stop . nil))
(make-assignment
@ -478,7 +478,7 @@ The possible settings for `align-region-separate' are:
(basic-comma-delimiter
(regexp . ",\\(\\s-*\\)[^# \t\n]")
(repeat . t)
(modes . (append align-perl-modes '(python-mode)))
(modes . (append align-perl-modes '(python-base-mode)))
(run-if . ,(lambda () current-prefix-arg)))
(c++-comment
@ -508,7 +508,7 @@ The possible settings for `align-region-separate' are:
(python-chain-logic
(regexp . "\\(\\s-*\\)\\(\\<and\\>\\|\\<or\\>\\)")
(modes . '(python-mode))
(modes . '(python-base-mode))
(valid . ,(lambda ()
(save-excursion
(goto-char (match-end 2))
@ -525,7 +525,7 @@ The possible settings for `align-region-separate' are:
(basic-line-continuation
(regexp . "\\(\\s-*\\)\\\\$")
(modes . '(python-mode makefile-mode)))
(modes . '(python-base-mode makefile-mode)))
(tex-record-separator
(regexp . ,(lambda (end reverse)