[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15925: 24.3.50; error when customizing whitespace-display-mappings
From: |
Claudio Bley |
Subject: |
bug#15925: 24.3.50; error when customizing whitespace-display-mappings |
Date: |
Tue, 19 Nov 2013 08:37:49 +0100 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.3.50 (i686-pc-mingw32) MULE/6.0 (HANACHIRUSATO) |
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
- bug#15925: 24.3.50; error when customizing whitespace-display-mappings,
Claudio Bley <=