`reb-with-current-window' (from re-builder.el) is a poor man's
`with-selected-window', and I'd like to use the real thing.

So, options, in (my) preferred order:

 - Delete `reb-with-current-window' and use `with-selected-window'.
This is not as bad as it sounds, because I don't think the author is
maintaining re-builder outside Emacs. XEmacs also includes re-builder,
but they already have done changes to it that weren't merged back to
GNU Emacs. So no compatibility issue and no (much, if any) trouble
synch'ing versions.

 - Just redefine it conditionally:

  ; original definition, then:
  (when (fboundp 'with-selected-window)
    (fset 'reb-with-current-window 'with-selected-window))

 - Do something like

  (defalias 'reb-with-current-window
      (if (fboundp 'with-selected-window)
          'with-selected-window
        '(...)))

  Trouble is, the (...) is (macro lambda (...)), which is ugly.

 - Conditional:

  (if (fboundp 'with-selected-window)
      (defalias 'reb-with-current-window 'with-selected-window)
    (defmacro reb-with-current-window (...)

  but this makes the bytecompiler quite unhappy (or at least noisy).

 - Do nothing.

-- 
                    /L/e/k/t/u


_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to