[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pk/unpk
From: |
Thien-Thi Nguyen |
Subject: |
pk/unpk |
Date: |
Thu, 06 Dec 2001 18:03:12 -0800 |
hello,
please see below for `pk' and `unpk', useful for hacking guile scheme in
emacs. i'll probably add these to scheme mode at some point.
(if anyone is aware of similar instrumentation support for other
languages, let me know by private mail so that i can generalize the
code. otherwise, i'm happy to only consider guile.)
M-x where-is-M-x-autodebug?!
thi
________________________________________________
(defun pk (tag)
(interactive "sTag (`pk' args): ")
(skip-chars-forward " \t\n")
(save-excursion
(insert "(pk " tag " ")
(forward-sexp)
(insert ")")))
(defun unpk ()
(interactive)
(skip-chars-forward " \t\n")
(while (not (looking-at "(pk"))
(when (= 0 (current-column))
(error "could not find surrounding pk"))
(backward-up-list 1))
(let ((p (point)))
(forward-sexp 1)
(delete-char -1)
(forward-sexp -1)
(delete-region p (point))))
;eof
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- pk/unpk,
Thien-Thi Nguyen <=