On 5/2/2023 4:58 AM, Eli Zaretskii wrote: >> Date: Mon, 1 May 2023 22:42:53 -0700 >> From: Jim Porter >> >> -(defcustom eshell-rm-interactive-query (= (user-uid) 0) >> - "If non-nil, `rm' will query before removing anything." >> - :type 'boolean >> +(define-widget 'eshell-interactive-query 'lazy >> + "When to interatively query the user about a particular operation." > > This terse sentence needs to be explained in the rest of the doc > string, because, unlike "If non-nil", "When" does not explain itself. > The doc string should explain how to specify "when". It should also > explain the different supported values. Thanks, fixed. >> + :tag "Query" >> + :type '(choice (const :tag "Never" nil) >> + (const :tag "Always" t) >> + (const :tag "When root" root))) > > Also, the default value is not one of the possible optional values. I changed how this works so now the widget inherits from 'radio' instead of 'lazy', and I think it should work better overall now. > Same comment to the other similar defcustoms where you changed a > boolean option to something else: their doc strings are now > obfuscated. Fixed. >> +(defun eshell-interactive-query-p (value) >> + "Return non-nil if a command should query the user according to VALUE. >> +If VALUE is `root', return non-nil when evaluated as root (see >> +`file-user-uid'). Otherwise, simply return VALUE." > > You assume here that "evaluated as root" explains itself? I wouldn't > rely on that. Also fixed.