chiark
/
gitweb
/
~mdw
/
skel
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
bd7f6df
)
skelrc: Add a debugging utility.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 15 Sep 2017 08:54:43 +0000
(09:54 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 15 Sep 2017 08:54:43 +0000
(09:54 +0100)
skelrc
patch
|
blob
|
blame
|
history
diff --git
a/skelrc
b/skelrc
index 045075bb23252bed3e9019f1a21d56e8e60aae2c..ef8c93b223e819dfb5b39728859e67a2da65b420 100644
(file)
--- a/
skelrc
+++ b/
skelrc
@@
-1,5
+1,13
@@
;;; -*-emacs-lisp-*-
+(defun skelrc-dribble (msg &rest args)
+ "Write MSG (a `format'-style string, with ARGS) to the debug buffer."
+ (let ((buffer (get-buffer "*skel-debug*")))
+ (and buffer
+ (with-current-buffer buffer
+ (goto-char (point-max))
+ (insert (apply #'format msg args) "\n")))))
+
(defun skelrc-strip-trailing-whitespace (string)
"Return STRING, but with trailing whitespace removed.