This commit was generated by cvs2svn to compensate for changes in r367,
authortomo <tomo>
Mon, 5 Jul 1999 09:44:08 +0000 (09:44 +0000)
committertomo <tomo>
Mon, 5 Jul 1999 09:44:08 +0000 (09:44 +0000)
which included commits to RCS files with non-trunk default branches.

20 files changed:
configure.usage
lisp/help.el
lisp/lib-complete.el
lisp/list-mode.el
lisp/menubar-items.el
lisp/simple.el
src/bytecode.c
src/console-tty.c
src/console.c
src/elhash.c
src/event-msw.c
src/extents.c
src/glyphs-msw.c
src/glyphs-x.c
src/glyphs.h
src/marker.c
src/nt.c
src/opaque.c
src/sheap.c
src/sysdep.c

index 5bbaa91..e104857 100644 (file)
@@ -47,6 +47,9 @@ Compilation options:
 Installation options:
 
 --prefix=DIR            Install files below DIR.  Defaults to `/usr/local'.
+--with-prefix          Compile the value of --prefix into the executable.
+                        Defaults to `yes'.
+--without-prefix        Don't compile the value of --prefix into the executable.
 
 
 Window-system options:
@@ -66,6 +69,9 @@ Window-system options:
 --with-dialogs=TYPE     Use TYPE dialog boxes (motif, athena, athena3d, or no).
                         Lucid menubars and scrollbars are the default.
                         Motif dialog boxes will be used if Motif can be found.
+--with-widgets=TYPE     Use TYPE widgets (motif, athena, athena3d, or no).
+                        Motif widgets will be used if Motif can be found.
+                        Other widget types are currently unsupported.
 --with-dragndrop (*)    Compile in the generic drag and drop API. This is
                         automatically added if one of the drag and drop
                         protocols is found (currently CDE, OffiX, MSWindows).
index eb7b1b6..abe3bfc 100644 (file)
@@ -461,7 +461,9 @@ You should never set this directory, only let-bind it.")
   (if (and (integerp help-max-help-buffers)
            (> help-max-help-buffers 0)
            (stringp name))
-      (format "*%s: %s*" help-buffer-prefix-string name)
+      (if help-buffer-prefix-string
+         (format "*%s: %s*" help-buffer-prefix-string name)
+       (format "*%s*" name))
     (format "*%s*" help-buffer-prefix-string)))
 
 ;; Use this function for displaying help when C-h something is pressed
index 3713295..29175a8 100644 (file)
@@ -38,7 +38,6 @@
 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de>
 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu>
 ;; Last Modified On: Thu Jul 1 14:23:00 1994
-;; RCS Info        : $Revision: 1.3.2.2 $ $Locker:  $
 ;; ========================================================================
 ;; NOTE: XEmacs must be redumped if this file is changed.
 ;;
@@ -57,6 +56,7 @@
 ;;; ChangeLog:
 
 ;; 4/26/97: sb Mule-ize.
+;; 6/24/1999 much rewriting from Bob Weiner
 
 ;;; Code:
 
@@ -104,24 +104,25 @@ If optional fourth argument FAST is non-nil, don't sort the completions,
 
 ;;=== Utilities ===========================================================
 
-(defmacro progn-with-message (message &rest forms)
+(defmacro progn-with-message (MESSAGE &rest FORMS)
   "(progn-with-message MESSAGE FORMS ...)
 Display MESSAGE and evaluate FORMS, returning value of the last one."
   ;; based on Hallvard Furuseth's funcall-with-message
-  `(if (eq (selected-window) (minibuffer-window))
+  (` 
+   (if (eq (selected-window) (minibuffer-window))
        (save-excursion
         (goto-char (point-max))
         (let ((orig-pmax (point-max)))
           (unwind-protect
               (progn
-                (insert " " ,message) (goto-char orig-pmax)
+                (insert " " (, MESSAGE)) (goto-char orig-pmax)
                 (sit-for 0)            ; Redisplay
-                ,@forms)
+                (,@ FORMS))
             (delete-region orig-pmax (point-max)))))
      (prog2
-        (message "%s" ,message)
-        (progn ,@forms)
-       (message ""))))
+        (message "%s" (, MESSAGE))
+        (progn (,@ FORMS))
+       (message "")))))
 
 (put 'progn-with-message 'lisp-indent-hook 1)
 
