unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* can you explain the sentence about defvar in elisp?
@ 2009-07-03 16:33 waterloo
  2009-07-03 17:52 ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: waterloo @ 2009-07-03 16:33 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

When you specified a variable using the `defvar' special form, you
could distinguish a readily settable variable from others by typing an
asterisk, `*', in the first column of its documentation string.  For
example:

     (defvar shell-command-default-error-buffer nil
       "*Buffer name for `shell-command' ... error output.
     ... ")

I can not understant it "distinguish a readily settable variable from
others" ?

Thanks

[-- Attachment #2: Type: text/html, Size: 503 bytes --]

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

* RE: can you explain the sentence about defvar in elisp?
  2009-07-03 16:33 can you explain the sentence about defvar in elisp? waterloo
@ 2009-07-03 17:52 ` Drew Adams
  2009-07-04  2:00   ` waterloo
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2009-07-03 17:52 UTC (permalink / raw)
  To: 'waterloo', help-gnu-emacs

> When you specified a variable using the `defvar' special form, you
> could distinguish a readily settable variable from others by typing an
> asterisk, `*', in the first column of its documentation string.  For
> example:
	
> (defvar shell-command-default-error-buffer nil
>   "*Buffer name for `shell-command'...error output...")
	
> I can not understant it "distinguish a readily settable variable
> from others" ?
	
What is meant is a "user option", sometimes called a "user variable" or just an
"option". See the Emacs manual, node `Variables'.

An option is, by definition, any variable that can be set using command
`set-variable' or using the so-called "Customize" or "Easy Customization" user
interface. In recent versions of Emacs, every option that can be set using
Customize can also be set using `M-x set-variable'. See the Emacs manual, node
`Easy Customization' for more information about Customize.

The terms "customizable" and "customize" are a bit ambiguous. Sometimes they are
used to refer only to the use of the Customize UI (Easy Customization). But
sometimes they are used to refer to any changes made by users. In addition to
variable values, you can use Customize to customize Emacs faces. Emacs key
bindings are typically customized using functions such as `global-set-key' and
`define-key'.

In Emacs Lisp:

. `defvar' defines a global variable. If `*' is the first character of the doc
string, then the variable is a user variable, but it is not customizable using
Customize.

. `defcustom' defines a global option that is customizable using Customize. In
recent versions of Emacs, the first doc-string character need not be `*' for the
option to also be settable using `M-x set-variable'.

See also: http://www.emacswiki.org/emacs/CustomizingAndSaving

----

BTW, I don't see the text or the example that you cited anywhere in the Elisp
manual - in Emacs 20, 21, 22, or 23. Where did you find this? In the Elisp
manual, node `Defining Variables', I see `*' described explicitly as pertaining
to command `set-variable'.

If the text you cited is in an Emacs 23 manual somewhere, then please file an
Emacs (doc) bug, using `M-x report-emacs-bug'. Explain that the text you cited
is not clear to you. In particular, "readily settable variable" is unclear. What
is missing (in the text you cited) is an explicit reference to _interactive_
setting using `M-x set-variable'.






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

* Re: can you explain the sentence about defvar in elisp?
  2009-07-03 17:52 ` Drew Adams
@ 2009-07-04  2:00   ` waterloo
  2009-07-04  2:55     ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: waterloo @ 2009-07-04  2:00 UTC (permalink / raw)
  To: Drew Adams, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 766 bytes --]

thanks

it is in 8.5.1 `defvar' and an asterisk of  emacs23.0.95.1.


2009/7/4 Drew Adams <drew.adams@oracle.com>

>
>
> BTW, I don't see the text or the example that you cited anywhere in the
> Elisp
> manual - in Emacs 20, 21, 22, or 23. Where did you find this? In the Elisp
> manual, node `Defining Variables', I see `*' described explicitly as
> pertaining
> to command `set-variable'.
>
> If the text you cited is in an Emacs 23 manual somewhere, then please file
> an
> Emacs (doc) bug, using `M-x report-emacs-bug'. Explain that the text you
> cited
> is not clear to you. In particular, "readily settable variable" is unclear.
> What
> is missing (in the text you cited) is an explicit reference to
> _interactive_
> setting using `M-x set-variable'.
>
>
>

[-- Attachment #2: Type: text/html, Size: 1107 bytes --]

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

* RE: can you explain the sentence about defvar in elisp?
  2009-07-04  2:00   ` waterloo
@ 2009-07-04  2:55     ` Drew Adams
  2009-07-04  3:46       ` waterloo
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2009-07-04  2:55 UTC (permalink / raw)
  To: 'waterloo', help-gnu-emacs

> it is in 8.5.1 `defvar' and an asterisk of  emacs23.0.95.1.

Dunno what 8.5.1 means. But as I said:

If the text you cited is in an Emacs 23 manual somewhere, then please file an
Emacs (doc) bug, using `M-x report-emacs-bug'. Explain that the text you cited
is not clear to you. In particular, "readily settable variable" is unclear. What
is missing (in the text you cited) is an explicit reference to _interactive_
setting using `M-x set-variable'.





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

* Re: can you explain the sentence about defvar in elisp?
  2009-07-04  2:55     ` Drew Adams
@ 2009-07-04  3:46       ` waterloo
  2009-07-04  5:16         ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: waterloo @ 2009-07-04  3:46 UTC (permalink / raw)
  To: Drew Adams, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]

it is 8.5.1 in Introduction to emacs lisp of emacs23.0.95.1

thanks

2009/7/4 Drew Adams <drew.adams@oracle.com>

> > it is in 8.5.1 `defvar' and an asterisk of  emacs23.0.95.1.
>
> Dunno what 8.5.1 means. But as I said:
>
> If the text you cited is in an Emacs 23 manual somewhere, then please file
> an
> Emacs (doc) bug, using `M-x report-emacs-bug'. Explain that the text you
> cited
> is not clear to you. In particular, "readily settable variable" is unclear.
> What
> is missing (in the text you cited) is an explicit reference to
> _interactive_
> setting using `M-x set-variable'.
>
>

[-- Attachment #2: Type: text/html, Size: 975 bytes --]

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

* RE: can you explain the sentence about defvar in elisp?
  2009-07-04  3:46       ` waterloo
@ 2009-07-04  5:16         ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2009-07-04  5:16 UTC (permalink / raw)
  To: 'waterloo', help-gnu-emacs

> it is 8.5.1 in Introduction to emacs lisp of emacs23.0.95.1
	
Fine. As I said:

"then please file an Emacs (doc) bug, using `M-x report-emacs-bug'."

I made a suggestion of what to report:

"Explain that the text you cited is not clear to you. In particular,
`readily settable variable' is unclear. What is missing (in the text
you cited) is an explicit reference to _interactive_
setting using `M-x set-variable'."

But that's just a suggestion. It's _your_ bug report; explain the problem as you
see it. help-gnu-emacs is a help mailing list; it is not the place to report
bugs. Use `M-x report-emacs-bug' to report a bug.

The location is indeed section 8.5.1 in the manual `An Introduction to
Programming in Emacs Lisp', that is, Info node `defvar and asterisk'.		
		







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

end of thread, other threads:[~2009-07-04  5:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-03 16:33 can you explain the sentence about defvar in elisp? waterloo
2009-07-03 17:52 ` Drew Adams
2009-07-04  2:00   ` waterloo
2009-07-04  2:55     ` Drew Adams
2009-07-04  3:46       ` waterloo
2009-07-04  5:16         ` Drew Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).