summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lucid.el
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-03-09 23:40:36 +0000
committerJim Blandy <jimb@redhat.com>1993-03-09 23:40:36 +0000
commit26bf7a4a3f828a449820cb406040a301ce5d3bf2 (patch)
tree289626fa7190ec3fff67f49873b0979093cc7683 /lisp/emacs-lisp/lucid.el
parentd22adcaa20c9c9e15bf3bcfa848bbb4980145cb2 (diff)
downloademacs-26bf7a4a3f828a449820cb406040a301ce5d3bf2.tar.gz
*** empty log message ***
Diffstat (limited to 'lisp/emacs-lisp/lucid.el')
-rw-r--r--lisp/emacs-lisp/lucid.el41
1 files changed, 41 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/lucid.el b/lisp/emacs-lisp/lucid.el
index 8ee8603694d..36600f540b6 100644
--- a/lisp/emacs-lisp/lucid.el
+++ b/lisp/emacs-lisp/lucid.el
@@ -3,3 +3,44 @@
(defun disable-timeout (timeout)
(cancel-timer timeout))
+
+(defun copy-tree (tree)
+ (if (consp tree)
+ (cons (copy-tree (car tree))
+ (copy-tree (cdr tree)))
+ (if (vectorp tree)
+ (let ((new (copy-sequence tree))
+ (i (1- (length new))))
+ (while (>= i 0)
+ (aset new i (copy-tree (aref new i)))
+ (setq i (1- i)))
+ new)
+ tree)))
+
+(fset 'current-time-seconds 'current-time)
+
+(defun keymap-parent (keymap)
+ (let ((tail (cdr keymap)))
+ (while (and tail (not (eq (car tail) 'keymap)))
+ (setq tail (cdr tail)))
+ tail))
+
+(defun set-keymap-parent (keymap new-parent)
+ (let ((tail (cdr keymap)))
+ (while (and tail (cdr tail) (not (eq (car (cdr tail)) 'keymap)))
+ (setq tail (cdr tail)))
+ (if tail
+ (setcdr tail new-parent))))
+
+(defun remove-hook (hook-var function)
+ (if (boundp 'hook-var)
+ (set hook-var (delq function (symbol-value hook-var)))))
+
+(defun remprop (symbol prop)
+ (let ((plist (symbol-plist symbol)))
+ (while (eq (car plist) prop)
+ (setplist symbol (setq plist (cdr (cdr plist)))))
+ (while plist
+ (if (eq (nth 2 plist) prop)
+ (setcdr (cdr plist) (nthcdr 4 plist)))
+ (setq plist (cdr (cdr plist))))))