emacs-devel
[Top][All Lists]
Advanced

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

Pure strings (Re: Compilation to native)


From: Juri Linkov
Subject: Pure strings (Re: Compilation to native)
Date: Thu, 15 Apr 2004 14:11:16 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Juri Linkov <address@hidden> writes:
> BTW, I also noticed the *Message* buffer often reports such errors:
>
> Error during redisplay: (error Attempt to modify read-only object)

This error occurs when the function `put-text-property' tries to
put text properties on the top menu item "Buffers".  But the string
"Buffers" is read-only.  This is true as for the unicode branch
as well as for the trunk.

For example, with the HEAD of the trunk, started by `emacs -Q',
the following code was evaluated:

*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (cadr (nth 3 (global-key-binding [menu-bar])))
"Options"
ELISP> (put-text-property 0 1 'auto-composed t (cadr (nth 3 (global-key-binding 
[menu-bar]))))
nil
ELISP> (cadr (nth 3 (global-key-binding [menu-bar])))
#("Options" 0 1
  (auto-composed t)
  1 7 nil)

;; so far so good: `put-text-property' puts the `auto-composed' property
;; on all top menu items except "Buffers":

ELISP> (cadr (nth 4 (global-key-binding [menu-bar])))
"Buffers"
ELISP> (put-text-property 0 1 'auto-composed t (cadr (nth 4 (global-key-binding 
[menu-bar]))))
*** Eval error ***  Attempt to modify read-only object
ELISP> (cadr (nth 4 (global-key-binding [menu-bar])))
"Buffers"

This error is raised on the string "Buffers" by the macro CHECK_IMPURE.

Could someone explain why should this string be "impure"?

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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