Commits

cvs2hg  committed 9c7b3f3

fixup commit for tag 'sumo-2004-05-17'

  • Participants
  • Parent commits 72d7da4
  • Branches RELEASE_1_0
  • Tags sumo-2004-05-17

Comments (0)

Files changed (32)

-2004-09-16  Norbert Koch  <viteno@xemacs.org>
-
-	* Makefile (VERSION): XEmacs package 1.18 released.
-
-2004-09-15  Steve Youngs  <steve@youngs.au.com>
-
-	* lisp/xwem-clients.el (xwem-client-info): Typo fix. car -> cdr.
-
-2004-09-15  Norbert Koch  <viteno@xemacs.org>
-
-	* Makefile (VERSION): XEmacs package 1.17 released.
-
-2004-09-15  Steve Youngs  <steve@youngs.au.com>
-
-	* lisp/xwem-icons.el (xwem-icons-cl-icon): Remove redundant `if' in
-	previous patch.
-
-2004-09-15  Norbert Koch  <viteno@xemacs.org>
-
-	* Makefile (VERSION): XEmacs package 1.16 released.
-
-2004-09-15  Steve Youngs  <steve@youngs.au.com>
-
-	* lisp/xwem-icons.el (xwem-icons-cl-icon): Allow for a user set
-	icon path.
-
-2004-09-13  Norbert Koch  <viteno@xemacs.org>
-
-	* Makefile (VERSION): XEmacs package 1.15 released.
-
-	* lisp/xwem-interactive.el (read-from-minibuffer-for-xwem): Fix
-	build, add missing closing paren.
-
-2004-09-13  Steve Youngs  <steve@youngs.au.com>
-
-	* lisp/xwem-interactive.el: Use `symbol-function' in the defalias
-	for `read-from-minibuffer-for-xwem'.
-	This fixes a "exceeds max-specpdl-size" error when doing things
-	like `H-x b', `H-!' etc.
-
-2004-09-13  Steve Youngs  <steve@youngs.au.com>
-
-	* xwem-clients.el: Don't autoload `subtract-time' from time-date
-	at compile time as it isn't needed anymore.
-	(xwem-cl-get-uptime-1): New.
-	(xwem-cl-get-uptime): Use it.
-	This fixes a bug that meant a client's uptime couldn't be measured
-	beyond 65535 seconds.
-
-	The fix was inspired by code
-	From Sebastian Freundt <freundt@math.tu-berlin.de>
-
-2004-07-14  Norbert Koch  <viteno@xemacs.org>
-
-	* Makefile (VERSION): XEmacs package 1.14 released.
-
-2004-07-14  Steve Youngs  <steve@youngs.au.com>
-
-	* lisp/xwem-weather.el: New file.
-
-2004-07-13  Jerry James  <james@xemacs.org>
-
-	* lisp/xwem-clients.el:
-	* lisp/xwem-compat.el:
-	* lisp/xwem-frame.el:
-	* lisp/xwem-framei.el:
-	* lisp/xwem-holer.el:
-	* lisp/xwem-interactive.el:
-	* lisp/xwem-keyboard.el:
-	* lisp/xwem-keydefs.el:
-	* lisp/xwem-keymacro.el:
-	* lisp/xwem-launcher.el:
-	* lisp/xwem-main.el:
-	* lisp/xwem-minibuffer.el:
-	* lisp/xwem-misc.el:
-	* lisp/xwem-root.el:
-	* lisp/xwem-rooter.el:
-	* lisp/xwem-smartmods.el:
-	* lisp/xwem-strokes.el:
-	* lisp/xwem-tabbing.el:
-	* lisp/xwem-tray.el:
-	* lisp/xwem-win.el:
-	* lisp/xwem-worklog.el: Remove many autoloads, replacing them with
-	require forms.  Fix a few typos.
-
-2004-05-19  Norbert Koch  <viteno@xemacs.org>
-
-	* Makefile (VERSION): XEmacs package 1.13 released.
-
-2004-05-15  Steve Youngs  <steve@youngs.au.com>
-
-	* lisp/xwem-keyboard.el (xwem-kbd-quote-command): Removed
-	temporarily because it is broken and if used will cause xwem to
-	hang. 
-
-	* lisp/xwem-keydefs.el: Comment out binding for `H-q' which is
-	currently broken.
-
-	* lisp/xwem-worklog.el (xwem-worklog-auto-continue): Typo fix.
-	(xwem-worklog-end-task): Ditto.
-	(xwem-worklog-pause-task): Ditto.
-	(xwem-worklog-auto-worklog-file): Slightly massage the docstring.
-	Add a `:link' for worklog package's URL.
-
-	* Makefile (DONTCOMPILE): Add auto-autoloads.el and custom-load.el
-	so that they don't appear twice in the package tarball.
-
 2004-05-14  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.12 released.
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-VERSION = 1.18
+VERSION = 1.12
 AUTHOR_VERSION = 0.2
 MAINTAINER = Zajcev Evgeny <zevlg@yandex.ru>
 PACKAGE = xwem
 REQUIRES = xwem xemacs-base xlib strokes edit-utils text-modes time slider
 CATEGORY = standard
 
