tweak(confpkg): improve confpkg timing window

This commit is contained in:
Kiana Sheibani 2026-02-14 18:50:01 -05:00
parent 3cc3479741
commit dd7d8c711c
Signed by: toki
GPG key ID: 6CB106C25E86A9F7

View file

@ -160,8 +160,10 @@ If you're reading the raw org file instead of the published version, the code fo
(let (symbols)
(while (re-search-forward
(rx line-start (* (any ?\s ?\t)) "("
(or "defun" "defmacro" "defsubst" "defgeneric" "defalias" "defvar" "defcustom" "defface" "deftheme"
"cl-defun" "cl-defmacro" "cl-defsubst" "cl-defmethod" "cl-defstruct" "cl-defgeneric" "cl-deftype")
(or "defun" "defmacro" "defsubst" "defgeneric" "defalias"
"defvar" "defcustom" "defface" "deftheme"
"cl-defun" "cl-defmacro" "cl-defsubst" "cl-defmethod"
"cl-defstruct" "cl-defgeneric" "cl-deftype")
(+ (any ?\s ?\t))
(group (+ (any "A-Z" "a-z" "0-9"
?+ ?- ?* ?/ ?_ ?~ ?! ?@ ?$ ?% ?^ ?& ?= ?: ?< ?> ?{ ?})))
@ -615,6 +617,7 @@ NODE defaults to the root node."
(let ((buf (get-buffer-create "*Confpkg Load Time Report*"))
(depth 0)
num-pad name-pad max-time max-total-time max-depth)
(when (zerop (buffer-size buf))
(cl-labels
((sort-records-by-time
(record)
@ -748,8 +751,12 @@ NODE defaults to the root node."
(unless (eq (car record) 'self)
(print-record record)))
(set-buffer-modified-p nil)
(goto-char (point-min)))
(pop-to-buffer buf)))))
(setq buffer-read-only t)
(goto-char (point-min))))))
(pop-to-buffer buf)))
(set-popup-rule! "^\\*Confpkg Load Time Report\\*$"
:side 'right :size 0.5 :ttl t)
#+end_src
** Source Code Patching