+\[emu-18.el; EMACS 19 emulating function]"
+ (fset sym newdef)
+ )
+
+(defun byte-code-function-p (exp)
+ "T if OBJECT is a byte-compiled function object.
+\[emu-18.el; EMACS 19 emulating function]"
+ (and (consp exp)
+ (let* ((rest (cdr (cdr exp))) elt)
+ (if (stringp (car rest))
+ (setq rest (cdr rest))
+ )
+ (catch 'tag
+ (while rest
+ (setq elt (car rest))
+ (if (and (consp elt)(eq (car elt) 'byte-code))
+ (throw 'tag t)
+ )
+ (setq rest (cdr rest))
+ ))
+ )))
+
+(defmacro-maybe defsubst (name arglist &rest body)
+ "Define an inline function. The syntax is just like that of `defun'."
+ (cons 'defun (cons name (cons arglist body)))
+ )
+
+
+;;; @ file
+;;;
+
+(defun make-directory-internal (dirname)
+ "Create a directory. One argument, a file name string.
+\[emu-18.el; EMACS 19 emulating function]"
+ (if (file-exists-p dirname)
+ (error "Creating directory: %s is already exist" dirname)
+ (if (not (= (call-process "mkdir" nil nil nil dirname) 0))
+ (error "Creating directory: no such file or directory, %s" dirname)
+ )))
+
+(defun make-directory (dir &optional parents)
+ "Create the directory DIR and any nonexistent parent dirs.
+The second (optional) argument PARENTS says whether
+to create parent directories if they don't exist.
+\[emu-18.el; EMACS 19 emulating function]"
+ (let ((len (length dir))
+ (p 0) p1 path)
+ (catch 'tag
+ (while (and (< p len) (string-match "[^/]*/?" dir p))
+ (setq p1 (match-end 0))
+ (if (= p1 len)
+ (throw 'tag nil)
+ )
+ (setq path (substring dir 0 p1))
+ (if (not (file-directory-p path))
+ (cond ((file-exists-p path)
+ (error "Creating directory: %s is not directory" path)
+ )
+ ((null parents)
+ (error "Creating directory: %s is not exist" path)
+ )
+ (t
+ (make-directory-internal path)
+ ))
+ )
+ (setq p p1)
+ ))
+ (make-directory-internal dir)
+ ))
+
+;; Imported from files.el of EMACS 19.33.
+(defun parse-colon-path (cd-path)
+ "Explode a colon-separated list of paths into a string list."
+ (and cd-path
+ (let (cd-prefix cd-list (cd-start 0) cd-colon)
+ (setq cd-path (concat cd-path path-separator))
+ (while (setq cd-colon (string-match path-separator cd-path cd-start))
+ (setq cd-list
+ (nconc cd-list
+ (list (if (= cd-start cd-colon)
+ nil
+ (substitute-in-file-name
+ (file-name-as-directory
+ (substring cd-path cd-start cd-colon)))))))
+ (setq cd-start (+ cd-colon 1)))
+ cd-list)))
+
+;; Imported from files.el of EMACS 19.33.
+(defun file-relative-name (filename &optional directory)
+ "Convert FILENAME to be relative to DIRECTORY (default: default-directory)."
+ (setq filename (expand-file-name filename)
+ directory (file-name-as-directory (expand-file-name
+ (or directory default-directory))))
+ (let ((ancestor ""))
+ (while (not (string-match (concat "^" (regexp-quote directory)) filename))
+ (setq directory (file-name-directory (substring directory 0 -1))
+ ancestor (concat "../" ancestor)))
+ (concat ancestor (substring filename (match-end 0)))))
+
+(or (fboundp 'si:directory-files)
+ (fset 'si:directory-files (symbol-function 'directory-files)))
+(defun directory-files (directory &optional full match nosort)
+ "Return a list of names of files in DIRECTORY.
+There are three optional arguments:
+If FULL is non-nil, return absolute file names. Otherwise return names
+ that are relative to the specified directory.
+If MATCH is non-nil, mention only file names that match the regexp MATCH.
+If NOSORT is dummy for compatibility.
+\[emu-18.el; EMACS 19 emulating function]"
+ (si:directory-files directory full match)
+ )
+
+
+;;; @ mark
+;;;
+
+(or (fboundp 'si:mark)
+ (fset 'si:mark (symbol-function 'mark)))
+(defun mark (&optional force)
+ (si:mark)
+ )
+
+
+;;; @ 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)))
+
+
+;;; @ overlay
+;;;
+
+(defun overlay-buffer (overlay))
+
+
+;;; @ text property
+;;;
+
+(defun remove-text-properties (start end properties &optional object))
+
+
+;;; @@ visible/invisible
+;;;
+
+(defmacro enable-invisible ()
+ (`
+ (progn
+ (make-local-variable 'original-selective-display)
+ (setq original-selective-display selective-display)
+ (setq selective-display t)
+ )))
+
+(defmacro end-of-invisible ()
+ (` (setq selective-display
+ (if (boundp 'original-selective-display)
+ original-selective-display))
+ ))
+
+(defun invisible-region (start end)
+ (let ((buffer-read-only nil) ;Okay even if write protected.
+ (modp (buffer-modified-p)))
+ (if (save-excursion
+ (goto-char (1- end))
+ (eq (following-char) ?\n)
+ )
+ (setq end (1- end))
+ )
+ (unwind-protect
+ (subst-char-in-region start end ?\n ?\^M t)
+ (set-buffer-modified-p modp)
+ )))
+
+(defun visible-region (start end)
+ (let ((buffer-read-only nil) ;Okay even if write protected.
+ (modp (buffer-modified-p)))
+ (unwind-protect
+ (subst-char-in-region start end ?\^M ?\n t)
+ (set-buffer-modified-p modp)
+ )))
+
+(defun invisible-p (pos)
+ (save-excursion
+ (goto-char pos)
+ (eq (following-char) ?\^M)
+ ))
+
+(defun next-visible-point (pos)
+ (save-excursion
+ (goto-char pos)
+ (end-of-line)
+ (if (eq (following-char) ?\n)
+ (forward-char)
+ )
+ (point)
+ ))
+
+
+;;; @ mouse
+;;;
+
+(defvar mouse-button-1 nil)
+(defvar mouse-button-2 nil)
+(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 "")
+ )
+
+
+;;; @ buffer
+;;;
+
+(defun-maybe generate-new-buffer-name (name &optional ignore)
+ "Return a string that is the name of no existing buffer based on NAME.
+If there is no live buffer named NAME, then return NAME.
+Otherwise modify name by appending `<NUMBER>', incrementing NUMBER
+until an unused name is found, and then return that name.
+Optional second argument IGNORE specifies a name that is okay to use
+\(if it is in the sequence to be tried)
+even if a buffer with that name exists."
+ (if (get-buffer name)
+ (let ((n 2) new)
+ (while (get-buffer (setq new (format "%s<%d>" name n)))
+ (setq n (1+ n)))
+ new)
+ name))
+
+
+;;; @ end
+;;;