-DONTCOMPILE = lisp/_pkg.el lisp/auto-autoloads.el lisp/custom-load.el
-
+DONTCOMPILE = lisp/_pkg.el
+ 
 ELCS = $(patsubst %.el,%.elc,$(filter-out $(DONTCOMPILE),$(wildcard lisp/*.el)))
 
 DATA_FILES = $(wildcard icons/*.x[bp]m) logo.xpm

File lisp/xwem-clients.el

 
 (eval-when-compile
   ;; Shutup compiler
-  (require 'xlib-xwin)
   (require 'xwem-macros)
-  (require 'iswitchb)
+  (defvar iswitchb-buflist nil)
+  (autoload 'subtract-time "time-date")
+  (autoload 'iswitchb-read-buffer "iswitchb")
   )
-(require 'xwem-frame)
 
 ;;; Variables
 (defgroup xwem-cl nil
   :type 'number
   :group 'xwem-cl)
 
+;;;###autoload
 (defcustom xwem-cl-create-hook nil
   "Hook to call when creating new client."
   :type 'hook
   :group 'xwem-cl)
 
+;;;###autoload
 (defcustom xwem-cl-destroy-hook nil
   "Hooks called with one argument - cl, when cl destroyed.
 NOT USED YET."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-manage-hook nil
   "*Hooks to be called with just setuped CL as argument."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-demanage-hook nil
   "*Hooks to be called with just desetuped CL as argument."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-refit-hook nil
   "Hooks called when CL just refited."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-iconify-hook nil
   "Hooks called when CL just iconified."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-change-hook nil
   "Hooks called when something changed in CL."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-state-change-hook nil
   "*Hooks to run when state of client changes.
 Every hook called with three args - CL OLD-STATE NEW-STATE."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-mark-hook nil
   "*Hooks to run when marking client.
 Hooks called with two args - CL STATE.
   :group 'xwem-hooks)
 
 ;;; CL property change hooks
+;;;###autoload
 (defcustom xwem-cl-wmnh-change-hooks nil
   "Hooks to be called when WM_NORMAL_HINTS changes."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-wmname-change-hooks nil
   "Hooks to be called when WM_NAME changes."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-wmcommand-chage-hooks nil
   "Hooks to be called when WM_COMMAND changes."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-wmclass-change-hooks nil
   "Hooks to be called when WM_CLASS changes."
   :type 'hook
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-cl-wmh-change-hooks nil
   "Hooks to be called when WM_HINTS changes."
   :type 'hook
   wm-transient-for
   wm-protocols)
 
+;;;###autoload
 (defconst xwem-client-ev-mask (Xmask-or XM-ColormapChange XM-PropertyChange
 					XM-FocusChange XM-EnterWindow XM-LeaveWindow
 					XM-StructureNotify XM-ResizeRedirect)
   "Return non-nil if CL has already destroyed xwin."
   (eq (xwem-cl-state cl) 'destroyed))
 
+;;;###autoload
 (defsubst xwem-cl-put-prop (cl prop val)
   "In CL's property list put property PROP with value VAL."
   (setf (xwem-cl-plist cl) (plist-put (xwem-cl-plist cl) prop val)))
 (put 'xwem-cl-put-prop 'lisp-indent-function 2)
 
+;;;###autoload
 (defsubst xwem-cl-get-prop (cl prop)
   "From CL's property list get property PROP."
   (plist-get (xwem-cl-plist cl) prop))
 
+;;;###autoload
 (defsubst xwem-cl-rem-prop (cl prop)
   "From CL's property list remove property PROP."
   (setf (xwem-cl-plist cl) (plist-remprop (xwem-cl-plist cl) prop)))
     (run-hook-with-args 'xwem-cl-state-change-hook cl old-state state)
     ))
 
+;;;###autoload
 (defsubst xwem-cl-managed-p (cl &optional win)
   "Return non-nil if client CL is managed, i.e. has 'managed or 'normal state."
   (and (or (not win) (eq (xwem-cl-win cl) win))
   (let ((gmt (xwem-cl-xgeom cl)))
     (cons (X-Geom-width gmt) (X-Geom-height gmt))))
 
-(defun xwem-cl-get-uptime-1 (cl)
-  (let ((ctime (current-time))
-        (stime (xwem-cl-start-time cl)))
-    (list (- (nth 0 ctime) (nth 0 stime))
-          (- (nth 1 ctime) (nth 1 stime))
-          (- (nth 2 ctime) (nth 2 stime)))))
+(unless (fboundp 'subtract-time)
+  (defun subtract-time (t1 t2)
+    "Subtract two internal times."
+    (let ((borrow (< (cadr t1) (cadr t2))))
+      (list (- (car t1) (car t2) (if borrow 1 0))
+	    (- (+ (if borrow 65536 0) (cadr t1)) (cadr t2))))))
 
 ;;;###autoload
 (defun xwem-cl-get-uptime (cl &optional format)
 %m is replaced by the minutes
 %s is replaced by the seconds
 %A is replaced by autogenerated format."
-  (let* ((upt (xwem-cl-get-uptime-1 cl))
-	 (upt (+ (* (nth 0 upt) 65536) (mod (nth 1 upt) 65536)))
-	 (days (/ upt 86400))
-	 (hours (/ (mod upt 86400) 3600))
-	 (minutes (/ (mod upt 3600) 60))
-	 (seconds (mod upt 60))
-	 (fmt (or format "%A"))
-	 (rup ""))
+  (let ((upt (nth 1 (subtract-time (current-time) (xwem-cl-start-time cl))))
+	(fmt (or format "%A"))
+	(days 0)
+	(hours 0)
+	(minutes 0)
+	(seconds 0)
+	(rup ""))
     
+    (when (> upt (* 60 60 24))
+      (setq days (/ upt (* 60 60 24))))
+
+    (when (> upt (* 60 60))
+      (setq hours (% (/ upt (* 60 60)) 24)))
+
+    (when (> upt 60)
+      (setq minutes (% (/ upt 60) 60)))
+
+    (setq seconds (% upt 60))
+
     (let ((flst (string-to-list fmt))
 	  chr)
       (while flst
 		      (setq rup (concat rup (format "%d" seconds))))
 		     ((= chr ?A)
 		      (setq rup (concat
-				 (cond ((> days 0) (format "%dd %dh %dm %ds" days hours minutes seconds))
-				       ((> hours 0) (format "%dh %dm %ds" hours minutes seconds))
+				 (cond ((> days 0) (format "%dd %dh" days hours))
+				       ((> hours 0) (format "%dh %dm" hours minutes))
 				       ((> minutes 0) (format "%dm %ds" minutes seconds))
 				       ((> seconds 0) (format "%d seconds" seconds))
 				       (t "")))))
 	  (xwem-message 'info "id: 0x%d, usize: %dx%d, psize: %dx%d, uptime: %s, name: `%s'"
 			(X-Win-id (xwem-cl-xwin client))
 			(car usz) (cdr usz)
-			(car psz) (cdr psz)
+			(car psz) (car psz)
 			(xwem-cl-get-uptime client)
 			(xwem-client-name client)))
       (xwem-message 'warn "No active clients found.")))

File lisp/xwem-compat.el

       (define-prefix-command name)
     (define-prefix-command name t)))
 
+;;;###autoload
 (unless (fboundp 'set-keymap-default-binding)
   (fset 'set-keymap-default-binding
 	(lambda (keym cmd) (define-key keym [t] cmd))))
 
+;;;###autoload
 (unless (fboundp 'events-to-keys)
   (defalias 'events-to-keys 'identity))
 

File lisp/xwem-events.el

 ;;
 ;;; Code
 
-(eval-when-compile
-  (require 'xlib-xwin))
 
 (defun xwem-ev-defhnd (xdpy win xev)
   "Default X-Events handler."

File lisp/xwem-faces.el

 
 ;;; Code:
 (require 'cus-face)			; for `custom-face-get-spec'
-(eval-when-compile
-  (require 'xlib-xlib)
-  (require 'xwem-misc))
 
 
 (defgroup xwem-faces nil

File lisp/xwem-focus.el

 
 ;;; Code:
 
-(eval-when-compile
-  (require 'xlib-xwin)
-  (require 'xwem-clients))
 
 ;;;###autoload
 (defvar xwem-focus-stack nil

File lisp/xwem-frame.el

 ;;; Code
 
 
-(eval-when-compile
-  (require 'xlib-xlib)
-  (require 'xwem-misc))
-(require 'xlib-xinerama)
+(autoload 'X-XIneramaQueryScreens "xlib-xinerama")
 
 ;;; Variables
 (defgroup xwem-frame nil
   :group 'xwem-hooks)
   
 ;; Variables
+;;;###autoload
 (defconst xwem-frame-ev-mask (Xmask-or XM-Exposure
 				       XM-StructureNotify
 				       XM-SubstructureRedirect
   "Fit FRAME to screen sizes."
   (xwem-interactive (list (xwem-frame-selected)))
 
-  ;; Take into account XInerama layout
+  ;; Take into acount XInerama layout
   (let ((frect (X-Geom-to-X-Rect (xwem-frame-xgeom frame)))
 	(xin (X-XIneramaQueryScreens (xwem-dpy))))
     (if (car xin)

File lisp/xwem-framei.el

 
 ;;; Code:
 
-(require 'xwem-compat)
 (require 'xwem-osd)
 
 (defgroup xwem-framei nil
   "Face used to draw in framei dockapp."
   :group 'xwem-faces)
 
+;;;###autoload
 (defcustom xwem-framei-dockapp-format-function 'xwem-framei-dockapp-default-format
   "Function passed with one arg - frame, should return string to display."
   :type 'funtion

File lisp/xwem-holer.el

 
 ;;; Code:
 (require 'xlib-xshape)
-(eval-when-compile
-  (require 'xlib-xlib)
-  (require 'xwem-misc))
 
 
 (defgroup xwem-holer nil
 
 
 ;;; Define holer prefix map
+;;;###autoload
 (xwem-define-prefix-command 'xwem-holer-prefix t)
 (defvar xwem-holer-map (symbol-function 'xwem-holer-prefix)
   "Keymap for holer (\\<xwem-global-map>\\[xwem-holer-prefix]) commands.

File lisp/xwem-icons.el

 
 ;;; Code:
 
-(eval-when-compile
-  (require 'xlib-xlib))
 (require 'xlib-xpm)
 
 (defvar xwem-icons-dir (locate-data-directory "xwem")
     (when iname
       (setq ximg (plist-get xwem-icons-list iname))
       (unless ximg
-	(setq fname (expand-file-name iname xwem-icons-dir))
+	(setq fname (concat xwem-icons-dir "/" iname))
 	(setq ximg (X:xpm-pixmap-from-file (xwem-dpy) (XDefaultRootWindow (xwem-dpy)) fname))
 	(setq ximg-mask-pixmap (X:xpm-pixmap-from-file (xwem-dpy) (XDefaultRootWindow (xwem-dpy)) fname t))
 

File lisp/xwem-interactive.el

 ;;;###autoload
 (defvar xwem-interactively nil
   "Non-nil when xwem in interactive mode.
-Internal variable, do not modify.")
+Internal variabel, do not modify.")
 
-(defalias 'read-from-minibuffer-for-xwem (symbol-function 'read-from-minibuffer))
+;;;###autoload
+(fset 'read-from-minibuffer-for-xwem (symbol-function 'read-from-minibuffer))
 
 
 ;;;###autoload

File lisp/xwem-keyboard.el

 ;;; Code:
 
 
-(eval-when-compile
-  (require 'xwem-clients))
-(require 'xlib-xtest)
-(require 'xwem-compat)
+(eval-and-compile
+  (require 'xlib-xtest))
 
 ;;{{{ [-] Custamizable xwem-keyboard group
 
   :group 'xwem-keyboard
   :group 'xwem-hooks)
 
+;;;###autoload
 (defcustom xwem-keyboard-echo-keystrokes t
   "*If non-nil than echo unfinished commands in echo area."
   :type 'boolean
   "List of evil masks.
 Internal variable, DO NOT MODIFY.")
 
+;;;###autoload
 (defcustom xwem-quit-key [(hyper ?g)]
   "Quit command key."
   :type 'sexp
   :group 'xwem-keyboard)
 
+;;;###autoload
 (defcustom xwem-quit-command 'xwem-keyboard-quit
   "Default command to be called when `xwem-quit-key' pressed."
   :type 'function
   :type 'sexp
   :group 'xwem-keyboard)
 
+;;;###autoload
 (defcustom xwem-prefix-help-command 'xwem-describe-prefix-bindings
   "Default command to be called when `xwem-help-key' pressed."
   :type 'function
   :group 'xwem-keys)
 
+;;;###autoload
 (defcustom xwem-universal-key [(hyper ?u)]
   "Key for universal argument commands."
   :type 'sexp
 
     (setq xwem-kbd-now-grabbing nil)))
 
-;;; FIXME: this does bad, naughty things.
-;; ;;;###autoload(autoload 'xwem-kbd-quote-command "xwem-keyboard" "" t)
-;; (define-xwem-command xwem-kbd-quote-command ()
-;;   "Pass event EV to currently active window.
-;; DOES NOT WORK."
-;;   (xwem-interactive "_")
+;;;###autoload(autoload 'xwem-kbd-quote-command "xwem-keyboard" "" t)
+(define-xwem-command xwem-kbd-quote-command ()
+  "Pass event EV to currently active window.
+DOES NOT WORK."
+  (xwem-interactive "_")
 
-;;   (let ((xwin (xwem-focus-xcurrent)))
-;;     (when (X-Win-p xwin)
-;;       (XGrabKeyboard (xwem-dpy) xwin nil X-GrabModeAsync X-GrabModeSync)
-;;       (XGrabPointer (xwem-dpy) xwin (Xmask-or XM-ButtonPress XM-ButtonRelease)
-;; 		    xwem-cursor-quote nil X-GrabModeSync)
-;;       (XAllowEvents (xwem-dpy) X-SyncBoth)
+  (let ((xwin (xwem-focus-xcurrent)))
+    (when (X-Win-p xwin)
+      (XGrabKeyboard (xwem-dpy) xwin nil X-GrabModeAsync X-GrabModeSync)
+      (XGrabPointer (xwem-dpy) xwin (Xmask-or XM-ButtonPress XM-ButtonRelease)
+		    xwem-cursor-quote nil X-GrabModeSync)
+      (XAllowEvents (xwem-dpy) X-SyncBoth)
 
-;;       (xwem-message 'info "[Quote key]")
-;;       (unwind-protect
-;; 	  (let ((done nil)
-;; 		xev)
-;; 	    (while (not done)
-;; 	      (setq xev (xwem-next-event 1))
-;;               (cond ((X-Event-p xev)
-;;                      (if (and (member (X-Event-type xev)
-;;                                       (list X-KeyPress X-ButtonPress X-ButtonRelease))
-;;                               (xwem-kbd-xevents->emacs-events (list xev) t))
-;;                          (progn
-;;                            (xwem-message 'info "here")
-;;                            (XAllowEvents (xwem-dpy) X-ReplayKeyboard)
-;;                            (XAllowEvents (xwem-dpy) X-ReplayPointer)
-;;                            (xwem-clear-message)
-;;                            (setq done t))
+      (xwem-message 'info "[Quote key]")
+      (unwind-protect
+	  (let ((done nil)
+		xev)
+	    (while (not done)
+	      (setq xev (xwem-next-event 1))
+              (cond ((X-Event-p xev)
+                     (if (and (member (X-Event-type xev)
+                                      (list X-KeyPress X-ButtonPress X-ButtonRelease))
+                              (xwem-kbd-xevents->emacs-events (list xev) t))
+                         (progn
+                           (xwem-message 'info "here")
+                           (XAllowEvents (xwem-dpy) X-ReplayKeyboard)
+                           (XAllowEvents (xwem-dpy) X-ReplayPointer)
+                           (xwem-clear-message)
+                           (setq done t))
 
-;;                        (XAllowEvents (X-Event-dpy xev) X-SyncBoth)))
-;;                     (t (setq done t)))))
+                       (XAllowEvents (X-Event-dpy xev) X-SyncBoth)))
+                    (t (setq done t)))))
 
-;; 	(XUngrabKeyboard (xwem-dpy))
-;; 	(XUngrabPointer (xwem-dpy))
-;; 	))))
+	(XUngrabKeyboard (xwem-dpy))
+	(XUngrabPointer (xwem-dpy))
+	))))
 
 ;;}}}
 

File lisp/xwem-keydefs.el

 ;; 
 
 ;;; Code:
-(require 'xwem-compat)
-(require 'xwem-keyboard)
 
 (defmacro xwem-keymap-put-prop (keymap prop value)
   "In on of xwem KEYMAP put property PROP with VALUE."
 (define-key xwem-global-map (xwem-kbd "H-x") 'xwem-Hyper-X-prefix)
 
 ;; Help
+;;;###autoload
 (defvar xwem-help-map (symbol-function (xwem-define-prefix-command 'xwem-help-prefix t))
   "Keymap for help (\\<xwem-global-map>\\[xwem-help-prefix]) commands.
 
 (define-key xwem-hyp-x-5-map (xwem-kbd "H-a") 'xwem-launcher-other-frame-prefix)
 
 ;; Keyboard macros keymap
+;;;###autoload
 (defvar xwem-user-macros-map (symbol-function (xwem-define-prefix-command 'xwem-user-macros-prefix t))
   "Keymap of user defined keyboard macros (\\<xwem-global-map>\\[xwem-user-macros-prefix]) commands.
 
 (define-key xwem-global-map (xwem-kbd "H-g") xwem-quit-command)
 (define-key xwem-global-map (xwem-kbd "H-G") 'xwem-kbd-quit)
 
-;; Quoting keyboard  currently doesn't work --SY.
-;(define-key xwem-global-map (xwem-kbd "H-q") 'xwem-kbd-quote-command)
+;; Quoting keyboard
+(define-key xwem-global-map (xwem-kbd "H-q") 'xwem-kbd-quote-command)
 
 ;; help keys
 (define-key xwem-global-map (xwem-kbd "H-h H-h") 'xwem-help-for-help)

File lisp/xwem-keymacro.el

 
 ;;; Code:
 
-(require 'xwem-compat)
 (eval-and-compile
   (require 'xlib-xtest)
   (require 'xlib-xrecord))

File lisp/xwem-launcher.el

 
 ;;; Code:
 
-;(require 'completer)
-(require 'comint)
-(eval-when-compile
-  (require 'xlib-xlib))
+(eval-and-compile
+;  (require 'completer)
+  (require 'comint))
 
 (autoload 'executable-find "executable")
 
   :type 'boolean
   :group 'xwem-launcher)
 
+;;;###autoload
 (defcustom xwem-launcher-function 'xwem-execute-program
   "Function to be used to execute external program."
   :type 'function
     (xwem-frame-select oframe))
   )
 
+;;;###autoload
 (defsubst xwem-launch (cmd)
   "Execute CMD using `xwem-launcher'."
   (funcall xwem-launcher-function cmd))
   "Popup menu."
   (xwem-interactive (list (X-Win-get-prop (X-Event-win xwem-last-xevent) 'ladock-action)))
 
-  (let (cls menu)
+  (let (cls menu oldfrnum)
     (mapc (lambda (cl)
             (when (string-match (cdr action) (xwem-hints-wm-command (xwem-cl-hints cl)))
               (setq cls (cons cl cls))))

File lisp/xwem-main.el

 
 
 (eval-when-compile
-  (require 'cl)				;last, intersection etc
-  (require 'xlib-xwin))
+  (require 'cl))			;last, intersection etc
+
 (eval-when 'load
   (load "xwem-keydefs")
   (run-hooks 'xwem-load-hook))
-(require 'xwem-root)
 
 ;;;###autoload
 (defconst xwem-version "xwem(xemacs-package):  $Revision$")
   :type '(restricted-sexp :match-alternatives (stringp null))
   :group 'xwem)
 
+;;;###autoload
 (defcustom xwem-load-hook nil
   "*Hooks to call after xwem was load."
   :type 'hook

File lisp/xwem-manage.el

 ;;
 
 ;;; Code
-(eval-when-compile
-  (require 'xlib-xlib)
-  (require 'xwem-misc))
 
 
 ;; Variables

File lisp/xwem-minibuffer.el

 ;; such as messages displaying, system tray, etc.
 
 ;;; Code:
-(eval-when-compile
-  (require 'xlib-xwin)
-  (require 'xwem-misc))
 
 ;;;###autoload
 (defstruct xwem-minib
   :type '(restricted-sexp :match-alternatives ('nil try-font-name))
   :group 'xwem-minibuffer)
 
+;;;###autoload
 (defcustom xwem-minibuffer-height 1
   "Height of `xwem-minibuffer'."
   :type 'number
   :group 'xwem-minibuffer)
 
+;;;###autoload
 (defcustom xwem-minibuffer-width 80
   "*Usable width of `xwem-minibuffer' frame."
   :type 'number
   :group 'xwem-minibuffer)
 
+;;;###autoload
 (defcustom xwem-minibuffer-border-width 3
   "Border width for `xwem-minibuffer'."
   :type 'number

File lisp/xwem-misc.el

 ;;; Code:
 ;;
 
-(require 'xlib-xwin)
 
 (eval-and-compile
   (defvar elp-function-list nil)        ; shut up compiler
 (defvar xwem-cursor-help nil "Cursor when in help mode.")
 
 ;;; Functions
+;;;###autoload
 (defsubst xwem-misc-colorspec->rgb-vector (colspec)
   "Conver color specification COLSPEC to internal representation.
 COLSPEC maybe in form: #RRGGBB or name like 'green4'."
   (vconcat (color-instance-rgb-components (make-color-instance colspec))))
 
+;;;###autoload
 (defsubst xwem-misc-colorspec->rgb-vector-safe (colspec &optional defret)
   "Validate COLSPEC to be color specification in safe manner.
 Return DEFRET or [0 0 0] if there was error."
       (xwem-misc-colorspec->rgb-vector colspec)
     (t (or defret [0 0 0]))))
 
+;;;###autoload
 (defsubst xwem-misc-colorspec-valid-p (colspec)
   "Return non-nil if COLSPEC is valid color specification.
 Valid colorspecification is spec in form: #RRGGBB or name like 'green4'."

File lisp/xwem-osd.el

 ;;; Code:
 
 (eval-when-compile
-  (require 'cl)
-  (require 'xlib-xlib))
+  (require 'cl))
+
 (require 'xlib-xshape)
 
 (defconst xwem-osd-instance-types '(text line dots arc rect)

File lisp/xwem-root.el

 ;; window. Also has macros to work with geometry.
 ;;
 ;;; Code
-(require 'xlib-xlib)
-
 
 ;;; Variables
 
+;;;###autoload
 (defconst xwem-root-ev-mask (Xmask-or XM-SubstructureNotify XM-SubstructureRedirect
                                       XM-KeyPress XM-ButtonPress XM-ButtonRelease
 				      XM-PropertyChange

File lisp/xwem-rooter.el

 ;; 
 
 ;;; Code:
-(require 'xlib-xwin)
 
 (defgroup xwem-rooter nil
   "Group to customize rooter apps."

File lisp/xwem-smartmods.el

 ;;; Code:
 
 
-(eval-when-compile
-  (require 'xlib-xwin))
-(require 'xlib-xtest)
-(require 'xwem-keyboard)
-
 ;; Smart modifiers:
 ;;  smart modifiers is modifiers which can work as normal modifier and
 ;;  as key if it is not used with some other key(when you just

File lisp/xwem-special.el

 ;;    - Models
 
 ;;; Code:
-(eval-when-compile
-  (require 'xlib-xwin)
-  (require 'xwem-misc))
 
 (defgroup xwem-special nil
   "Group to customize special emacs frames handling."

File lisp/xwem-strokes.el

 ;; 
 
 ;;; Code:
-(eval-when-compile
-  (require 'xwem-misc))
-(require 'strokes)
-(require 'xwem-compat)
-(require 'xwem-keyboard)
+
+(eval-and-compile
+  (require 'strokes))
 
 (defgroup xwem-strokes nil
   "Group to customize XWEM strokes."
   :group 'xwem-faces)
 
 ;; Stroke variables
+;;;###autoload
 (defvar xwem-strokes-keymap 
   (let ((map (make-sparse-keymap)))
     (set-keymap-default-binding map 'xwem-strokes-nocmd)

File lisp/xwem-tabbing.el

 
 ;;; Code:
 
-(eval-when-compile
-  (require 'xlib-xlib)
-  (require 'xwem-clients))
-(require 'xwem-keyboard)
 
 (defconst xwem-tab-states
   '(xwem-face-tab-selected-active
   :prefix "xwem-face-"
   :group 'xwem)
 
+;;;###autoload
 (defcustom xwem-tab-default-format " %i %*%# %n"
   "*Default format for tab item."
   :type 'string
       (xwem-tabber-draw tabber))
     ))
 
+;;;###autoload
 (defsubst xwem-tabber-safe-regeom (tabber &optional draw-p)
   "Saf variant of `xwem-tabber-regeom'."
   (and (xwem-tabber-p tabber)
       )
     ))
 
+;;;###autoload
 (defsubst xwem-client-get-tab-item (cl)
   "Get tab item associated with CL."
   (xwem-cl-get-prop cl 'tab-item))
 
+;;;###autoload
 (defsubst xwem-client-set-tab-item (tabi cl)
   "Associate tab item TABI with client CL."
   (xwem-cl-put-prop cl 'tab-item tabi))

File lisp/xwem-time.el

 ;;; Code:
 
 (eval-when-compile
-  (require 'xwem-misc)
-  (require 'xlib-xlib))
+  (require 'itimer))
 
 (require 'time)
 

File lisp/xwem-tray.el

 ;;
 ;;; Code:
 
-(eval-when-compile
-  (require 'xlib-xlib)
-  (require 'xwem-misc))
-
 ;;; xwem tray constants
 (defconst xwem-tc-dock-req 0 "Dock place request.")
 (defconst xwem-tc-message 1 "Message from dock app.")

File lisp/xwem-weather.el

-;;; xwem-weather.el --- Display weather information in XWEM dock.
-
-;; Copyright (C) 2004 by Free Software Foundation, Inc.
-
-;; Author: Steve Youngs <steve@youngs.au.com>
-;; Created: 2004-06-22
-;; Keywords: xwem
-;; X-CVS: $Id$
-
-;; This file is part of XWEM.
-
-;; XWEM is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XWEM is distributed in the hope that it will be useful, but WITHOUT
-;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
-;; License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
-
-;;; Synched up with: Not in FSF
-
-;;; Commentary:
-
-;; Display weather information (current local temp) in the dock area.
-;; Optionally display a frame with more detailed weather information.
-
-;; Set this up by adding the following code to your ~/.xwem/xwemrc.el
-
-;; (require 'xwem-weather)
-;; (customize-set-variable 'xwem-weather-update-frequency 3600)
-;; (add-hook 'xwem-after-init-hook 'xwem-weather-init)
-
-
-;;; Code:
-
-
-(require 'xwem-osd)
-(require 'itimer)
-
-(defgroup xwem-weather nil
-  "XWEM Weather options."
-  :prefix "xwem-weather-"
-  :group 'xwem)
-
-(defcustom xwem-weather-station-id "ybbn"
-  "*The four letter weather station ID.
-
-The default setting is the author's local station, Brisbane,
-Australia.  So you can all be jealous of the wonderful weather we
-have in Australia. :-P"
-  :type 'string
-  :group 'xwem-weather)
-
-(defvar xwem-weather-osd nil)
-
-(defvar xwem-weather-frequency)
-
-(defun xwem-weather-alter-update-frequency (value)
-  "Alters the update frequency of the weather updates.
-
-DO NOT CALL THIS FUNCTION DIRECTLY.  Change the update frequency
-by customising `xwem-weather-update-frequency'.  You MUST use
-`customize-set-variable' to do so.
-
-Argument SYM is the symbol name of what is changing the frequency.  It
-will always be `xwem-weather-update-frequency'.
-
-Argument VALUE is an integer determining how often, in seconds, to
-update the weather data."
-  (let ((itimer (get-itimer "xwem-weather-itimer")))
-    (cond ((and (xwem-osd-p xwem-weather-osd)
-		value
-		itimer)
-	   (set-itimer-value itimer value)
-	   (set-itimer-restart itimer value))
-	  ((and (xwem-osd-p xwem-weather-osd)
-		(eq value 0)
-		itimer)
-	   (delete-itimer itimer))
-	  ((and (xwem-osd-p xwem-weather-osd)
-		(> value 0)
-		(not itimer))
-	   (start-itimer "xwem-weather-itimer"
-			 'xwem-weather-update
-			 value value))
-	  (t nil))
-    (setq xwem-weather-frequency value)
-    (message (format "Weather update frequency set to: %d seconds" value))))
-
-(defcustom xwem-weather-update-frequency 0
-  "*The number of seconds between updates of the weather info.
-
-Most weather stations only update once/hour so it might not be very
-beneficial to set this to lower than an hour.
-
-If this is set to 0 updates will not happen.
-
-If you want to set this outside of the custom interface, you MUST use
-`customize-set-variable'."
-  :type '(choice
-	  (integer :tag "Do not update" 0)
-	  (integer :tag "Every 10 minutes" 600)
-	  (integer :tag "Every 15 minutes" 900)
-	  (integer :tag "Every 30 minutes" 1800)
-	  (integer :tag "Every 60 minutes" 3600)
-	  (integer :tag "Every 2 hours" 7200)
-	  (integer :tag "Every 4 hours" 14400)
-	  (integer :tag "Every 12 hours" 43200)
-	  (integer :tag "Every 24 hours" 86400)
-	  (integer :tag "Other"))
-  :set '(lambda (sym value)
-	  (xwem-weather-alter-update-frequency value))
-  :initialize 'custom-initialize-default
-  :group 'xwem-weather)
-
-(defcustom xwem-weather-data-directory xwem-dir
-  "*The directory to story weather data files."
-  :type '(directory :must-match t)
-  :group 'xwem-weather)
-
-(defcustom xwem-weather-data-file
-  (expand-file-name xwem-weather-station-id xwem-weather-data-directory)
-  "*File to hold the weather data."
-  :type 'file
-  :group 'xwem-weather)
-
-(defcustom xwem-weather-temperature-format 'celsius
-  "*Display temperature in Celsius or Fahrenheit."
-  :type '(choice
-	  (const :tag "Celsius" celsius)
-	  (const :tag "Fahrenheit" fahrenheit))
-  :group 'xwem-weather)
-
-(defface xwem-weather-osd-face
-  '((((class color))
-     (:foreground "cyan" :family "fixed" :size "12pt"))
-    (t
-     (:family "fixed" :size "12pt")))
-  "*Face for the weather OSD."
-  :group 'xwem-weather)
-
-(defconst xwem-weather-url-fqdn "weather.noaa.gov"
-  "FQDN part of the weather URL.")
-
-(defconst xwem-weather-url-dir "pub/data/observations/metar/decoded"
-  "Directory part of the weather URL.")
-
-(defun xwem-weather-retrieve-update ()
-  "Retrieve weather info."
-  (let* ((host xwem-weather-url-fqdn)
-	 (dir xwem-weather-url-dir)
-	 (file (upcase (concat xwem-weather-station-id ".txt")))
-	 (path (concat dir "/" file))
-	 (user-agent (concat "XEmacs " emacs-program-version))
-	 (http (open-network-stream "xwem-weather-update"
-				    " *xwem-weather-update-buf*"
-				    host 80))
-	 (pbuf (process-buffer http)))
-    (process-send-string
-     http
-     (concat "GET /" path " HTTP/1.1\r\n"
-	     "MIME-Version: 1.0\r\n"
-	     "Connection: close\r\n"
-	     "Extension: Security/Digest Security/SSL\r\n"
-	     "Host: " host "\r\n"
-	     "Accept: */*\r\n"
-	     "User-Agent: " user-agent "\r\n\r\n"))
-    (while (eq (process-status http) 'open)
-      (sleep-for 0.05))
-    (with-temp-buffer
-      (erase-buffer)
-      (insert-buffer pbuf)
-      (goto-char (point-min))
-      (re-search-forward "^Content-Length: \\([0-9]+.*$\\)" nil t)
-      (let* ((file-length (string-to-int (match-string 1)))
-	     (file-begin (progn
-			   (goto-char (point-min))
-			   (re-search-forward "^Content-Type:" nil t)
-			   (forward-line 2)
-			   (point-at-bol))))
-	(goto-char file-begin)
-	(forward-char file-length)
-	(narrow-to-region file-begin (point))
-	(write-region (point-min) (point-max) xwem-weather-data-file)))
-    (kill-buffer pbuf)))
-
-(defun xwem-weather-get-temp ()
-  "Return the temperature as a string from the weather data file."
-  (with-temp-buffer
-    (erase-buffer)
-    (insert-file-contents-literally xwem-weather-data-file)
-    (goto-char (point-min))
-    (re-search-forward "^Temperature: \\(-?[0-9]+ F\\) (\\(-?[0-9]+ C\\))" nil t)
-    (let ((temp-f (match-string 1))
-	  (temp-c (match-string 2)))
-      (if (eq xwem-weather-temperature-format 'celsius)
-	  temp-c
-	temp-f))))
-
-(define-xwem-command xwem-weather-show-details ()
-  "doc string"
-  (interactive)
-  (xwem-help-display
-   (insert-file-contents xwem-weather-data-file)))
-
-(define-xwem-command xwem-weather-update ()
-  "*Update the weather OSD."
-  (interactive)
-  (xwem-weather-retrieve-update)
-  (when (xwem-osd-p xwem-weather-osd)
-    (let* ((text (xwem-weather-get-temp))
-	   (face `xwem-weather-osd-face)
-	   (width (+ 3 (X-Text-width
-			(xwem-dpy)
-			(X-Font-get (xwem-dpy)
-				    (face-font-name face))
-			text)))
-	   (height (+ 3 (X-Text-height
-			 (xwem-dpy)
-			 (X-Font-get (xwem-dpy)
-				     (face-font-name face))
-			 text))))
-      (xwem-osd-text xwem-weather-osd text)
-      (xwem-osd-set-width xwem-weather-osd width)
-      (xwem-osd-set-height xwem-weather-osd height))))
-
-(define-key xwem-global-map (xwem-kbd "H-c W d") 'xwem-weather-show-details)
-(define-key xwem-global-map (xwem-kbd "H-c W u") 'xwem-weather-update)
-
-(defvar xwem-weather-osd-keymap
-  (let ((map (make-sparse-keymap 'xwem-weather-osd-keymap)))
-    (define-key map [button1] 'xwem-weather-show-details)
-    (define-key map [button2] 'xwem-weather-update)
-    map)
-  "Keymap for weather OSD.")
-
-(define-xwem-command xwem-weather-display-temp (&optional force)
-  "*Display the current temperature using OSD."
-  (xwem-interactive "P")
-  (when force
-    (xwem-weather-retrieve-update))
-  (let* ((face `xwem-weather-osd-face)
-	 (text (xwem-weather-get-temp))
-	 (width (+ 3 (X-Text-width
-		      (xwem-dpy)
-		      (X-Font-get (xwem-dpy)
-				  (face-font-name face))
-		      text)))
-	 (height (+ 3 (X-Text-height
-		       (xwem-dpy)
-		       (X-Font-get (xwem-dpy)
-				   (face-font-name face))
-		       text))))
-    (if (xwem-osd-p xwem-weather-osd)
-	(progn
-	  (xwem-osd-text xwem-weather-osd text)
-	  (xwem-osd-set-width xwem-weather-osd width)
-	  (xwem-osd-set-height xwem-weather-osd height))      
-      (setq xwem-weather-osd (xwem-osd-create-dock
-			      (xwem-dpy)
-			      width
-			      height
-			      (list 'keymap xwem-weather-osd-keymap)))
-      (xwem-osd-set-color xwem-weather-osd (face-foreground-name face))
-      (xwem-osd-set-font xwem-weather-osd (face-font-name face))
-      (xwem-osd-text xwem-weather-osd text)
-      (xwem-osd-show xwem-weather-osd))))
-
-(defun xwem-weather-init ()			    
-  "Initialise the weather dock."
-  (when (xwem-osd-p xwem-weather-osd)
-    (xwem-osd-destroy xwem-weather-osd))
-  (when (itimerp (get-itimer "xwem-weather-itimer"))
-    (delete-itimer (get-itimer "xwem-weather-itimer")))
-  (xwem-weather-display-temp 'force)
-  (unless (eq xwem-weather-frequency 0)
-    (start-itimer "xwem-weather-itimer"
-		  'xwem-weather-update
-		  xwem-weather-frequency
-		  xwem-weather-frequency)))
-
-
-(provide 'xwem-weather)
-
-;;; xwem-weather.el ends here

File lisp/xwem-win.el

 
 ;;; Code
 
-(eval-when-compile
-  (require 'xwem-clients))
 
 ;;; Customization
 (defgroup xwem-win nil
   :prefix "xwem-win-"
   :group 'xwem)
 
+;;;###autoload
 (defcustom xwem-win-min-width 80
   "*Minimal width for window"
   :type 'number
   :group 'xwem-win)
 
+;;;###autoload
 (defcustom xwem-win-min-height 80
   "*Minimal height for window"
   :type 'number

File lisp/xwem-worklog.el

 
 ;;; Code:
 
-(require 'xwem-compat)
+(eval-when-compile
+  (require 'cl))
+
 (require 'xwem-diagram)
-(require 'xwem-keyboard)
-(eval-when-compile
-  (require 'xlib-xlib)
-  (require 'xwem-misc))
 
 (defstruct xwem-worklog-pause
   (type 'pause)                         ; type of pause, can be 'pause or 'list
   :group 'xwem-worklog)
 
 (defcustom xwem-worklog-auto-continue nil
-  "*Non-nil means auto continue when a task is started/stopped while in pause."
+  "*Non-nil mean auto continue, when task started/stoped while in pause."
   :type 'boolean
   :group 'xwem-worklog)
 
 (defcustom xwem-worklog-auto-worklog-file nil
   "*Non-nil mean save changes all the time to `xwem-worklog-file'.
 Note that `xwem-worklog-task-time-decrease' and
-`xwem-worklog-task-time-increase' wont change file entries.  If you
-set this to non-nil you will need the worklog package, which you can
-get from: http://www.emacswiki.org/elisp/worklog.el"
+`xwem-worklog-task-time-increase' wont change file entries.
+Seting value to non-nil make sure you have worklog package, placed at
+http://www.emacswiki.org/elisp/worklog.el"
   :type 'boolean
-  :link '(url-link "http://www.emacswiki.org/elisp/worklog.el")
   :group 'xwem-worklog)
 
 (defcustom xwem-worklog-save-worklog-file-on-logout t
   :type 'alist
   :group 'xwem-worklog)
 
+;;;###autoload
 (xwem-define-prefix-command 'xwem-worklog-prefix t)
 (defvar xwem-worklog-map (symbol-function 'xwem-worklog-prefix)
   "Keymap for xwem worklog (\\<xwem-global-map>\\[xwem-worklog-prefix]) commands.
     (xwem-worklog-task-update-total-time task)
     (xwem-worklog-task-update-today-time task)
 
-    (xwem-message 'info "WORKLOG: task '%s' stopped." (xwem-worklog-task-name xwem-worklog-current-task))
+    (xwem-message 'info "WORKLOG: task '%s' stoped." (xwem-worklog-task-name xwem-worklog-current-task))
     (setq xwem-worklog-current-task nil))
   )
 
   (xwem-worklog-task-change-time '+ arg))
 
 (defun xwem-worklog-pause-task (task)
-  "Pause TASK."
+  "Pause task named by NAME."
   (unless (cdr (car (xwem-worklog-task-times task)))
     (setcdr (car (xwem-worklog-task-times task))
             (current-time))
 
     (when xwem-worklog-auto-worklog-file
       ;; XXX logout/login is special tasks that does not need to be
-      ;; stopped
+      ;; stoped
       (unless (or (string= (xwem-worklog-task-name task) "logout")
                   (string= (xwem-worklog-task-name task) "login"))
         (xwem-worklog-add-entry "stop")))