[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custo
From: |
Nicolas Richard |
Subject: |
bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file' |
Date: |
Fri, 29 Apr 2016 16:21:43 +0200 |
User-agent: |
mu4e 0.9.17; emacs 25.0.50.2 |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Nicolas Richard <nrichard@ulb.ac.be> writes:
>
>> Lars Ingebrigtsen <larsi@gnus.org> writes:
>>> That's the code that puts
>>>
>>> (put 'narrow-to-region 'disabled nil)
>>>
>>> into our .emacs files, right? Yes, it would be better if that was
>>> handled by Custom. But how? Custom works by setting (variable) values,
>>> not adjusting symbol properties...
>>
>> We could add a defcustom like
>> (defcustom enabled-commands nil
>> "List of commands to enable"
>> :set (lambda (sym val)
>> (dolist (cmd val)
>> (put cmd 'disabled nil))
>> (set-default sym val)))
>
> Hm... the `set-default' wouldn't be necessary, would it?
I think it is necessary, for if you eval:
(progn
(defcustom enabled-commands nil
"List of commands to enable"
:set (lambda (sym val)
(dolist (cmd val)
(put cmd 'disabled nil))
;; (set-default sym val)
))
(customize-set-variable 'enabled-commands '(upcase-region))
(describe-variable 'enabled-commands))
you obtain "enabled-commands is void", which is confusing. It probably
also becomes impossible to keep track of which commands were enabled via
customize.
Nicolas.
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Lars Ingebrigtsen, 2016/04/27
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Nicolas Richard, 2016/04/28
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Lars Ingebrigtsen, 2016/04/28
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Lars Ingebrigtsen, 2016/04/28
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file',
Nicolas Richard <=
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Lars Ingebrigtsen, 2016/04/29
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Drew Adams, 2016/04/29
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Nicolas Richard, 2016/04/29
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Drew Adams, 2016/04/29
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Lars Ingebrigtsen, 2016/04/29
- bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file', Drew Adams, 2016/04/29