From xemacs-m  Sat Jun 28 14:36:34 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA18817
	for <xemacs-beta@xemacs.org>; Sat, 28 Jun 1997 14:36:33 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.6/8.8.6) id MAA05497;
	Sat, 28 Jun 1997 12:39:25 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: XEmacs internal corruption integer `0' plist -- test case
References: <m2k9jeppxm.fsf@altair.xemacs.org> <QQcvxt03404.199706281921@crystal.WonderWorks.COM>
X-Url: http://www.miranova.com/%7Esteve/
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@xemacs.org>
In-Reply-To: Kyle Jones's message of "Sat, 28 Jun 1997 15:21:23 -0400 (EDT)"
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: multipart/mixed;
 boundary="Multipart_Sat_Jun_28_12:39:21_1997-1"
Content-Transfer-Encoding: 7bit
Date: 28 Jun 1997 12:39:21 -0700
Message-ID: <m2zpsay0t2.fsf@altair.xemacs.org>
Lines: 338
X-Mailer: Gnus v5.4.59/XEmacs 20.3(beta10) - "Athens"

--Multipart_Sat_Jun_28_12:39:21_1997-1
Content-Type: text/plain; charset=US-ASCII

Kyle Jones <kyle_jones@wonderworks.com> writes:

> Steven L Baur writes:
>> This problem has probably been around for (at least) a couple weeks now.

> Months.

> From: Per Abrahamsen <abraham@dina.kvl.dk>
> Date: 20 Mar 1997 12:10:13 +0100

> Any idea how (symbol-plist 'toolbar-cut) can be anything but a plist?

I see.  This keeps getting weirder and weirder.  I applied the
following patch to abbrev.el (if table is nil, obarray would be used).


1997-06-28  Steven L Baur  <steve@altair.xemacs.org>

	* modes/abbrev.el (define-abbrev): Trap nil tables (which might
	cause bogus plists to get put into obarray).
	Fix docstring.

Index: lisp/modes/abbrev.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/modes/abbrev.el,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 abbrev.el
--- abbrev.el	1996/12/18 22:42:45	1.1.1.1
+++ abbrev.el	1997/06/28 19:07:07
@@ -73,7 +73,7 @@
 (defun define-abbrev (table name &optional expansion hook count)
   "Define an abbrev in TABLE named NAME, to expand to EXPANSION or call HOOK.
 NAME and EXPANSION are strings.  Hook is a function or `nil'.
