commit c89650d148a24855d132a22872cbfaa56d7c7349
parent eecdeafd1b713f8e5b548b7f98224988ccb81459
Author: Wilfred Hughes <me@wilfred.me.uk>
Date: Mon, 18 Dec 2017 20:25:50 +0000
Future performance work
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/helpful.el b/helpful.el
@@ -545,6 +545,13 @@ buffer."
(cond
((and callable-p path)
;; Open `path' ourselves, so we can widen before searching.
+
+ ;; TODO: this is slow, because when we open large .c files, such
+ ;; as data.c (e.g. when looking at `defalias'), we run all the
+ ;; mode hooks. If the user hasn't opened the buffer, we should
+ ;; just open a temporary buffer. This would require
+ ;; reimplementing `find-function-C-source', which is just a
+ ;; regexp search anyway.
(setq buf (find-file-noselect (find-library-name path)))
(unless (-contains-p initial-buffers buf)