Stefan Reichör <[EMAIL PROTECTED]> writes:

> "Sam Steingold" <[EMAIL PROTECTED]> writes:
>
>> <<LOG-START>>
>> dvc-log-edit: use or instead of undefined Xor (apparently, a typo)
>> <<LOG-END>>
>>
>>
>>
>> [VERSION] dvc-dev-bzr
>>
>> Bazaar (bzr) 1.0.0
>>
>> Emacs  : GNU Emacs 23.0.60.7 (x86_64-unknown-linux-gnu, GTK+ Version 2.8.20)
>>  of 2008-03-10 on nyc-qws-005
>
> Xor does exist on my system:
>
> ,----[ C-h f Xor RET ]
> | Xor is a compiled Lisp function in `ediff-init.el'.
> | (Xor A B)
> | 
> | (defsubst Xor (a b)
> |   (or (and a (not b)) (and (not a) b)))
> `----
>
>
> We have the following code for some time in our code base:
>
> (defun dvc-log-edit (&optional other-frame no-init)
>   "Edit the log before commiting. Optional OTHER_FRAME (default
> user prefix) puts log edit buffer in a separate frame. Optional
> NO-INIT if non-nil suppresses initialization of buffer if one is
> reused.
> `default-directory' must be the tree root."
>   (interactive "P")
>   (setq other-frame (Xor other-frame dvc-log-edit-other-frame))
> ...
>
>
> Does anyone have an idea why we use Xor here?

dvc-log-edit-other-frame documentation:

    If non-nil, dvc-log-edit defaults to other-frame.

User prefix on dvc-log-edit gives the opposite behavior from the
default; that should be more clearly documented. I'll change it to:

(defun dvc-log-edit (&optional other-frame no-init)
  "Edit the log before commiting. Optional OTHER_FRAME (default
user prefix) puts log edit buffer in a separate frame (or in the
same frame if `dvc-log-edit-other-frame' is non-nil). Optional
NO-INIT if non-nil suppresses initialization of buffer if one is
reused. `default-directory' must be the tree root."


There should be a (require 'ediff-init) in this file, to define Xor;
I'll add that. Since ediff is part of Emacs, and dvc uses ediff in
general, I think that should be ok. I guess I've always had ediff
loaded before invoking this function.

-- 
-- Stephe

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to