Recent discussion about dropping selected_window (started at http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg01090.html) raises an interesting question. In short, we want Fselected_window fast (read: inline in C) but still accessible from Lisp. Possible solution is to split DEFSUBR from DEFUN and use DEFINLINE in .h to define inline function, with matching DEFSUBR somewhere in .c. Attached patch converts Fcurrent_buffer to inline function. On my system, this effectively eliminates 63 calls to Fcurrent_buffer at the cost of increasing .text with just 48 bytes (for default '-O2 -g3' build). This feature also requires special support in make-docfile and Lisp code responsible to find and jump to a function definition. Dmitry