I also looked at other places with similar interactive specs and found
that the whole family of `set-justification...' commands uses the
following spec:
(interactive (list (if mark-active (region-beginning) (point))
(if mark-active (region-end) (point))))
and it doesn't keep region-beginning expression in the history,
because the `if' form is ignored if it contains else-forms.
These commands would look too cumbersome after changing all them
to use `if' without else-forms.
I think a simpler and better change is to relax this restriction in
`fix_command' to allow `if' with else-forms, and keep region-beginning
in the history only if it is presented in then-form.
Index: src/callint.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/callint.c,v
retrieving revision 1.140
diff -c -r1.140 callint.c
*** src/callint.c 7 Aug 2005 12:33:16 -0000 1.140
--- src/callint.c 11 Dec 2005 10:49:52 -0000
***************
*** 219,227 ****
{
Lisp_Object presflag, carelt;
carelt = Fcar (elt);
! /* If it is (if X Y), look at Y. */
! if (EQ (carelt, Qif)
! && EQ (Fnthcdr (make_number (3), elt), Qnil))
elt = Fnth (make_number (2), elt);
/* If it is (when ... Y), look at Y. */
else if (EQ (carelt, Qwhen))
--- 219,226 ----
{
Lisp_Object presflag, carelt;
carelt = Fcar (elt);
! /* If it is (if X Y [Z]), look at Y. */
! if (EQ (carelt, Qif))
elt = Fnth (make_number (2), elt);
/* If it is (when ... Y), look at Y. */
else if (EQ (carelt, Qwhen))
--
Juri Linkov
http://www.jurta.org/emacs/
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug