From: minakaji Date: Sat, 16 Dec 2000 01:22:35 +0000 (+0000) Subject: * poe-18.el (frame-width): New function. X-Git-Tag: apel-10_3~35 X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fapel.git;a=commitdiff_plain;h=4004f01ed820fe1be8811e14150812298ea26470 * poe-18.el (frame-width): New function. (frame-height): Ditto. (set-frame-width): Ditto. (set-frame-heigth): Ditto. (read-from-minibuffer): Run `minibuffer-setup-hook' and `minibuffer-exit-hook'. (buffer-undo-list): Declared with `defvar-maybe' and add doc string. (auto-fill-function): Add doc string. (unread-command-event): Ditto. (unread-command-events): Ditto. (minibuffer-setup-hook): New variable. (minibuffer-exit-hook): Ditto. (minor-mode-map-alist): Ditto. (minor-mode-alist): Ditto. (minor-mode-overriding-map-alist): Ditto. --- diff --git a/ChangeLog b/ChangeLog index bc39490..37fba5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2000-12-16 NAKAJIMA Mikio + + * poe-18.el (frame-width): New function. + (frame-height): Ditto. + (set-frame-width): Ditto. + (set-frame-heigth): Ditto. + (read-from-minibuffer): Run `minibuffer-setup-hook' and + `minibuffer-exit-hook'. + (buffer-undo-list): Declared with `defvar-maybe' and add doc + string. + (auto-fill-function): Add doc string. + (unread-command-event): Ditto. + (unread-command-events): Ditto. + (minibuffer-setup-hook): New variable. + (minibuffer-exit-hook): Ditto. + (minor-mode-map-alist): Ditto. + (minor-mode-alist): Ditto. + (minor-mode-overriding-map-alist): Ditto. + 2000-12-15 NAKAJIMA Mikio * make.bat (listing): Bug fixed. diff --git a/poe-18.el b/poe-18.el index 67c7a4d..bfdc0cd 100644 --- a/poe-18.el +++ b/poe-18.el @@ -512,10 +512,34 @@ With optional non-nil ALL, force redisplay of all mode-lines." ;;; ;; 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. +poe-18.el provides this as dummy for a compatibility.") + +(defvar-maybe auto-fill-function nil + "Function called (if non-nil) to perform auto-fill. +poe-18.el provides this as dummy for a compatibility.") + +(defvar-maybe unread-command-event nil + "poe-18.el provides this as dummy for a compatibility.") +(defvar-maybe unread-command-events nil + "List of events to be read as the command input. +poe-18.el 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. +poe-18.el provides this as dummy for a compatibility.") +(defvar-maybe minor-mode-alist nil + "Alist saying how to show minor modes in the mode line. +poe-18.el provides this as dummy for a compatibility.") +(defvar-maybe minor-mode-overriding-map-alist nil + "Alist of keymaps to use for minor modes, in current major mode. +poe-18.el provides this as dummy for a compatibility.") (defalias 'insert-and-inherit 'insert) (defalias 'insert-before-markers-and-inherit 'insert-before-markers) @@ -569,7 +593,17 @@ 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." - (si:read-from-minibuffer prompt initial-contents keymap read)))) + (with-current-buffer + (get-buffer-create + (format " *Minibuf-%d*" (minibuffer-depth))) + (run-hooks 'minibuffer-setup-hook)) + (si:read-from-minibuffer prompt initial-contents keymap read) + (with-current-buffer + (get-buffer-create + (format " *Minibuf-%d*" (minibuffer-depth))) + (condition-case nil + (run-hooks 'minibuffer-exit-hook) + (error)))))) ;; Add optional argument `frame'. (or (fboundp 'si:get-buffer-window) @@ -606,6 +640,34 @@ Optional third argunemt ALL-FRAMES is ignored in this implementation." 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 manupulating the current frame. +;; frame.el has `screen-width', `screen-height', `set-screen-width' and +;; `set-screen-heigth' 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-heigth (frame cols &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-heigth cols pretend)) + ;;; @@ Environment variables. ;;;