# HG changeset patch # User Oleksandr Gavenko # Date 1355681093 -7200 # Node ID 8b5717119af48240e3f4c139d2ac40466050e65a # Parent 2267dc920fe974c32b2ffdf8059c316e24609425 Add function that dump all function calls in current buffer. Useful to explore elisp API from somebody else files. diff -r 2267dc920fe9 -r 8b5717119af4 .emacs-my --- a/.emacs-my Sun Dec 16 18:07:16 2012 +0200 +++ b/.emacs-my Sun Dec 16 20:04:53 2012 +0200 @@ -2167,6 +2167,20 @@ ) )) +(defun my-dump-funcs () + "Dump all function calls in current buffer. Useful to explore +elisp API from somebody else files." + (interactive) + (let* ( (cur-buffer (current-buffer)) (new-buffer (get-buffer-create (concat (buffer-name cur-buffer) "-funcs.el"))) symb ) + (while (search-forward-regexp "([[:alnum:]*]" nil t) + (setq symb (thing-at-point 'symbol)) + (with-current-buffer new-buffer + (insert-string symb) + (insert-char ?\n 1))) + (switch-to-buffer new-buffer) + (shell-command-on-region (point-min) (point-max) "sort -u" nil t) + )) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "C, c-mode, C++, c++-mode")