aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/junk.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/etc/junk.el b/etc/junk.el
new file mode 100644
index 00000000..470435d5
--- /dev/null
+++ b/etc/junk.el
@@ -0,0 +1,17 @@
+;;; junk.el
+;;;
+;;; $Id$
+;;;
+;;; Bits and pieces of code
+;;; removed from main PG (or never added).
+;;; Left here in case they're useful later.
+;;;
+
+(defun proof-set-toggle (sym value)
+ "Try to set a boolean variable <blah>-enable using function <blah>-toggle."
+ (save-match-data
+ (let* ((nm (symbol-name sym))
+ (i (string-match "-enable" nm))
+ (tgfn (if i (intern (concat (substring nm 0 i) "-toggle")))))
+ (if (and tgfn (fboundp tgfn))
+ (funcall tgfn (if value 1 0))))))