tm 7.49.
[elisp/apel.git] / emu-18.el
index 468fecd..b9df350 100644 (file)
--- a/emu-18.el
+++ b/emu-18.el
@@ -6,7 +6,7 @@
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Version:
-;;;    $Id: emu-18.el,v 7.5 1996/01/25 02:09:46 morioka Exp $
+;;;    $Id: emu-18.el,v 7.10 1996/04/11 01:04:34 morioka Exp $
 ;;; Keywords: emulation, compatibility
 ;;;
 ;;; This file is part of tl (Tiny Library).
@@ -30,7 +30,7 @@
 ;;; @ hook
 ;;;
 
-;; This function is imported from AUC TeX.
+;; These function are imported from Emacs 19.28.
 (defun add-hook (hook function &optional append)
   "Add to the value of HOOK the function FUNCTION.
 FUNCTION is not added if already present.
@@ -66,6 +66,25 @@ function, it is changed to a list of functions.
             ))
       ))
 
+(defun remove-hook (hook function)
+  "Remove from the value of HOOK the function FUNCTION.
+HOOK should be a symbol, and FUNCTION may be any valid function.  If
+FUNCTION isn't the value of HOOK, or, if FUNCTION doesn't appear in the
+list of hooks to run in HOOK, then nothing is done.  See `add-hook'.
+\[emu-18.el; Emacs 19 emulating function]"
+  (if (or (not (boundp hook))          ;unbound symbol, or
+         (null (symbol-value hook))    ;value is nil, or
+         (null function))              ;function is nil, then
+      nil                              ;Do nothing.
+    (let ((hook-value (symbol-value hook)))
+      (if (consp hook-value)
+         (setq hook-value (delete function hook-value))
+       (if (equal hook-value function)
+           (setq hook-value nil)
+         ))
+      (set hook hook-value)
+      )))
+
 
 ;;; @ list
 ;;;
@@ -102,12 +121,12 @@ to be sure of changing the value of `foo'.
 ;;; @ function
 ;;;
 
-(defun defalias (SYM NEWDEF)
+(defun defalias (sym newdef)
   "Set SYMBOL's function definition to NEWVAL, and return NEWVAL.
 Associates the function with the current load file, if any.
 \[emu-18.el; Emacs 19 emulating function]"
-  (fset SYM (symbol-function NEWDEF))
-  NEWDEF)
+  (fset sym newdef)
+  )
 
 (defun byte-code-function-p (exp)
   "T if OBJECT is a byte-compiled function object.
@@ -181,6 +200,25 @@ to create parent directories if they don't exist.
   )
 
 
+;;; @ mode-line
+;;;
+
+;;; Imported from Emacs 19.30.
+(defun force-mode-line-update (&optional all)
+  "Force the mode-line of the current buffer to be redisplayed.
+With optional non-nil ALL, force redisplay of all mode-lines.
+\[emu-18.el; Emacs 19 emulating function]"
+  (if all (save-excursion (set-buffer (other-buffer))))
+  (set-buffer-modified-p (buffer-modified-p)))
+
+
+;;; @ text property
+;;;
+
+(defun tl:set-text-properties (start end props &optional object))
+(defun tl:overlay-buffer (overlay))
+
+
 ;;; @ mouse
 ;;;
 
@@ -189,6 +227,15 @@ to create parent directories if they don't exist.
 (defvar mouse-button-3 nil)
 
 
+;;; @ string
+;;;
+
+(defun char-list-to-string (char-list)
+  "Convert list of character CHAR-LIST to string. [emu-18.el]"
+  (mapconcat (function char-to-string) char-list "")
+  )
+
+
 ;;; @ end
 ;;;