Mercurial > hg > xemacs-beta
changeset 772:d682c0f82a71
[xemacs-hg @ 2002-03-13 10:00:06 by ben]
a few bytecomp warning fixes, run autoconf just in case
author | ben |
---|---|
date | Wed, 13 Mar 2002 10:00:09 +0000 |
parents | 943eaba38521 |
children | 4bc4fecf15da |
files | lisp/resize-minibuffer.el lisp/subr.el lisp/term/bg-mouse.el lisp/term/sup-mouse.el |
diffstat | 4 files changed, 38 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/resize-minibuffer.el Wed Mar 13 08:54:06 2002 +0000 +++ b/lisp/resize-minibuffer.el Wed Mar 13 10:00:09 2002 +0000 @@ -36,7 +36,7 @@ ;; This file has received maintenance by the XEmacs development team. -;; $Id: resize-minibuffer.el,v 1.2 2002/03/13 08:52:08 ben Exp $ +;; $Id: resize-minibuffer.el,v 1.3 2002/03/13 10:00:06 ben Exp $ ;; This package allows the entire contents (or as much as possible) of the ;; minibuffer to be visible at once when typing. As the end of a line is @@ -160,14 +160,12 @@ nil t) (make-local-hook 'post-command-hook) (add-hook 'post-command-hook 'resize-minibuffer-frame nil t) - (unless (and (boundp 'icomplete-mode) - icomplete-mode) + (unless (if-boundp 'icomplete-mode icomplete-mode) (resize-minibuffer-frame))))) (t (make-local-hook 'post-command-hook) (add-hook 'post-command-hook 'resize-minibuffer-window nil t) - (unless (and (boundp 'icomplete-mode) - icomplete-mode) + (unless (if-boundp 'icomplete-mode icomplete-mode) (resize-minibuffer-window))))))) (defun resize-minibuffer-count-window-lines (&optional start end)
--- a/lisp/subr.el Wed Mar 13 08:54:06 2002 +0000 +++ b/lisp/subr.el Wed Mar 13 10:00:09 2002 +0000 @@ -3,7 +3,7 @@ ;; Copyright (C) 1985, 1986, 1992, 1994-5, 1997 Free Software Foundation, Inc. ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. ;; Copyright (C) 1995 Sun Microsystems. -;; Copyright (C) 2000, 2001 Ben Wing. +;; Copyright (C) 2000, 2001, 2002 Ben Wing. ;; Maintainer: XEmacs Development Team ;; Keywords: extensions, dumped @@ -516,9 +516,10 @@ (let ((col 0) (len (length string)) (i 0)) - (while (< i len) - (setq col (+ col (charset-width (char-charset (aref string i))))) - (setq i (1+ i))) + (with-fboundp '(charset-width char-charset) + (while (< i len) + (setq col (+ col (charset-width (char-charset (aref string i))))) + (setq i (1+ i)))) col) (length string)))
--- a/lisp/term/bg-mouse.el Wed Mar 13 08:54:06 2002 +0000 +++ b/lisp/term/bg-mouse.el Wed Mar 13 10:00:09 2002 +0000 @@ -25,6 +25,9 @@ ;;; Code: +;;; #### utterly broken. I've put in hacks so we don't get byte-comp +;;; warnings, but this shit should go NOW. --ben + ;;; Original version by John Robinson (jr@bbn-unix.arpa, bbncca!jr), Oct 1985 ;;; Modularized and enhanced by gildea@bbn.com Nov 1987 ;;; Time stamp <89/03/21 14:27:08 gildea> @@ -49,6 +52,13 @@ ;;; Defuns: +;; #### bunch of crap. +(globally-declare-boundp 'mouse-map) + +(defun bg-window-edges (&optional win) + (error "not implemented") + (window-pixel-edges win)) + (defun bg-mouse-report (prefix-arg) "Read, parse, and execute a BBN BitGraph mouse click. @@ -66,6 +76,7 @@ To reinitialize the mouse if the terminal is reset, type ESC : RET" (interactive "P") + (declare (special bg-mouse-x bg-mouse-y bg-cursor-window)) (bg-get-tty-num semicolon) (let* ((screen-mouse-x (min (1- (frame-width)) ;don't hit column 86! @@ -75,8 +86,8 @@ (bg-mouse-buttons (% (bg-get-tty-num ?c) 8)) (bg-mouse-window (bg-window-from-x-y screen-mouse-x screen-mouse-y)) (bg-cursor-window (selected-window)) - (edges (window-edges bg-mouse-window)) - (minibuf-p (= screen-mouse-y (1- (screen-height)))) + (edges (bg-window-edges bg-mouse-window)) + (minibuf-p (= screen-mouse-y (1- (frame-height)))) (in-modeline-p (and (not minibuf-p) (= screen-mouse-y (1- (nth 3 edges))))) (in-scrollbar-p (and (not minibuf-p) (not in-modeline-p) @@ -110,6 +121,7 @@ (defun bg-set-point () "Move point to location of BitGraph mouse." (interactive) + (declare (special bg-mouse-x bg-mouse-y)) (bg-move-point-to-x-y bg-mouse-x bg-mouse-y) (setq this-command 'next-line) ;make subsequent line moves work (setq temporary-goal-column bg-mouse-x)) @@ -117,6 +129,7 @@ (defun bg-set-mark () "Set mark at location of BitGraph mouse." (interactive) + (declare (special bg-mouse-x bg-mouse-y)) (push-mark) (bg-move-point-to-x-y bg-mouse-x bg-mouse-y) (exchange-point-and-mark)) @@ -124,6 +137,7 @@ (defun bg-yank () "Move point to location of BitGraph mouse and yank." (interactive "*") + (declare (special bg-mouse-x bg-mouse-y)) (bg-move-point-to-x-y bg-mouse-x bg-mouse-y) (setq this-command 'yank) (yank)) @@ -147,6 +161,7 @@ "Go to location in buffer that is the same percentage of the way through the buffer as the BitGraph mouse's X position in the window." (interactive) + (declare (special bg-mouse-x bg-mouse-y)) ;; check carefully for overflow in intermediate calculations (goto-char (cond ((zerop bg-mouse-x) @@ -165,17 +180,20 @@ (defun bg-mouse-line-to-top () "Scroll the line pointed to by the BitGraph mouse to the top of the window." (interactive) + (declare (special bg-mouse-x bg-mouse-y)) (scroll-up bg-mouse-y)) (defun bg-mouse-line-to-center () "Scroll the line pointed to by the BitGraph mouse to the center of the window." (interactive) + (declare (special bg-mouse-x bg-mouse-y)) (scroll-up (/ (+ 2 bg-mouse-y bg-mouse-y (- (window-height))) 2))) (defun bg-mouse-line-to-bottom () "Scroll the line pointed to by the mouse to the bottom of the window." (interactive) + (declare (special bg-mouse-x bg-mouse-y)) (scroll-up (+ bg-mouse-y (- 2 (window-height))))) (defun bg-kill-region () @@ -186,6 +204,7 @@ "Insert a copy of the word (actually sexp) that the mouse is pointing at. Sexp is inserted into the buffer at point (where the text cursor is)." (interactive) + (declare (special bg-mouse-x bg-mouse-y bg-cursor-window)) (let ((moused-text (save-excursion (bg-move-point-to-x-y bg-mouse-x bg-mouse-y) @@ -254,7 +273,7 @@ (defun bg-window-from-x-y (x y) "Find window corresponding to screen coordinates. X and Y are 0-based character positions on the screen." - (let ((edges (window-edges)) + (let ((edges (bg-window-edges)) (window nil)) (while (and (not (eq window (selected-window))) (or (< y (nth 1 edges)) @@ -262,7 +281,7 @@ (< x (nth 0 edges)) (>= x (nth 2 edges)))) (setq window (next-window window)) - (setq edges (window-edges window))) + (setq edges (bg-window-edges window))) (cond ((eq window (selected-window)) nil) ;we've looped: not found ((not window)
--- a/lisp/term/sup-mouse.el Wed Mar 13 08:54:06 2002 +0000 +++ b/lisp/term/sup-mouse.el Wed Mar 13 10:00:09 2002 +0000 @@ -46,6 +46,10 @@ ;;; Defuns: +(defun sup-window-edges (&optional win) + (error "not implemented") + (window-pixel-edges win)) + (defun sup-mouse-report () "This function is called directly by the mouse, it parses and executes the mouse commands. @@ -71,7 +75,7 @@ (x (sup-get-tty-num ?\;)) (y (sup-get-tty-num ?c)) (window (sup-pos-to-window x y)) - (edges (window-edges window)) + (edges (sup-window-edges window)) (old-window (selected-window)) (in-minibuf-p (eq y (1- (frame-height)))) (same-window-p (and (not in-minibuf-p) (eq window old-window))) @@ -190,7 +194,7 @@ (defun sup-pos-to-window (x y) "Find window corresponding to frame coordinates. X and Y are 0-based character positions on the frame." - (let ((edges (window-edges)) + (let ((edges (sup-window-edges)) (window nil)) (while (and (not (eq window (selected-window))) (or (< y (nth 1 edges)) @@ -198,7 +202,7 @@ (< x (nth 0 edges)) (>= x (nth 2 edges)))) (setq window (next-window window)) - (setq edges (window-edges window)) + (setq edges (sup-window-edges window)) ) (or window (selected-window)) )