help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Loading local .emacs from remote machine


From: David Kastrup
Subject: Re: Loading local .emacs from remote machine
Date: 05 Feb 2003 17:04:32 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

gebser@ameritech.net writes:

> = > A string in elisp must be some really strange thing.
> = >
> = > (add-to-list 'tramp-shell-prompt-pattern "abc")
> = >

> = In Lisp, a general type is sequence.  Lists are one subtype of
> = sequence, and vectors are another.  Strings are vectors of characters.
> = 
> = add-to-list can only add to lists, not to arbitrary sequences.
> = 
> = Does this make sense?
> 
> Yes, thanks much.  It's not enough for me write all those gorgeous
> emacs apps I've been hankering to do, but, as said, I like progress.
> 
> I think I remember reading in a book or two that every|some (?) data
> type(s) in elisp contain(s) an element (including perhaps null... or
> nil... I forget, except there's a difference... I think) *and* the
> implication of a subsequent such element-- hence, a sequence.
> 
> That a string is a vector of characters (delimited by double quotes,
> yes?)

A string is basically a vector of characters.  It is not delimited by
double quotes: that is just the input/output syntax of strings, not
the strings themselves.  Strings are not exactly the same as vectors
of characters although very much behaving like the same and allowing
the same access methods: they have different I/O syntax, they can
represent only representable characters (and not key combinations like
M-x), they can carry text properties.

> is simple enough.  Is it also possible to have a list of characters?

Yes.

> If not, why not?  If so, how would it be structurally or
> functionally different or handled differently from a string?

Read the Elisp manual if you are interested in the Elisp data
structures.  No sense in retyping it here.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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