summaryrefslogtreecommitdiff
path: root/lisp/align.el
diff options
context:
space:
mode:
authorMauro Aranda <maurooaranda@gmail.com>2022-02-19 13:34:11 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-02-19 13:34:11 +0100
commitf273a504be670d714fe46a067e5edba548443701 (patch)
tree7a728f7c6d1afc7599f7b53c7395ad7d2d5b2347 /lisp/align.el
parent8ccf9b52767c7634af1941c15198538313aaf2c0 (diff)
downloademacs-f273a504be670d714fe46a067e5edba548443701.tar.gz
emacs-f273a504be670d714fe46a067e5edba548443701.tar.bz2
emacs-f273a504be670d714fe46a067e5edba548443701.zip
Fix types of some align.el defcustoms
* lisp/align.el (align-region-heuristic) (align-large-region): Both options can be nil, but the defcustom type didn't allow nil values. (align-rules-list-type): The "Run If" and "Valid" attributes should be functions, but the default value was t. Change it to #'always (bug#54048).
Diffstat (limited to 'lisp/align.el')
-rw-r--r--lisp/align.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/align.el b/lisp/align.el
index 2279c659b43..b054b1bac47 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -160,7 +160,8 @@ string), this heuristic is used to determine how far before and after
point we should search in looking for a region separator. Larger
values can mean slower performance in large files, although smaller
values may cause unexpected behavior at times."
- :type 'integer
+ :type '(choice (const :tag "Don't use heuristic when aligning a region" nil)
+ integer)
:group 'align)
(defcustom align-highlight-change-face 'highlight
@@ -176,7 +177,7 @@ values may cause unexpected behavior at times."
(defcustom align-large-region 10000
"If an integer, defines what constitutes a \"large\" region.
If nil, then no messages will ever be printed to the minibuffer."
- :type 'integer
+ :type '(choice (const :tag "Align a large region silently" nil) integer)
:group 'align)
(defcustom align-c++-modes '(c++-mode c-mode java-mode)
@@ -356,11 +357,11 @@ The possible settings for `align-region-separate' are:
(cons :tag "Valid"
(const :tag "(Return non-nil if rule is valid)"
valid)
- (function :value t))
+ (function :value always))
(cons :tag "Run If"
(const :tag "(Return non-nil if rule should run)"
run-if)
- (function :value t))
+ (function :value always))
(cons :tag "Column"
(const :tag "(Column to fix alignment at)" column)
(choice :value comment-column