@@ -217,7 +218,6 @@ where each <cache-record> has the form
       (if tail (setcdr tail nil)))))
 
 ;;=== Read a filename, with completion in a search path ===================
-(defvar read-library-internal-search-path)
 
 (defun read-library-internal (FILE FILTER FLAG)
   "Don't call this."
@@ -255,79 +255,99 @@ Optional sixth argument FILTER can be used to provide a function to
     (cond 
      ((equal library "") DEFAULT)
      (FULL (locate-file library read-library-internal-search-path
-                         '(".el" ".el.gz" ".elc")))
+                       ;; decompression doesn't work with Mule -slb
+                       (if (featurep 'mule)
+                           ".el:.elc"
+                         ".el:.el.gz:.el.Z:.elc")))
      (t library))))
 
+(defun read-library-name (prompt)
+  "PROMPTs for and returns an existing Elisp library name (without any suffix) or the empty string."
+  (interactive)
+  (let ((read-library-internal-search-path load-path))
+    (completing-read prompt
+                    'read-library-internal 
+                    (lambda (fn) 
+                      (cond
+                       ;; decompression doesn't work with mule -slb
+                       ((string-match (if (featurep 'mule)
+                                          "\\.el$"
+                                        "\\.el\\(\\.gz\\|\\.Z\\)?$") fn)
+                        (substring fn 0 (match-beginning 0)))))
+                    t nil)))
+
 ;; NOTE: as a special case, read-library may be used to read a filename
 ;; relative to the current directory, returning a *relative* pathname
 ;; (read-file-name returns a full pathname).
 ;;
 ;; eg. (read-library "Local header: " '(nil) nil)
 
-(defun get-library-path ()
-  "Front end to read-library"
-  (read-library "Find Library file: " load-path nil t t
-                 (function (lambda (fn) 
-                             (cond
-                              ;; decompression doesn't work with mule -slb
-                              ((string-match (if (featurep 'mule)
-                                                 "\\.el$"
-                                               "\\.el\\(\\.gz\\)?$") fn)
-                               (substring fn 0 (match-beginning 0))))))
-                 ))
-
 ;;=== Replacement for load-library with completion ========================
 
 (defun load-library (library)
   "Load the library named LIBRARY.
 This is an interface to the function `load'."
   (interactive 
-   (list (read-library "Load Library: " load-path nil nil nil
-                 (function (lambda (fn) 
-                             (cond 
-                              ((string-match "\\.elc?$" fn)
-                               (substring fn 0 (match-beginning 0))))))
-                 ))) 
+   (list (read-library "Load library: " load-path nil nil nil
+                      (function (lambda (fn) 
+                                  (cond 
+                                   ((string-match "\\.elc?$" fn)
+                                    (substring fn 0 (match-beginning 0))))))
+                      ))) 
   (load library))
 
-;;=== find-library with completion (Author: Heiko Muenkel) ===================
+;;=== find-library with completion (Author: Bob Weiner) ===================
 
-(defun find-library (library &optional codesys)
-  "Find and edit the source for the library named LIBRARY.
-The extension of the LIBRARY must be omitted.
-Under XEmacs/Mule, the optional second argument specifies the
-coding system to use when decoding the file.  Interactively,
-with a prefix argument, you will be prompted for the coding system."
+(defun find-library (library &optional codesys display-function)
+  "Find and display in the current window the source for the Elisp LIBRARY.
+LIBRARY should be a name without any path information and may include or omit
+the \".el\" suffix.  Under XEmacs/Mule, the optional second argument CODESYS
+specifies the coding system to use when decoding the file.  Interactively,
+with a prefix argument, this prompts for the coding system.  Optional third
+argument DISPLAY-FUNCTION must take two arguments, the filename to display
+and CODESYS.  The default for DISPLAY-FUNCTION is `find-file'."
   (interactive 
-   (list (get-library-path)
+   (list (read-library-name "Find library: ")
         (if current-prefix-arg
             (read-coding-system "Coding System: "))))
-  (find-file library codesys))
+  (let ((path (if (or (null library) (equal library ""))
+                  nil
+               (locate-file library load-path
+                            ;; decompression doesn't work with Mule -slb
+                            (if (featurep 'mule)
+                                ":.el:.elc"
+                              ":.el:.el.gz:.el.Z:.elc")))))
+    (if path (funcall (if (fboundp display-function)
+                         display-function 'find-file)
+                     path codesys)
+      (error "(find-library): Cannot locate library `%s'" library))))
 
 (defun find-library-other-window (library &optional codesys)
-  "Load the library named LIBRARY in another window.
-Under XEmacs/Mule, the optional second argument specifies the
-coding system to use when decoding the file.  Interactively,
-with a prefix argument, you will be prompted for the coding system."
+  "Find and display in another window the source for the Elisp LIBRARY.
+LIBRARY should be a name without any path information and may include or omit
+the \".el\" suffix.  Under XEmacs/Mule, the optional second argument CODESYS
+specifies the coding system to use when decoding the file.  Interactively,
+with a prefix argument, this prompts for the coding system."
   (interactive 
-   (list (get-library-path)
+   (list (read-library-name "Find library in other window: ")
         (if current-prefix-arg
-          (read-coding-system "Coding System: "))))
-  (find-file-other-window library codesys))
+            (read-coding-system "Coding System: "))))
+  (find-library library codesys 'find-file-other-window))
 
 (defun find-library-other-frame (library &optional codesys)
-  "Load the library named LIBRARY in a newly-created frame.
-Under XEmacs/Mule, the optional second argument specifies the
-coding system to use when decoding the file.  Interactively,
-with a prefix argument, you will be prompted for the coding system."
+  "Find and display in another frame the source for the Elisp LIBRARY.
+LIBRARY should be a name without any path information and may include or omit
+the \".el\" suffix.  Under XEmacs/Mule, the optional second argument CODESYS
+specifies the coding system to use when decoding the file.  Interactively,
+with a prefix argument, this prompts for the coding system."
   (interactive 
-   (list (get-library-path)
+   (list (read-library-name "Find library in other frame: ")
         (if current-prefix-arg
             (read-coding-system "Coding System: "))))
-  (find-file-other-frame library codesys))
+  (find-library library codesys 'find-file-other-frame))
 
-; This conflicts with an existing binding
-;(define-key global-map "\C-xl" 'find-library)
+;; This conflicts with an existing binding.
+;;(define-key global-map "\C-xl" 'find-library)
 (define-key global-map "\C-x4l" 'find-library-other-window)
 (define-key global-map "\C-x5l" 'find-library-other-frame)
 
index b3603e5..b2b828b 100644 (file)
   (make-local-variable 'next-line-add-newlines)
   (setq next-line-add-newlines nil)
   (setq list-mode-extent nil)
-  (set-specifier text-cursor-visible-p nil (current-buffer))
+;; It is visually disconcerting to have the text cursor disappear within list 
+;; buffers, especially when moving from window to window, so leave it
+;; visible.  -- Bob Weiner, 06/20/1999
+; (set-specifier text-cursor-visible-p nil (current-buffer))
   (setq buffer-read-only t)
   (goto-char (point-min))
   (run-hooks 'list-mode-hook))
@@ -458,21 +461,23 @@ buffer."
 (define-derived-mode completion-list-mode list-mode 
   "Completion List"
   "Major mode for buffers showing lists of possible completions.
-Type \\<completion-list-mode-map>\\[choose-completion] in the completion list\
- to select the completion near point.
-Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\
- with the mouse."
+\\{completion-list-mode-map}"
   (make-local-variable 'completion-base-size)
   (setq completion-base-size nil))
 
 (let ((map completion-list-mode-map))
+  (define-key map 'button2up 'mouse-choose-completion)
+  (define-key map 'button2 'undefined)
+  (define-key map "\C-m" 'choose-completion)
   (define-key map "\e\e\e" 'delete-completion-window)
   (define-key map "\C-g" 'minibuffer-keyboard-quit)
-  (define-key map "q" 'abort-recursive-edit)
-  (define-key map " " (lambda () (interactive)
-                       (select-window (minibuffer-window))))
-  (define-key map "\t" (lambda () (interactive)
-                        (select-window (minibuffer-window)))))
+  (define-key map "q" 'completion-list-mode-quit)
+  (define-key map " " 'completion-switch-to-minibuffer)
+  ;; [Tab] used to switch to the minibuffer but since [space] does that and
+  ;; since most applications in the world use [Tab] to select the next item
+  ;; in a list, do that in the *Completions* buffer too.  -- Bob Weiner,
+  ;; BeOpen.com, 06/23/1999.
+  (define-key map "\t" 'next-list-mode-item))
 
 (defvar completion-reference-buffer nil
   "Record the buffer that was current when the completion list was requested.
@@ -486,6 +491,10 @@ but it talks about the buffer in `completion-reference-buffer'.
 If this is nil, it means to compare text to determine which part
 of the tail end of the buffer's text is involved in completion.")
 
+;; These names are referenced in the doc string for `completion-list-mode'.
+(defalias 'choose-completion 'list-mode-item-keyboard-selected)
+(defalias 'mouse-choose-completion 'list-mode-item-mouse-selected)
+
 (defun delete-completion-window ()
   "Delete the completion list window.
 Go to the window from which completion was requested."
@@ -495,6 +504,21 @@ Go to the window from which completion was requested."
     (if (get-buffer-window buf)
         (select-window (get-buffer-window buf)))))
 
+(defun completion-switch-to-minibuffer ()
+  "Move from a completions buffer to the active minibuffer window."
+  (interactive)
+  (select-window (minibuffer-window)))
+
+(defun completion-list-mode-quit ()
+  "Abort any recursive edit and bury the completions buffer."
+  (interactive)
+  (condition-case ()
+      (abort-recursive-edit)
+    (error nil))
+  ;; If there was no recursive edit to abort, simply bury the completions
+  ;; list buffer.
+  (if (eq major-mode 'completion-list-mode) (bury-buffer)))
+
 (defun completion-do-in-minibuffer ()
   (interactive "_")
   (save-excursion
index 0b95009..80cedcd 100644 (file)
        ["No Warranty" describe-no-warranty]
        ["XEmacs License" describe-copying]
        ["The Latest Version" describe-distribution])
-      ["Send Bug Report..." report-emacs-bug]))))
+      ["Send Bug Report..." report-emacs-bug
+       :active (fboundp 'report-emacs-bug)]))))
 
 \f
 (defun maybe-add-init-button ()
index 74daf55..0e45897 100644 (file)
@@ -2889,6 +2889,7 @@ unless optional argument SOFT is non-nil."
       (if (and comcol (not fill-prefix))  ; XEmacs - (ENE) from fa-extras.
          (let ((comment-column comcol)
                (comment-start comstart)
+               (block-comment-start comstart)
                (comment-end comment-end))
            (and comment-end (not (equal comment-end ""))
   ;           (if (not comment-multi-line)
index 23f0b9f..af9d3f4 100644 (file)
@@ -56,7 +56,6 @@ by Hallvard:
 #include "opaque.h"
 #include "syntax.h"
 
-#include <stddef.h>
 #include <limits.h>
 
 EXFUN (Ffetch_bytecode, 1);
index ec63358..c57c0f7 100644 (file)
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA.  */
 #include "faces.h"
 #include "frame.h"
 #include "lstream.h"
+#include "glyphs.h"
 #include "sysdep.h"
 #include "sysfile.h"
 #ifdef FILE_CODING
@@ -42,6 +43,10 @@ Boston, MA 02111-1307, USA.  */
 #endif
 
 DEFINE_CONSOLE_TYPE (tty);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (string);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit);
 
 Lisp_Object Qterminal_type;
 Lisp_Object Qcontrolling_process;
@@ -367,6 +372,15 @@ console_type_create_tty (void)
 }
 
 void
+image_instantiator_format_create_glyphs_tty (void)
+{
+  IIFORMAT_VALID_CONSOLE (tty, nothing);
+  IIFORMAT_VALID_CONSOLE (tty, string);
+  IIFORMAT_VALID_CONSOLE (tty, formatted_string);
+  IIFORMAT_VALID_CONSOLE (tty, inherit);
+}
+
+void
 vars_of_console_tty (void)
 {
   Fprovide (Qtty);
index 2b4c637..7e27f86 100644 (file)
@@ -781,14 +781,6 @@ the toolbar, glyphs, etc.
   return !EQ (type, Qtty) && !EQ (type, Qstream) ? Qt : Qnil;
 }
 
-DEFUN ("console-features", Fconsole_features, 0, 1, 0, /*
-Return a list of console-specific features.
-*/
-       (console))
-{
-  return CONSOLE_FEATURES (decode_console (console));
-}
-
 
 \f
 /**********************************************************************/
@@ -1087,7 +1079,6 @@ syms_of_console (void)
   DEFSUBR (Fconsole_enable_input);
   DEFSUBR (Fconsole_disable_input);
   DEFSUBR (Fconsole_on_window_system_p);
-  DEFSUBR (Fconsole_features);
   DEFSUBR (Fsuspend_console);
   DEFSUBR (Fresume_console);
 
index 34c22c5..b53f7a0 100644 (file)
@@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA.  */
 
 #include <config.h>
 #include "lisp.h"
-#include <stddef.h>
 #include "bytecode.h"
 #include "elhash.h"
 
index 2a9b919..49a2446 100644 (file)
@@ -73,11 +73,7 @@ typedef unsigned int SOCKET;
 #include <errno.h>
 
 #if defined (__CYGWIN32__) && !defined (CYGWIN_VERSION_DLL_MAJOR)
-typedef struct tagNMHDR { 
-  HWND hwndFrom; 
-  UINT idFrom; 
-  UINT code; 
-} NMHDR, *PNMHDR, *LPNMHDR; 
+typedef NMHDR *LPNMHDR;
 #endif
 
 #ifdef HAVE_MENUBARS
index cc7ad8a..e11eded 100644 (file)
@@ -213,7 +213,6 @@ Boston, MA 02111-1307, USA.  */
 
 #include <config.h>
 #include "lisp.h"
-#include <stddef.h>
 
 #include "buffer.h"
 #include "debug.h"
index a619dfb..805e812 100644 (file)
@@ -1,5 +1,5 @@
 /* mswindows-specific glyph objects.
-   Copyright (C) 1998 Andy Piper.
+   Copyright (C) 1998, 99 Andy Piper.
    
 This file is part of XEmacs.
 
@@ -53,6 +53,22 @@ Boston, MA 02111-1307, USA.  */
 
 #define WIDGET_GLYPH_SLOT 0
 
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (string);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit);
+#ifdef HAVE_JPEG
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (jpeg);
+#endif
+#ifdef HAVE_TIFF
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (tiff);
+#endif  
+#ifdef HAVE_PNG
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (png);
+#endif  
+#ifdef HAVE_GIF
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (gif);
+#endif  
 #ifdef HAVE_XPM
 DEFINE_DEVICE_IIFORMAT (mswindows, xpm);
 #endif
@@ -2728,6 +2744,10 @@ console_type_create_glyphs_mswindows (void)
 void
 image_instantiator_format_create_glyphs_mswindows (void)
 {
+  IIFORMAT_VALID_CONSOLE (mswindows, nothing);
+  IIFORMAT_VALID_CONSOLE (mswindows, string);
+  IIFORMAT_VALID_CONSOLE (mswindows, formatted_string);
+  IIFORMAT_VALID_CONSOLE (mswindows, inherit);
   /* image-instantiator types */
 #ifdef HAVE_XPM
   INITIALIZE_DEVICE_IIFORMAT (mswindows, xpm);
@@ -2739,6 +2759,18 @@ image_instantiator_format_create_glyphs_mswindows (void)
   INITIALIZE_DEVICE_IIFORMAT (mswindows, xface);
   IIFORMAT_HAS_DEVMETHOD (mswindows, xface, instantiate);
 #endif
+#ifdef HAVE_JPEG
+  IIFORMAT_VALID_CONSOLE (mswindows, jpeg);
+#endif
+#ifdef HAVE_TIFF
+  IIFORMAT_VALID_CONSOLE (mswindows, tiff);
+#endif  
+#ifdef HAVE_PNG
+  IIFORMAT_VALID_CONSOLE (mswindows, png);
+#endif  
+#ifdef HAVE_GIF
+  IIFORMAT_VALID_CONSOLE (mswindows, gif);
+#endif  
   /* button widget */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, button);
   IIFORMAT_HAS_DEVMETHOD (mswindows, button, property);
@@ -2793,6 +2825,7 @@ image_instantiator_format_create_glyphs_mswindows (void)
 
   IIFORMAT_VALID_KEYWORD (bmp, Q_data, check_valid_string);
   IIFORMAT_VALID_KEYWORD (bmp, Q_file, check_valid_string);
+  IIFORMAT_VALID_CONSOLE (mswindows, bmp);
 
   /* mswindows resources */
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (mswindows_resource,
@@ -2807,6 +2840,7 @@ image_instantiator_format_create_glyphs_mswindows (void)
                          check_valid_resource_symbol);
   IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_resource_id, check_valid_resource_id);
   IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_file, check_valid_string);
+  IIFORMAT_VALID_CONSOLE (mswindows, mswindows_resource);
 }
 
 void
@@ -2822,14 +2856,4 @@ This is used by the `make-image-instance' function.
 void
 complex_vars_of_glyphs_mswindows (void)
 {
-  Fprovide_on_console (Qbmp, Qmswindows);
-  Fprovide_on_console (Qmswindows_resource, Qmswindows);
-  Fprovide_on_console (Qbutton, Qmswindows);
-  Fprovide_on_console (Qedit_field, Qmswindows);
-  Fprovide_on_console (Qcombo_box, Qmswindows);
-  Fprovide_on_console (Qscrollbar, Qmswindows);
-  Fprovide_on_console (Qlabel, Qmswindows);
-  Fprovide_on_console (Qprogress_gauge, Qmswindows);
-  Fprovide_on_console (Qtree_view, Qmswindows);
-  Fprovide_on_console (Qtab_control, Qmswindows);
 }
index cbd91ed..45f1e10 100644 (file)
@@ -4,6 +4,7 @@
    Copyright (C) 1995 Tinker Systems
    Copyright (C) 1995, 1996 Ben Wing
    Copyright (C) 1995 Sun Microsystems
+   Copyright (C) 1999 Andy Piper
 
 This file is part of XEmacs.
 
@@ -89,6 +90,22 @@ Boston, MA 02111-1307, USA.  */
 
 #define LISP_DEVICE_TO_X_SCREEN(dev) XDefaultScreenOfDisplay (DEVICE_X_DISPLAY (XDEVICE (dev)))
 
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (string);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit);
+#ifdef HAVE_JPEG
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (jpeg);
+#endif
+#ifdef HAVE_TIFF
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (tiff);
+#endif  
+#ifdef HAVE_PNG
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (png);
+#endif  
+#ifdef HAVE_GIF
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (gif);
+#endif  
 #ifdef HAVE_XPM
 DEFINE_DEVICE_IIFORMAT (x, xpm);
 #endif
@@ -2411,10 +2428,26 @@ console_type_create_glyphs_x (void)
 void
 image_instantiator_format_create_glyphs_x (void)
 {
+  IIFORMAT_VALID_CONSOLE (x, nothing);
+  IIFORMAT_VALID_CONSOLE (x, string);
+  IIFORMAT_VALID_CONSOLE (x, formatted_string);
+  IIFORMAT_VALID_CONSOLE (x, inherit);
 #ifdef HAVE_XPM
   INITIALIZE_DEVICE_IIFORMAT (x, xpm);
   IIFORMAT_HAS_DEVMETHOD (x, xpm, instantiate);
 #endif
+#ifdef HAVE_JPEG
+  IIFORMAT_VALID_CONSOLE (x, jpeg);
+#endif
+#ifdef HAVE_TIFF
+  IIFORMAT_VALID_CONSOLE (x, tiff);
+#endif  
+#ifdef HAVE_PNG
+  IIFORMAT_VALID_CONSOLE (x, png);
+#endif  
+#ifdef HAVE_GIF
+  IIFORMAT_VALID_CONSOLE (x, gif);
+#endif  
   INITIALIZE_DEVICE_IIFORMAT (x, xbm);
   IIFORMAT_HAS_DEVMETHOD (x, xbm, instantiate);
 
@@ -2441,6 +2474,7 @@ image_instantiator_format_create_glyphs_x (void)
   IIFORMAT_HAS_DEVMETHOD (x, combo_box, instantiate);
 
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (cursor_font, "cursor-font");
+  IIFORMAT_VALID_CONSOLE (x, cursor_font);
 
   IIFORMAT_HAS_METHOD (cursor_font, validate);
   IIFORMAT_HAS_METHOD (cursor_font, possible_dest_types);
@@ -2455,6 +2489,7 @@ image_instantiator_format_create_glyphs_x (void)
   IIFORMAT_HAS_METHOD (font, validate);
   IIFORMAT_HAS_METHOD (font, possible_dest_types);
   IIFORMAT_HAS_METHOD (font, instantiate);
+  IIFORMAT_VALID_CONSOLE (x, font);
 
   IIFORMAT_VALID_KEYWORD (font, Q_data, check_valid_string);
   IIFORMAT_VALID_KEYWORD (font, Q_foreground, check_valid_string);
@@ -2472,6 +2507,7 @@ image_instantiator_format_create_glyphs_x (void)
   IIFORMAT_HAS_METHOD (autodetect, normalize);
   IIFORMAT_HAS_METHOD (autodetect, possible_dest_types);
   IIFORMAT_HAS_METHOD (autodetect, instantiate);
+  IIFORMAT_VALID_CONSOLE (x, autodetect);
 
   IIFORMAT_VALID_KEYWORD (autodetect, Q_data, check_valid_string);
 }
@@ -2508,8 +2544,4 @@ complex_vars_of_glyphs_x (void)
   BUILD_GLYPH_INST (Vhscroll_glyph, hscroll);
 
 #undef BUILD_GLYPH_INST
-  Fprovide_on_console (Qbutton, Qx);
-  Fprovide_on_console (Qedit_field, Qx);
-  Fprovide_on_console (Qprogress_gauge, Qx);
-  /*  Fprovide (Qcombo_box);*/
 }
index cbc8ad1..2780192 100644 (file)
@@ -85,6 +85,8 @@ struct image_instantiator_methods
   Lisp_Object device;          /* sometimes used */
 
   ii_keyword_entry_dynarr *keywords;
+  /* consoles this ii is supported on */
+  console_type_entry_dynarr *consoles;
   /* Implementation specific methods: */
 
   /* Validate method: Given an instantiator vector, signal an error if
@@ -170,6 +172,8 @@ do {                                                                \
   format##_image_instantiator_methods->device = Qnil;          \
   format##_image_instantiator_methods->keywords =              \
     Dynarr_new (ii_keyword_entry);                             \
+  format##_image_instantiator_methods->consoles =              \
+    Dynarr_new (console_type_entry);                           \
   add_entry_to_image_instantiator_format_list                  \
     (Q##format, format##_image_instantiator_methods);          \
 } while (0)
@@ -215,7 +219,20 @@ do {                                                               \
                entry);                                                 \
   } while (0)
 
+/* Declare that image-instantiator format FORMAT is supported on 
+   CONSOLE type. */
+#define IIFORMAT_VALID_CONSOLE(console, format)                \
+  do {                                                         \
+    struct console_type_entry entry;                           \
+                                                               \
+    entry.symbol = Q##console;                                 \
+    entry.meths = console##_console_methods;                   \
+    Dynarr_add (format##_image_instantiator_methods->consoles, \
+               entry);                                         \
+  } while (0)
+
 #define DEFINE_DEVICE_IIFORMAT(type, format)\
+DECLARE_IMAGE_INSTANTIATOR_FORMAT(format);             \
 struct image_instantiator_methods *type##_##format##_image_instantiator_methods
 
 #define INITIALIZE_DEVICE_IIFORMAT(type, format)       \
@@ -228,6 +245,7 @@ do {                                                                \
     Dynarr_new (ii_keyword_entry);                             \
   add_entry_to_device_ii_format_list                           \
     (Q##type, Q##format, type##_##format##_image_instantiator_methods);        \
+  IIFORMAT_VALID_CONSOLE(type,format);                 \
 } while (0)
 
 /* Declare that image-instantiator format FORMAT has method M; used in
index 0a68b44..5ed6c4d 100644 (file)
@@ -32,7 +32,6 @@ Boston, MA 02111-1307, USA.  */
 
 #include <config.h>
 #include "lisp.h"
-#include <stddef.h>
 
 #include "buffer.h"
 
index 793cc81..54e06e1 100644 (file)
--- a/src/nt.c
+++ b/src/nt.c
@@ -43,7 +43,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 #include <io.h>
 #include <pwd.h>
 #include <signal.h>
-#include <stddef.h> /* for offsetof */
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
index c53af0b..70d29b9 100644 (file)
@@ -42,7 +42,6 @@ Boston, MA 02111-1307, USA.  */
 #include <config.h>
 #include "lisp.h"
 #include "opaque.h"
-#include <stddef.h>
 
 Lisp_Object Qopaquep;
 
index 977addc..e2c848c 100644 (file)
@@ -21,7 +21,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 #include <config.h>
 #include <stdio.h>
 #include "lisp.h"
-#include <stddef.h>
 #include <unistd.h>
 #include <sheap-adjust.h>
 
index 0dc66fa..398eaca 100644 (file)
@@ -50,7 +50,6 @@ Boston, MA 02111-1307, USA.  */
 
 #include "lisp.h"
 
-#include <stddef.h>
 #include <stdlib.h>
 
 /* ------------------------------- */