diff options
| author | Jim Blandy | 1993-03-09 23:40:36 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-03-09 23:40:36 +0000 |
| commit | 330fba95d271993666bf03d2ce4cf7250178feb2 (patch) | |
| tree | c8e64e02cdfbd13be5ba534f8e58a738c59f2409 | |
| parent | 92e30bc5e0b07ce719bf810f76ab1079a6ed1a94 (diff) | |
| download | emacs-330fba95d271993666bf03d2ce4cf7250178feb2.tar.gz emacs-330fba95d271993666bf03d2ce4cf7250178feb2.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/emacs-lisp/lucid.el | 41 |
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 @@ | |||
| 3 | 3 | ||
| 4 | (defun disable-timeout (timeout) | 4 | (defun disable-timeout (timeout) |
| 5 | (cancel-timer timeout)) | 5 | (cancel-timer timeout)) |
| 6 | |||
| 7 | (defun copy-tree (tree) | ||
| 8 | (if (consp tree) | ||
| 9 | (cons (copy-tree (car tree)) | ||
| 10 | (copy-tree (cdr tree))) | ||
| 11 | (if (vectorp tree) | ||
| 12 | (let ((new (copy-sequence tree)) | ||
| 13 | (i (1- (length new)))) | ||
| 14 | (while (>= i 0) | ||
| 15 | (aset new i (copy-tree (aref new i))) | ||
| 16 | (setq i (1- i))) | ||
| 17 | new) | ||
| 18 | tree))) | ||
| 19 | |||
| 20 | (fset 'current-time-seconds 'current-time) | ||
| 21 | |||
| 22 | (defun keymap-parent (keymap) | ||
| 23 | (let ((tail (cdr keymap))) | ||
| 24 | (while (and tail (not (eq (car tail) 'keymap))) | ||
| 25 | (setq tail (cdr tail))) | ||
| 26 | tail)) | ||
| 27 | |||
| 28 | (defun set-keymap-parent (keymap new-parent) | ||
| 29 | (let ((tail (cdr keymap))) | ||
| 30 | (while (and tail (cdr tail) (not (eq (car (cdr tail)) 'keymap))) | ||
| 31 | (setq tail (cdr tail))) | ||
| 32 | (if tail | ||
| 33 | (setcdr tail new-parent)))) | ||
| 34 | |||
| 35 | (defun remove-hook (hook-var function) | ||
| 36 | (if (boundp 'hook-var) | ||
| 37 | (set hook-var (delq function (symbol-value hook-var))))) | ||
| 38 | |||
| 39 | (defun remprop (symbol prop) | ||
| 40 | (let ((plist (symbol-plist symbol))) | ||
| 41 | (while (eq (car plist) prop) | ||
| 42 | (setplist symbol (setq plist (cdr (cdr plist))))) | ||
| 43 | (while plist | ||
| 44 | (if (eq (nth 2 plist) prop) | ||
| 45 | (setcdr (cdr plist) (nthcdr 4 plist))) | ||
| 46 | (setq plist (cdr (cdr plist)))))) | ||