unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ehud Karni" <ehud@unix.simonwiesel.co.il>
Cc: emacs-devel@gnu.org
Subject: Re: Problem with Emacs 21.3 pretest
Date: Tue, 28 May 2002 13:12:05 +0300	[thread overview]
Message-ID: <200205281012.g4SAC5a13738@unix.simonwiesel.co.il> (raw)
In-Reply-To: <200205280516.g4S5GJ109571@aztec.santafe.edu> (message from Richard Stallman on Mon, 27 May 2002 23:16:19 -0600 (MDT))

On Mon, 27 May 2002 23:16:19 -0600 (MDT), Richard Stallman <rms@gnu.org> wrote:
>
>      ehud@beta[pts/1]-~-1520% emacs-21.2.90.1 -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  (mark-exist-chk))
        (list 'sm3 'menu-item "Whole marked area ops"  EK-menu-mark-3 ':visible '(mark-exist-chk))
        (list 'sm4 'menu-item "Translate in marked"    EK-menu-mark-4 ':visible '(mark-exist-chk))
        (list 'sm5 'menu-item "Marked area lines ops"  EK-menu-mark-5 ':visible '(mark-exist-chk))
        (list 'sm6 'menu-item "marked area as input"   EK-menu-mark-6 ':visible '(mark-exist-chk))
        '(-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 (constants).

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

Ehud.


--
 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:ehud@unix.simonwiesel.co.il          Better  Safe  Than  Sorry

  reply	other threads:[~2002-05-28 10:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-27 19:42 Problem with Emacs 21.3 pretest Ehud Karni
2002-05-28  5:16 ` Richard Stallman
2002-05-28 10:12   ` Ehud Karni [this message]
2002-05-29 16:25     ` Richard Stallman
2002-05-29 17:08       ` Stefan Monnier
2002-05-29 22:12         ` Miles Bader
2002-05-31  7:05           ` Richard Stallman
2002-05-31  7:04         ` Richard Stallman

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=200205281012.g4SAC5a13738@unix.simonwiesel.co.il \
    --to=ehud@unix.simonwiesel.co.il \
    --cc=emacs-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).