[Top][All Lists]

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

Re: Problem with Emacs 21.3 pretest

From: Ehud Karni
Subject: Re: Problem with Emacs 21.3 pretest
Date: Tue, 28 May 2002 13:12:05 +0300

On Mon, 27 May 2002 23:16:19 -0600 (MDT), Richard Stallman <address@hidden> 
>      address@hidden/1]-~-1520% emacs- -q --no-site-file --debug-init
>     Attempt to modify read-only object
> Please run it under GDB with a breakpoint at pure_write_error
> and send the backtrace.

OK. The trace allowed me to solve this error.

    (gdb) break pure_write_error
    Breakpoint 1 at 0x8113282
    (gdb) run
    Starting program: /usr/local/bin/emacs-21.3

    Breakpoint 1, 0x08113282 in pure_write_error ()
    (gdb) where
    #0  0x08113282 in pure_write_error ()
    #1  0x080d7b26 in parse_menu_item ()
    #2  0x08071b2f in single_menu_item ()
    #3  0x08071a44 in single_keymap_panes ()
    #4  0x08071c1e in single_menu_item ()
    #5  0x08071a44 in single_keymap_panes ()
    #6  0x08072d54 in single_submenu ()

The reason was these definitions (note the `defconst' of the keymap list):

(defconst EK-menu-mark-3
  '(keymap "EK Marks whole ops"
       (copy-mk menu-item " copy  marked "         copy-marked         :keys 
"F3"   )
       (move-mk menu-item " move  marked "         move-marked         :keys 
"S-F3" )
       (overlay menu-item "overlay marked"         overlay-marked      :keys 
"Ctrl-S-F9"   :enable (= type-mark-set 4))
       (dlt-mrk menu-item "delete  marked"         delete-marked       :keys 
"Ctrl-F9" )
       (-1 "--")
       (fill-mk menu-item "fill with char"         fill-marked         :keys 
"Ctrl-F8" )
       (shift-r menu-item "shift right marked"     shift-marked        :keys 
"Alt-S-+" :enable (/= type-mark-set 2))
       (shift-l menu-item "shift left marked "     shift-marked-left   :keys 
"Alt-S--" :enable (/= type-mark-set 2))
       (reflowm menu-item "reformat  marked"       reflow-marked       :keys 
"C-x R" )
  "EK marks sub 3 - whole ops")

(defconst EK-ops-menu
  (list 'keymap "EK ops"
        (list 'sav 'menu-item "saves/grep/tabs/shell"  EK-menu-save)
        (list 'lng 'menu-item "Languge/direction/mode" EK-menu-lang)
        '(-1  "--")
        '(-2  "--")
        (list 'sm1 'menu-item "EK Marks un/marking"    EK-menu-mark-1)
        (list 'sm2 'menu-item "EK Marks push/pop"      EK-menu-mark-2)
        '(-3        menu-item "--"                     nil             :visible 
        (list 'sm3 'menu-item "Whole marked area ops"  EK-menu-mark-3 ':visible 
        (list 'sm4 'menu-item "Translate in marked"    EK-menu-mark-4 ':visible 
        (list 'sm5 'menu-item "Marked area lines ops"  EK-menu-mark-5 ':visible 
        (list 'sm6 'menu-item "marked area as input"   EK-menu-mark-6 ':visible 
        '(-4  "--")
        '(compute  menu-item "compute expression"      compute     :keys 
"Alt-C" )
        '(cmp-wnd  menu-item "compare next window"     compare-windows )
        '(fix-col  menu-item "Fixed column movment"    col-move-fix-toggle 
:keys "Alt-X" :button (:toggle . (not position-col-var)))
  "EK marks menu")

(define-key global-map [menu-bar EK_ops] (list 'menu-item "EK ops" EK-ops-menu))

When I changed all the `defconst' to `defvar' this problem disappeared.
I still wonder why does `parse_menu_item' change the values of my vars 

I have other problems, I'm working on it.


 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:address@hidden          Better  Safe  Than  Sorry

reply via email to

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