emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs and guile (Re: ehelp woes, or why I hate a module that I love


From: Stefan Monnier
Subject: Re: emacs and guile (Re: ehelp woes, or why I hate a module that I love so much)
Date: Fri, 19 Jul 2002 00:23:02 -0400

> A related issue is the symbol name -- a Lisp symbol name is a Lisp
> string, with some of the associated fields ignored for matching
> purposes.  The names themselves can have text properties:
> 
>     ELISP> (symbol-name 'booga-booga)
>     #("booga-booga" 0 3 nil 3 6
>       (some-prop some-val)
>       6 11 nil)
> 
> (I got this by previously interning a string with the same contents
> and some text properties.)

Actually, this is a recent change, right ?  In Emacs-21.2, `symbol-name'
always returns a string with no properties.  In that case we should
probably also strip the properties when we create a new symbol, instead
of wasting those intervals.

> An Emacs Lisp symbol's name can also be changed after interning, such
> that it won't be found when interning either the old name or
> (probably) the new name.

This is undocumented and I don't know of any code that relies on it
(well, I know of some such code, but not in any elisp package).
I think it should be considered as a misfeature/bug (but I don't
think it's worth fixing unless the fix is to make the output of
`symbol-name' be read-only).

> I don't know what Scheme's specifications
> might say about such cases.  (Much as I like Scheme, I'm hardly an
> expert; on subtle Scheme issues I'll readily defer to others.)

I'm pretty sure that Scheme's symbol-name (if such a function exists)
returns a brand new string.


        Stefan




reply via email to

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