From: "Bingham, Jay" <Jay.Bingham@hp.com>
Subject: RE: why cannot set cursor-type with setq but only with setq-default??????
Date: Wed, 15 Jan 2003 16:39:39 -0600 [thread overview]
Message-ID: <72A87F7160C0994D8C5A36E2FDC227F504420EE4@txnexc01.americas.cpqcorp.net> (raw)
Greg Hill [mailto:ghill@synergymicro.com] wrote:
At 9:34 AM -0800 1/15/03, Christian Seberino wrote:
>>setq-default is used to set cursor to be a bar rather than a box...
>>
>>(setq-default cursor-type 'bar)
>>
>>How come (setq cursor-type 'bar) doesn't work????
>
>Chris,
>
>Apparently cursor-type is automatically buffer-local, so setq changes
>its value only for the current buffer. setq-default changes its
>value for all buffers that don't have their own buffer-local version.
>
>cursor-type as a variable seems to be new to emacs-21. I didn't even
>know it existed until you asked this question. Before 21 you had to
>use modify-frame-parameters to change it. I have not been able to
>find any documentation on cursor-type as a variable other than in
>emacs-21's interactive help. Can you point us to some? Thanks.
The Emacs Lisp Manual for both version 20 and version 21 contain
information about cursor-type in the section on Window Frame Parameters.
See -
for Emacs 20:
http://www.gnu.org/manual/elisp-manual-20-2.5/html_mono/elisp.html
for Emacs 21:
http://www.gnu.org/manual/elisp-manual-21-2.8/html_mono/elisp.html
The Emacs 21 version says the following:
cursor-type
The way to display the cursor. The legitimate values are bar, box, and
(bar . width). The symbol box specifies an ordinary black box overlaying
the character after point; that is the default. The symbol bar specifies
a vertical bar between characters as the cursor. (bar . width) specifies
a bar width pixels wide.
The buffer-local variable cursor-type overrides the value of the
cursor-type frame parameter, and can in addition have values t (use the
cursor specified for the frame) and nil (don't display a cursor).
The second paragraph is not in the Emacs 20 version.
More interesting is the following excerpt describing buffer-local
variables from the section Introduction to Buffer-Local Variables:
All buffers start out by sharing the default value of the variable as
usual, but setting the variable creates a buffer-local binding for the
current buffer. The new value is stored in the buffer-local binding,
leaving the default binding untouched. This means that the default value
cannot be changed with setq in any buffer; the only way to change it is
with setq-default.
-_
J_)
C_)ingham
. HP - NonStop Austin Software & Services - Software Quality
Assurance
. Austin, TX
. "Language is the apparel in which your thoughts parade in public.
. Never clothe them in vulgar and shoddy attire." -Dr. George W.
Crane-
next reply other threads:[~2003-01-15 22:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-15 22:39 Bingham, Jay [this message]
[not found] <mailman.338.1042670496.21513.help-gnu-emacs@gnu.org>
2003-01-15 23:21 ` why cannot set cursor-type with setq but only with setq-default?????? John Paul Wallington
-- strict thread matches above, loose matches on Subject: below --
2003-01-15 22:15 Bingham, Jay
2003-01-15 17:34 Christian Seberino
2003-01-15 21:28 ` Greg Hill
2003-01-15 21:41 ` Kai Großjohann
2003-01-15 21:59 ` Romain FRANCOISE
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72A87F7160C0994D8C5A36E2FDC227F504420EE4@txnexc01.americas.cpqcorp.net \
--to=jay.bingham@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).