all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 58fde63: * lisp/help-fns.el (describe-variable): Add quotes to symbol value of origval.
       [not found] ` <20191103215233.4860B20A3C@vcs0.savannah.gnu.org>
@ 2019-11-03 23:32   ` Stefan Monnier
  2019-11-05 21:32     ` Juri Linkov
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2019-11-03 23:32 UTC (permalink / raw
  To: emacs-devel; +Cc: Juri Linkov

> -                      (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.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: master 58fde63: * lisp/help-fns.el (describe-variable): Add quotes to symbol value of origval.
  2019-11-03 23:32   ` master 58fde63: * lisp/help-fns.el (describe-variable): Add quotes to symbol value of origval Stefan Monnier
@ 2019-11-05 21:32     ` Juri Linkov
  0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2019-11-05 21:32 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

>> -                      (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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-05 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20191103215229.32162.69545@vcs0.savannah.gnu.org>
     [not found] ` <20191103215233.4860B20A3C@vcs0.savannah.gnu.org>
2019-11-03 23:32   ` master 58fde63: * lisp/help-fns.el (describe-variable): Add quotes to symbol value of origval Stefan Monnier
2019-11-05 21:32     ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.