Byrel and I found 2 bugs in paren.el in 21.5.32:
1st bug:
starting with xemacs --vanilla,
go to the menu, Options->Display->Paren Highlighting,
and see 4 choices, and you can select any of them and
observe that visually, they are selected correctly,
that is, the radio buttons change correctly.
However, notice in a buffer of lisp code that the
highlighting of parens does not change with your
choices from the menu.
That is because the file paren.el is not loaded yet.
Manually loading it with M-x load-file paren.el
makes it so the menu choices do indeed work and change
how they work with different menu choices.
I do not know how to fix that. Any ideas?
2nd bug:
step 1.
starting with xemacs --vanilla,
go to the menu, Options->Display->Paren Highlighting,
and see 4 choices, and you can select any of them and
observe that visually, they are selected correctly,
that is, the radio buttons change correctly. (never mind
for the moment that they do not work as described above)
Try it several times and the radio buttons work correctly
every time.
step 2.
open a customize buffer for paren-matching with:
M-x customize <ret> paren-matching
go down to the first variable, Mode and show it.
it has 5 choices:
* None (default)
* Blinking Paren
* Highlighted Paren
* Highlighted Expression
* Highlighted Surrounding Expression
Choose one, say, the last one.
Go to the top of the customize buffer and click the buttons:
set, save, then Done.
Now go to the menu, Options->Display->Paren Highlighting,
and see 4 choices, select "none"
Go back to the menu several more times each time selecting
"none". Instead of the radio button "none" staying selected,
each selection of "none" selects the radio button to the
next lower menu item, and even incrementing to the 5th
selection that is not shown except in the customize buffer,
and not showing any of the 4 radio buttons selected, which is
correct, they are not selected.
Looking at paren.el, it looks like a case is missing in the
function paren-set-mode for the case where arg is passed in
with the value set to nil.
When arg was passed as nil, it fell through to the default case
which was not correct for nil.
Here's a patch adding a cond test for that case.
--- /usr/local/share/xemacs/xemacs-packages/lisp/edit-utils/paren.el
2012-12-31 01:55:30.000000000 -0500
+++ /home/steve/paren.el.patched 2012-12-31 01:59:40.000000000 -0500
@@ -365,6 +365,7 @@
((and (numberp arg) (> arg 0))
(nth (1- arg) paren-modes))
((numberp arg) nil)
+ ( (not arg) nil)
(t (car (cdr (memq paren-mode
paren-next-modes)))))
)))
Steve Mitchell
Byrel Mitchell
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta