GNU bug report logs -
#15925
24.3.50; error when customizing whitespace-display-mappings
Previous Next
Reported by: Claudio Bley <claudio.bley <at> googlemail.com>
Date: Tue, 19 Nov 2013 07:39:02 UTC
Severity: normal
Tags: fixed, patch
Merged with 21771,
28183,
31869
Found in versions 24.3.50, 25.0.50, 27.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
1. M-x customize-option RET whitespace-display-mappings RET
2. click INS to insert an arbitrary char into one of the vectors
3. click the State button and select "Set for current session"
You should see this error / backtrace:
Debugger entered--Lisp error: (error "This field should contain a single character")
signal(error ("This field should contain a single character"))
error("%s" "This field should contain a single character")
custom-variable-set((custom-variable :documentation-shown t
:custom-state modified :tag "Whitespace Display Mappings" :value
whitespace-display-mappings :custom-form edit :custom-magic
[...]
call-interactively(widget-button-click nil nil)
command-execute(widget-button-click)
In wid-edit.el the character widget is defined as
(define-widget 'character 'editable-field
"A character."
:tag "Character"
:value 0
:size 1
:format "%{%t%}: %v\n"
:valid-regexp "\\`.\\'"
:error "This field should contain a single character"
[...]
Note, that the regexp does not match a single newline character, which
happens to be the problem here, as the default value of
`whitespace-display-mappings' is
((space-mark 32 [183] [46])
(space-mark 160 [164] [95])
(newline-mark 10 [36 10]) ;; <- ?\n here
(tab-mark 9 [187 9] [92 9]))
I think the regexp should be changed to "\\`\(.\|\n\)\\'" to allow a
single newline also.
Claudio
--
Claudio
This bug report was last modified 4 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.