Jerry James wrote:
On Thu, 06 Apr 2000 at 13:51:33 +1000, "Peter B. West"
<pbwest(a)netscape.net> you wrote:
> If I `debug-on-entry sgml-insert-element' and use the menu, nothing
> happens, and the debugger is not invoked. If I use button3, the
> debugger in invoked as expected in the process of inserting the
> element. If I `debug-on-enty sgml-element-menu' then use the menu, the
> debugger in invoked, and when I continue, the element is inserted
> correctly. If I `debug-on-entry sgml-menu-ask' the debugger is invoked
> as expected by either the menu or button3, and on continuing, the
> element is inserted in both cases.
>
> Anything else I should try?
Hmmmmmm..... Based on the experiments you have tried so far and my
inspection of the code, the only reason I can see for this behavior is
that (sgml-menu-ask event 'element) is returning nil for you. Now *why*
it is returning nil is the question.
Experiment #1: Let's see if the function is miscompiled. Load up a
document, then (require 'psgml-edit). Pull up psgml-edit.el and
evaluate sgml-menu-ask. Does it work now?
No, unless I have done something wrong, being unfamiliar with the lisp
environment. I load an HTML document, then `M-:(require 'psgml-edit)
Result `psgml-edit'. Then I visit psgml-edit.el in another frame, put
the cursor past the end of the defun of sgml-menu-ask, and then Evaluate
Last S-expression. Result sgml-ask-menu.
Experiment #2: If the previous experiment failed (i.e., the problem
still exists after evalling sgml-menu-ask), insert the following line
just after the first line of code in sgml-menu-ask (that is, the
(sgml-parse-to-here) call) and re-eval the function:
(message "The valid elements are %s" sgml-current-list-of-valid-eltypes)
Does this print out the same list that you saw on the menu?
Yes, except that
1) the output flashes across the echo area and promptly disappears. I
had to increase the height of the area to see the list at all.
2) I had to enclose `sgml-current-list-of-valid-eltypes' in parentheses,
presumably because it is a function. Until I did that, I was just
getting `Symbol's value as variable is void'.
--
__ /__ Peter B. West pbwest(a)netscape.net
/
http://www.powerup.com.au/~pbwest
/ "Lord, to whom shall we go?"