>> But I already agreed about adding a new arg to >> 'after-display-function', and will add it anyway. > > OK. To avoid confusions 'after-display-function' should be renamed to > 'after-display-buffer-function' at least. Are you sure about such long name? This is not a hook, it's just an alist entry along with 'window-height' and 'preserve-size'. A good short name would be 'body-function' where 'body' has two-fold meaning: 1. it hints to body of the former macro that it replaces; 2. body could also mean window body that this function fills. Here is a completely tested patch that works in all cases: