GNU bug report logs - #5974
23.1.95; enabling disabled cmd & saving doesn't respect `custom-file'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 19 Apr 2010 16:24:02 UTC

Severity: wishlist

Merged with 24023

Found in version 24.5

Full log


View this message in rfc822 format

From: Nicolas Richard <nrichard <at> ulb.ac.be>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 5974 <at> debbugs.gnu.org
Subject: bug#5974: 23.1.95; enabling disabled cmd & saving doesn't respect `custom-file'
Date: Fri, 29 Apr 2016 16:21:43 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Nicolas Richard <nrichard <at> ulb.ac.be> writes:
>
>> Lars Ingebrigtsen <larsi <at> 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.




This bug report was last modified 8 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.