GNU bug report logs -
#54048
29.0.50; Wrong declaration for some align.el defcustom
Previous Next
Reported by: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Thu, 17 Feb 2022 22:38:02 UTC
Severity: normal
Tags: patch
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 54048 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tags 54048 patch
quit
Here's a patch:
[0001-Fix-types-of-some-align.el-defcustoms-Bug-54048.patch (text/x-patch, inline)]
From 381ad6c4cf55c9e74c07cf2c2d361d0fbeee7efc Mon Sep 17 00:00:00 2001
From: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Wed, 16 Feb 2022 20:29:12 -0300
Subject: [PATCH] Fix types of some align.el defcustoms (Bug#54048)
* 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.
---
lisp/align.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/align.el b/lisp/align.el
index 2279c659b4..b054b1bac4 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -160,7 +160,8 @@ align-region-heuristic
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 @@ align-highlight-nochange-face
(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 @@ align-rules-list-type
(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
--
2.17.1
This bug report was last modified 3 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.