mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
; Fix last change
* etc/NEWS: * lisp/cus-edit.el (setopt-local-type-mismatch): Improve wording of documentation in last change. (Bug#81120)
This commit is contained in:
parent
725120ca3d
commit
378c4a3d49
2 changed files with 12 additions and 11 deletions
19
etc/NEWS
19
etc/NEWS
|
|
@ -50,22 +50,23 @@ If this variable is nil, 'tty-cursor-movement-use-TAB-BS' has no effect,
|
|||
and Emacs will never use TABs for any cursor-movement sequences.
|
||||
|
||||
---
|
||||
** File- and directory-locals respect user option setters.
|
||||
** File- and directory-local variables respect user option setters.
|
||||
Values of variables that are user options mentioned in file-local
|
||||
variable properties and directory-locals via ".dir-locals.el" are now
|
||||
variable sections and directory-locals via ".dir-locals.el" are now
|
||||
set similarly to 'setopt-local'; i.e., if a user option has a defcustom
|
||||
':set' function, that function will be invoked.
|
||||
|
||||
---
|
||||
** New user option 'setopt-local-type-mismatch'.
|
||||
This option controls what 'setopt-local' does when it detects a type
|
||||
mismatch between the specified value and the 'defcustom' of its user
|
||||
option. Its backward-compatible default is nil which emits a warning
|
||||
and accepts the type-mismatched value. If you customize it to non-nil,
|
||||
you will be prompted to accept or ignore the value. If it is the symbol
|
||||
'accept', warnings are inhibited and type-mismatched values are
|
||||
accepted. If 'discard', warnings are inhibited and type-mismatched
|
||||
values are discarded.
|
||||
mismatch between the specified value and the :type specification of a
|
||||
user option. Its backward-compatible default is nil which emits a
|
||||
warning and accepts the type-mismatched value. You can control this by
|
||||
customizing 'setopt-local-type-mismatch' to a non-nil value: the value
|
||||
'accept' inhibits the warning and silently accepts type-mismatched
|
||||
values; the value 'discard' inhibits the warning and discards
|
||||
type-mismatched values; any other non-nil value prompts you whether to
|
||||
accept or ignore the value.
|
||||
|
||||
*** Specifying a minor mode as a local variables enables that mode,
|
||||
unconditionally. The previous behavior, toggling the mode, was
|
||||
|
|
|
|||
|
|
@ -1107,10 +1107,10 @@ even if it doesn't match the type.)
|
|||
;;;###autoload
|
||||
(defcustom setopt-local-type-mismatch nil
|
||||
"Behavior of `setopt-local’ if value's type mismatches its definition.
|
||||
If nil, emit a warning and assign the value.
|
||||
If non-nil, prompt to accept or discard the value.
|
||||
If nil, emit a warning, but accept the mismatched value.
|
||||
If the symbol `accept', ignore type mismatch warning and assign the value.
|
||||
If the symbol `discard', ignore warning and discard the mismatched value.
|
||||
If any other non-nil value, prompt whether to accept or discard the value.
|
||||
Note: Accepting mismatched values may result in unexpected behavior."
|
||||
:type '(choice (const :tag "Emit a warning and accept the type value" nil)
|
||||
(const :tag "Prompt to accept or discard the value" t)
|
||||
|
|
|
|||
Loading…
Reference in a new issue