;;; @ Compilation.
;;;
-(fset 'defalias 'fset)
+(defun defalias (sym newdef)
+ "Set SYMBOL's function definition to NEWVAL, and return NEWVAL."
+ (fset sym newdef))
(defun byte-code-function-p (object)
"Return t if OBJECT is a byte-compiled function object."
("GMT-8" . -800)("GMT-9" . -900)("GMT-10" . -1000)
("GMT-11" . -1100) ("GMT-12" . -1200))
"Time differentials of timezone from GMT in +-HHMM form.
-Used in `current-time-zone' (Emacs 19 emulating function in poe-18.el).")
+Used in `current-time-zone' (Emacs 19 emulating function by APEL).")
(defvar current-time-local-timezone nil
"*Local timezone name.
-Used in `current-time-zone' (Emacs 19 emulating function in poe-18.el).")
+Used in `current-time-zone' (Emacs 19 emulating function by APEL).")
(defun set-time-zone-rule (tz)
"Set the local time zone using TZ, a string specifying a time zone rule.
(setq lyear (and (zerop (% yyyy 4))
(or (not (zerop (% yyyy 100)))
(zerop (% yyyy 400)))))
- (while (> (- dd (nth mm mdays)) 0)
- (if (and (= mm 1) lyear)
- (setq dd (- dd 29))
- (setq dd (- dd (nth mm mdays))))
+ (while (> (- dd (if (and lyear (= mm 1)) 29 (nth mm mdays))) 0)
+ (setq dd (- dd (if (and lyear (= mm 1)) 29 (nth mm mdays))))
(setq mm (1+ mm)))
(setq HH (/ low 3600)
low (% low 3600)
;;; @@ Floating point numbers.
;;;
-(defalias 'numberp 'integerp)
-
(defun abs (arg)
"Return the absolute value of ARG."
(if (< arg 0) (- arg) arg))
-(defun floor (arg &optional divisor)
- "Return the largest integer no grater than ARG.
-With optional DIVISOR, return the largest integer no greater than ARG/DIVISOR."
- (if (null divisor)
- (setq divisor 1))
- (if (< arg 0)
- (- (/ (- divisor 1 arg) divisor))
- (/ arg divisor)))
-
;;; @ Basic lisp subroutines.
;;;
;;;
;; 18.55 does not have these variables.
-(defvar buffer-undo-list nil)
-(defvar-maybe auto-fill-function nil)
-(defvar-maybe unread-command-event nil)
-(defvar-maybe unread-command-events nil)
+(defvar-maybe buffer-undo-list nil
+ "List of undo entries in current buffer.
+APEL provides this as dummy for a compatibility.")
+
+(defvar-maybe auto-fill-function nil
+ "Function called (if non-nil) to perform auto-fill.
+APEL provides this as dummy for a compatibility.")
+
+(defvar-maybe unread-command-event nil
+ "APEL provides this as dummy for a compatibility.")
+(defvar-maybe unread-command-events nil
+ "List of events to be read as the command input.
+APEL provides this as dummy for a compatibility.")
+
+;; (defvar-maybe minibuffer-setup-hook nil
+;; "Normal hook run just after entry to minibuffer.")
+;; (defvar-maybe minibuffer-exit-hook nil
+;; "Normal hook run just after exit from minibuffer.")
+
+(defvar-maybe minor-mode-map-alist nil
+ "Alist of keymaps to use for minor modes.
+APEL provides this as dummy for a compatibility.")
-(defalias 'buffer-disable-undo 'buffer-flush-undo)
(defalias 'insert-and-inherit 'insert)
(defalias 'insert-before-markers-and-inherit 'insert-before-markers)
(defalias 'number-to-string 'int-to-string)
If fourth arg READ is non-nil, then interpret the result as a lisp object
and return that object:
in other words, do `(car (read-from-string INPUT-STRING))'
-Fifth arg HIST is ignored in this implementatin."
+Fifth arg HIST is ignored in this implementation."
(si:read-from-minibuffer prompt initial-contents keymap read))))
;; Add optional argument `frame'.
(fset 'si:get-buffer-window (symbol-function 'get-buffer-window))
(defun get-buffer-window (buffer &optional frame)
"Return a window currently displaying BUFFER, or nil if none.
-Optional argunemt FRAME is ignored in this implementation."
+Optional argument FRAME is ignored in this implementation."
(si:get-buffer-window buffer))))
+(defun-maybe walk-windows (proc &optional minibuf all-frames)
+ "Cycle through all visible windows, calling PROC for each one.
+PROC is called with a window as argument.
+
+Optional second arg MINIBUF t means count the minibuffer window even
+if not active. MINIBUF nil or omitted means count the minibuffer iff
+it is active. MINIBUF neither t nor nil means not to count the
+minibuffer even if it is active.
+Optional third argument ALL-FRAMES is ignored in this implementation."
+ (if (window-minibuffer-p (selected-window))
+ (setq minibuf t))
+ (let* ((walk-windows-start (selected-window))
+ (walk-windows-current walk-windows-start))
+ (unwind-protect
+ (while (progn
+ (setq walk-windows-current
+ (next-window walk-windows-current minibuf))
+ (funcall proc walk-windows-current)
+ (not (eq walk-windows-current walk-windows-start))))
+ (select-window walk-windows-start))))
+
+(defun buffer-disable-undo (&optional buffer)
+ "Make BUFFER stop keeping undo information.
+No argument or nil as argument means do this for the current buffer."
+ (buffer-flush-undo (or buffer (current-buffer))))
+
+
+;;; @@ Frame (Emacs 18 cannot make frame)
+;;;
+;; The following four are frequently used for manipulating the current frame.
+;; frame.el has `screen-width', `screen-height', `set-screen-width' and
+;; `set-screen-height' for backward compatibility and declare them as obsolete.
+(defun frame-width (&optional frame)
+ "Return number of columns available for display on FRAME.
+If FRAME is omitted, describe the currently selected frame."
+ (screen-width))
+
+(defun frame-height (&optional frame)
+ "Return number of lines available for display on FRAME.
+If FRAME is omitted, describe the currently selected frame."
+ (screen-height))
+
+(defun set-frame-width (frame cols &optional pretend)
+ "Specify that the frame FRAME has COLS columns.
+Optional third arg non-nil means that redisplay should use COLS columns
+but that the idea of the actual width of the frame should not be changed."
+ (set-screen-width cols pretend))
+
+(defun set-frame-height (frame lines &optional pretend)
+ "Specify that the frame FRAME has LINES lines.
+Optional third arg non-nil means that redisplay should use LINES lines
+but that the idea of the actual height of the frame should not be changed."
+ (set-screen-height lines pretend))
+
;;; @@ Environment variables.
;;;
;;; @ Overlay.
;;;
-(cond
- ((boundp 'NEMACS)
- (defvar emu:available-face-attribute-alist
- '(
- ;;(bold . inversed-region)
- (italic . underlined-region)
- (underline . underlined-region)))
-
- ;; by YAMATE Keiichirou 1994/10/28
- (defun attribute-add-narrow-attribute (attr from to)
- (or (consp (symbol-value attr))
- (set attr (list 1)))
- (let* ((attr-value (symbol-value attr))
- (len (car attr-value))
- (posfrom 1)
- posto)
- (while (and (< posfrom len)
- (> from (nth posfrom attr-value)))
- (setq posfrom (1+ posfrom)))
- (setq posto posfrom)
- (while (and (< posto len)
- (> to (nth posto attr-value)))
- (setq posto (1+ posto)))
- (if (= posto posfrom)
- (if (= (% posto 2) 1)
- (if (and (< to len)
- (= to (nth posto attr-value)))
- (set-marker (nth posto attr-value) from)
- (setcdr (nthcdr (1- posfrom) attr-value)
- (cons (set-marker-type (set-marker (make-marker)
- from)
- 'point-type)
- (cons (set-marker-type
- (set-marker (make-marker)
- to)
- nil)
- (nthcdr posto attr-value))))
- (setcar attr-value (+ len 2))))
- (if (= (% posfrom 2) 0)
- (setq posfrom (1- posfrom))
- (set-marker (nth posfrom attr-value) from))
- (if (= (% posto 2) 0)
- nil
- (setq posto (1- posto))
- (set-marker (nth posto attr-value) to))
- (setcdr (nthcdr posfrom attr-value)
- (nthcdr posto attr-value)))))
-
- (defalias 'make-overlay 'cons)
-
- (defun overlay-put (overlay prop value)
- (let ((ret (and (eq prop 'face)
- (assq value emu:available-face-attribute-alist))))
- (if ret
- (attribute-add-narrow-attribute (cdr ret)
- (car overlay)(cdr overlay))))))
- (t
- (defun make-overlay (beg end &optional buffer type))
- (defun overlay-put (overlay prop value))))
-
+(defun overlayp (object))
+(defun make-overlay (beg end &optional buffer front-advance rear-advance))
+(defun move-overlay (overlay beg end &optional buffer))
+(defun delete-overlay (overlay))
+(defun overlay-start (overlay))
+(defun overlay-end (overlay))
(defun overlay-buffer (overlay))
-
+(defun overlay-properties (overlay))
+(defun overlays-at (pos))
+(defun overlays-in (beg end))
+(defun next-overlay-change (pos))
+(defun previous-overlay-change (pos))
+(defun overlay-lists ())
+(defun overlay-recenter (pos))
+(defun overlay-get (overlay prop))
+(defun overlay-put (overlay prop value))
;;; @ End.
;;;