emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 58fde63: * lisp/help-fns.el (describe-variable): Add quotes t


From: Juri Linkov
Subject: Re: master 58fde63: * lisp/help-fns.el (describe-variable): Add quotes to symbol value of origval.
Date: Tue, 05 Nov 2019 23:32:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> -                      (cl-prin1 origval)
>> +                  (if (and (symbolp origval) (not (booleanp origval)))
>> +                      (let* ((rep (cl-prin1-to-string origval))
>> +                             (print-rep (format-message "`%s'" rep)))
>> +                        (insert print-rep))
>> +                    (cl-prin1 origval))
>
> I'd recommend we add a ":" at the end of the preceding text instead.
> Avoids any question about whether the quotes are actually part of the
> value, and makes copy&paste easier.

The code for adding quotes for origval was copied from code
that outputs the new value.  Should they both use ":"?

Before fix:

  log-edit-confirm is a variable defined in ‘log-edit.el’.
  Its value is t
  Original value was changed

After fix:

  log-edit-confirm is a variable defined in ‘log-edit.el’.
  Its value is t
  Original value was ‘changed’

Should both values be changed now to use ":"?

  log-edit-confirm is a variable defined in ‘log-edit.el’.
  Its value is: t
  Original value was: changed

PS: t is not the best example for the new value because Help
doesn't add quotes for t and nil.  Here is a better example:

  (setq log-edit-confirm 'newvalue)

Current:

  log-edit-confirm is a variable defined in ‘log-edit.el’.
  Its value is ‘newvalue’
  Original value was ‘changed’

With ":":

  log-edit-confirm is a variable defined in ‘log-edit.el’.
  Its value is: newvalue
  Original value was: changed



reply via email to

[Prev in Thread] Current Thread [Next in Thread]