* get all functions, again (lost message?)
@ 2015-08-20 1:23 Emanuel Berg
0 siblings, 0 replies; only message in thread
From: Emanuel Berg @ 2015-08-20 1:23 UTC (permalink / raw)
To: help-gnu-emacs
I just posted how to get all functions - that was some
hours ago, and I still don't see it, so maybe it is
lost in space. Anyway, I figured out how to do it -
now, the problem is rather how to *use* it, as the
regexp gets too big!
Keep it up!
;; This file:
;;
;; http://user.it.uu.se/~embe8573/conf/emacs-init/list-quoted-functions.el
;;
;; Required:
;;
;; http://user.it.uu.se/~embe8573/conf/emacs-init/search-regexp-in-files.el
;;
;; Test it on this very file!
;;
;; catch me, as quoted:
;;
;; (put 'custom-comment-hide 'disabled nil)
;;
;; don't catch me:
;;
;; (custom-comment-hide oh-oh-oh)
(require 'search-regexp-in-files)
(require 'cl)
(defun get-all-functions (&optional delim)
(let ((funs '()))
(mapatoms (lambda (f)
(when (fboundp f)
(push (if delim (format "%s%s" f delim) f) funs) )))
(subseq funs 0 1000) )) ; too many functions for the regexp to hold them all
; at once - here, get 1000 just to test, and
; make pretty later
(defun list-quoted-functions ()
(interactive)
(let*((funs (get-all-functions "\\|"))
(funs-str (apply `(concatenate string ,@funs)))
(funs-regexp
(concatenate 'string
"[^#]'\\(" (substring funs-str 0 (- (length funs-str) 2)) "\\)\\b" )))
(search-regexp-in-files
"~/.emacs.d/emacs-init/**/*.el"
funs-regexp) ))
;; (list-quoted-functions)
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-20 1:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-20 1:23 get all functions, again (lost message?) Emanuel Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).