<<The buying company can always buy back stock if they want the effect of a cash deal.>>
Not completely true. One of the requirements of a tax-free reorganization is "continuity of interest". this is a concept created by case law but now enshrined in the regulations. Essentially, a sufficient quantum of the consideration given to the target shareholders must be stock, the precise minimum is not clear but it is thought to be around 40%. For this purpose, the fact that target shareholders sell their stock after a merger does not count but under applicable treasury regulations, but redemptions by the acquiring company or a related person are taken into account if undertaken "in connection with a potential reorganization." See 1.368-1(e) at http://www.law.cornell.edu/cfr/text/26/1.368-1