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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54048 in the body.
You can then email your comments to 54048 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54048
; Package
emacs
.
(Thu, 17 Feb 2022 22:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mauro Aranda <maurooaranda <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 17 Feb 2022 22:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Both align-region-heuristic and align-large-region allow for a nil value,
but the defcustom type only declares integer as a valid value.
The align-rules-list takes its type from the align-rules-list-type
variable, which gives a wrong default value for the "Run If" and "Valid"
optional attributes. This can be seen with:
emacs -Q
1. M-x load library RET align
2. M-x customize-option RET align-rules-list
3. Navigate to the outer INS button and hit RET
4. Hit INS to insert and optional attribute
5. In the Value Menu for the new optional attribute, select either "Valid"
or "Run If"
6. Emacs displays a widget-bad-default-value
In GNU Emacs 29.0.50 (build 52, i686-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.16.0)
of 2022-02-17 built on tbb-desktop
Repository revision: 3d0f5bc219de43ebd1789882bad483720d581a4e
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Ubuntu 18.04.6 LTS
Configured using:
'configure --with-mailutils --with-xml2 --with-dbus'
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG MODULES
NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK2 ZLIB
Important settings:
value of $LC_MONETARY: es_AR.UTF-8
value of $LC_NUMERIC: es_AR.UTF-8
value of $LC_TIME: es_AR.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search time-date seq gv
subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget keymap hashtable-print-readable backquote threads
dbusbind inotify dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 8 42738 10332)
(symbols 24 5662 1)
(strings 16 15720 2235)
(string-bytes 1 503602)
(vectors 8 11124)
(vector-slots 4 164045 37330)
(floats 8 20 36)
(intervals 28 199 9)
(buffers 564 10))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54048
; Package
emacs
.
(Thu, 17 Feb 2022 22:44:01 GMT)
Full text and
rfc822 format available.
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
Added tag(s) patch.
Request was from
Mauro Aranda <maurooaranda <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 17 Feb 2022 22:56:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54048
; Package
emacs
.
(Sat, 19 Feb 2022 12:35:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 54048 <at> debbugs.gnu.org (full text, mbox):
Mauro Aranda <maurooaranda <at> gmail.com> writes:
> * 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.
Thanks; pushed to Emacs 29.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 29.1, send any further explanations to
54048 <at> debbugs.gnu.org and Mauro Aranda <maurooaranda <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 19 Feb 2022 12:35:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 20 Mar 2022 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 153 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.