-To undefine an abbrev, define with the an expansion of `nil'."
+To undefine an abbrev, define it with an expansion of `nil'."
   (or (not expansion)
       (stringp expansion)
       (setq expansion (signal 'wrong-type-argument
@@ -82,6 +82,9 @@
       (integerp count)
       (setq count (signal 'wrong-type-argument
                           (list 'fixnump count))))
+  (or (vectorp table)
+      (setq table (signal 'wrong-type-argument
+			  (list 'vectorp table))))
   (let* ((sym (intern name table))
          (oexp (and (boundp sym) (symbol-value sym)))
          (ohook (and (fboundp sym) (symbol-function sym))))


==================
Rebuilt, and now I get (running my test case):

Bad plist in origvar, 0

`origvar' is not a global symbol.  It is a let-bound symbol occurring
in exactly one place help.el/describe-variable.

Attached is the disassembly.

-- 
steve@calag.com baur
Unsolicited commercial e-mail will be billed at $250/message.

--Multipart_Sat_Jun_28_12:39:21_1997-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="describe-variable.dis"
Content-Transfer-Encoding: 7bit

byte code for describe-variable:
  doc:  Display the full documentation of VARIABLE (a symbol). ...
  args: (variable)
 interactive: (let* ((v (variable-at-point)) (val (let ((enable-recursive-minibuffers t)) (completing-read (if v (format "Describe variable (default %s): " v) (gettext "Describe variable: ")) obarray (quote boundp) t)))) (list (if (equal val "") v (intern val))))
0	constant  with-displaying-help-buffer
1	constant  <compiled-function>
      args: nil
    0	    varref    variable
    1	    constant  nil
    2	    varbind   aliases
    3	    varbind   origvar
    4	    constant  t
    5	    varbind   print-escape-newlines
    6:1	    constant  variable-alias
    7	    varref    variable
    8	    call      1
    9	    goto-if-nil 4
    11	    constant  variable-alias
    12	    varref    variable
    13	    call      1
    14	    varbind   newvar
    16	    varref    aliases
    17	    goto-if-nil 2
    19	    varref    aliases
    20	    constant  format
    21	    constant  ",\n     which is an alias for %s"
    22	    constant  symbol-name
    23	    varref    newvar
    25	    call      1
    26	    call      2
    27	    concat2   
    28	    varset    aliases
    29	    goto      3
    31:2    constant  format
    32	    constant  "%s is an alias for %s"
    33	    constant  symbol-name
    34	    varref    variable
    35	    call      1
    36	    constant  symbol-name
    37	    varref    newvar
    39	    call      1
    40	    call      3
    41	    varset    aliases
    42:3    varref    newvar
    44	    varset    variable
    45	    unbind    1
    46	    goto      1
    48:4    varref    aliases
    49	    goto-if-nil 5
    51	    constant  princ
    52	    constant  format
    53	    constant  "%s.\n"
    54	    varref    aliases
    55	    call      2
    56	    call      1
    57	    discard   
    58:5    constant  boundp
    59	    varref    variable
    60	    call      1
    61	    goto-if-not-nil 6
    63	    constant  princ
    64	    constant  format
    65	    constant  "%s is void"
    66	    varref    variable
    67	    call      2
    68	    call      1
    69	    discard   
    70	    goto      7
    72:6    constant  princ
    73	    constant  format
    74	    constant  "%s's value is "
    75	    varref    variable
    76	    call      2
    77	    call      1
    78	    discard   
    79	    constant  prin1
    80	    varref    variable
    81	    symbol-value 
    82	    call      1
    83	    discard   
    84:7    constant  terpri
    85	    call      0
    86	    discard   
    87	    constant  princ
    88	    constant  "  -- "
    89	    call      1
    90	    discard   
    91	    constant  princ
    92	    constant  built-in-variable-doc
    93	    varref    variable
    94	    call      1
    95	    call      1
    96	    discard   
    97	    constant  princ
    98	    constant  "."
    99	    call      1
    100	    discard   
    101	    constant  terpri
    102	    call      0
    103	    discard   
    104	    constant  local-variable-p
    105	    varref    variable
    106	    current-buffer 
    107	    call      2
    108	    goto-if-nil 14
    110	    constant  nil
    111	    dup	      
    112	    cons      
    113	    varbind   void
    115	    constant  nil
    116	    constant  (default-value variable)
    117	    constant  ((error void))
    118	    condition-case 
    119	    varbind   def
    121	    constant  princ
    122	    constant  "This value is specific to the current buffer."
    123	    call      1
    124	    discard   
    125	    constant  terpri
    126	    call      0
    127	    discard   
    128	    constant  local-variable-p
    129	    varref    variable
    130	    constant  nil
    131	    call      2
    132	    goto-if-nil 8
    134	    constant  princ
    135	    constant  "(Its value is local to each buffer.)"
    136	    call      1
    137	    discard   
    138	    constant  terpri
    139	    call      0
    140	    discard   
    141:8   varref    def
    143	    varref    void
    145	    eq	      
    146	    goto-if-nil 9
    148	    constant  boundp
    149	    varref    variable
    150	    call      1
    151	    goto      10
    153:9   varref    variable
    154	    symbol-value 
    155	    varref    def
    157	    eq	      
    158	    not	      
    159:10  goto-if-nil 13
    161	    constant  princ
    162	    constant  "Its default-value is "
    163	    call      1
    164	    discard   
    165	    varref    def
    167	    varref    void
    169	    eq	      
    170	    goto-if-nil 11
    172	    constant  princ
    173	    constant  "void."
    174	    call      1
    175	    discard   
    176	    goto      12
    178:11  constant  prin1
    179	    varref    def
    181	    call      1
    182	    discard   
    183:12  constant  terpri
    184	    call      0
    185	    discard   
    186:13  unbind    2
    187	    goto      15
    189:14  constant  local-variable-p
    190	    varref    variable
    191	    current-buffer 
    192	    constant  t
    193	    call      3
    194	    goto-if-nil 15
    196	    constant  princ
    197	    constant  "Setting it would make its value buffer-local.\n"
    198	    call      1
    199	    discard   
    200	    constant  terpri
    201	    call      0
    202	    discard   
    203:15  unbind    1
    204	    constant  terpri
    205	    call      0
    206	    discard   
    207	    constant  princ
    208	    constant  "Documentation:"
    209	    call      1
    210	    discard   
    211	    constant  terpri
    212	    call      0
    213	    discard   
    214	    constant  documentation-property
    215	    varref    variable
    216	    constant  variable-documentation
    217	    call      2
    218	    constant  variable-obsoleteness-doc
    219	    varref    origvar
    220	    call      1
    221	    constant  variable-compatibility-doc
    222	    varref    origvar
    223	    call      1
    224	    varbind   compatible
    226	    varbind   obsolete
    228	    varbind   doc
    230	    varref    obsolete
    232	    goto-if-nil 16
    234	    constant  princ
    235	    varref    obsolete
    237	    call      1
    238	    discard   
    239	    constant  terpri
    240	    call      0
    241	    discard   
    242	    constant  terpri
    243	    call      0
    244	    discard   
    245:16  varref    compatible
    247	    goto-if-nil 17
    249	    constant  princ
    250	    varref    compatible
    252	    call      1
    253	    discard   
    254	    constant  terpri
    255	    call      0
    256	    discard   
    257	    constant  terpri
    258	    call      0
    259	    discard   
    260:17  varref    obsolete
    262	    goto-if-nil 18
    264	    varref    aliases
    265	    goto-if-not-nil 21
    267:18  varref    doc
    269	    goto-if-nil 19
    271	    constant  princ
    272	    varref    doc
    274	    call      1
    275	    discard   
    276	    goto      20
    278:19  constant  princ
    279	    constant  "not documented as a variable."
    280	    call      1
    281	    discard   
    282:20  constant  terpri
    283	    call      0
    284	    discard   
    285:21  unbind    3
    286	    save-excursion 
    287	    varref    standard-output
    289	    set-buffer 
    290	    discard   
    291	    constant  buffer-string
    292	    call      0
    293	    unbind    3
    294	    return    

2	call	  1
3	return	  

--Multipart_Sat_Jun_28_12:39:21_1997-1
Content-Type: text/plain; charset=US-ASCII


--Multipart_Sat_Jun_28_12:39:21_1997-1--

