]> code.delx.au - gnu-emacs/blobdiff - lisp/term/w32-win.el
Delete the autoloads for functions defined with ibuffer-specific commands.
[gnu-emacs] / lisp / term / w32-win.el
index 9cc3d2c0b82d4d09f8b55edce6e9d6a25eb8ccfa..2f7cb28608c50bfd29f388c67140dc2086fa2f2b 100644 (file)
 (require 'faces)
 (require 'select)
 (require 'menu-bar)
-(if (fboundp 'new-fontset)
-    (require 'fontset))
-
-;; Because Windows scrollbars look and act quite differently compared
-;; with the standard X scroll-bars, we don't try to use the normal
-;; scroll bar routines.
+(require 'fontset)
 
-(defun w32-handle-scroll-bar-event (event)
-  "Handle W32 scroll bar EVENT to do normal Window style scrolling."
-  (interactive "e")
-  (let ((old-window (selected-window)))
-    (unwind-protect
-       (let* ((position (event-start event))
-              (window (nth 0 position))
-              (portion-whole (nth 2 position))
-              (bar-part (nth 4 position)))
-         (save-excursion
-           (select-window window)
-           (cond
-            ((eq bar-part 'up)
-             (goto-char (window-start window))
-             (scroll-down 1))
-            ((eq bar-part 'above-handle)
-             (scroll-down))
-            ((eq bar-part 'handle)
-             (scroll-bar-maybe-set-window-start event))
-            ((eq bar-part 'below-handle)
-             (scroll-up))
-            ((eq bar-part 'down)
-             (goto-char (window-start window))
-             (scroll-up 1))
-            )))
-      (select-window old-window))))
-
-;; The following definition is used for debugging.
+;; The following definition is used for debugging scroll bar events.
 ;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event))
 
-(global-set-key [vertical-scroll-bar mouse-1] 'w32-handle-scroll-bar-event)
-
-;; (scroll-bar-mode nil)
-
 (defvar mouse-wheel-scroll-amount 4
   "*Number of lines to scroll per click of the mouse wheel.")
 
@@ -300,15 +264,24 @@ the last file dropped is selected."
 
 (defun x-handle-geometry (switch)
   "Handle the \"-geometry\" SWITCH."
-  (let ((geo (x-parse-geometry (car x-invocation-args))))
-    (setq initial-frame-alist
-         (append initial-frame-alist
-                 (if (or (assq 'left geo) (assq 'top geo))
-                     '((user-position . t)))
-                 (if (or (assq 'height geo) (assq 'width geo))
-                     '((user-size . t)))
-                 geo)
-         x-invocation-args (cdr x-invocation-args))))
+  (let* ((geo (x-parse-geometry (car x-invocation-args)))
+        (left (assq 'left geo))
+        (top (assq 'top geo))
+        (height (assq 'height geo))
+        (width (assq 'width geo)))
+    (if (or height width)
+       (setq default-frame-alist
+             (append default-frame-alist
+                     '((user-size . t))
+                     (if height (list height))
+                     (if width (list width)))))
+    (if (or left top)
+       (setq initial-frame-alist
+             (append initial-frame-alist
+                     '((user-position . t))
+                     (if left (list left))
+                     (if top (list top)))))
+    (setq x-invocation-args (cdr x-invocation-args))))
 
 (defun x-handle-name-rn-switch (switch)
   "Handle a \"-name\" or \"-rn\" SWITCH."