This commit was generated by cvs2svn to compensate for changes in r2786,
authortomo <tomo>
Mon, 13 Aug 2001 11:10:25 +0000 (11:10 +0000)
committertomo <tomo>
Mon, 13 Aug 2001 11:10:25 +0000 (11:10 +0000)
which included commits to RCS files with non-trunk default branches.

13 files changed:
lib-src/ChangeLog
lisp/about.el
lisp/byte-optimize.el
lisp/font-lock.el
lisp/lisp-mnt.el
lisp/package-admin.el
lisp/packages.el
lisp/replace.el
lisp/simple.el
lwlib/ChangeLog
lwlib/lwlib-internal.h
man/ChangeLog
man/internals/internals.texi

index 5fa22ce..4536485 100644 (file)
@@ -1,3 +1,7 @@
+2000-12-31  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.39 is released.
+
 2000-12-05  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.38 is released.
index ea2061c..ac32ccb 100644 (file)
@@ -990,9 +990,6 @@ looking for a job involving lisp programming, French and Russian.")
      (widget-insert ".\n"))
     (aj
      (widget-insert "\
-In the XEmacs team I'm responsible for the packages which means mainly
-applying patches and packaging the packages.
-
 I'm a software developer working for the SuSE Labs of the Linux
 distributor SuSE.  My main task is to improve the GNU C library.")
      (widget-insert ".\n"))
@@ -1207,7 +1204,7 @@ Beta tester and last hacker of calendar.\n")
     (about-show-linked-info 'chr "\
 Maintainer of the XEmacs FAQ and proud author of `zap-up-to-char'.\n")
     (about-show-linked-info 'aj "\
-`Package Patch Tender', beta tester and GNU libc developer.\n")
+Former `Package Patch Tender', beta tester and GNU libc developer.\n")
 
     (flet ((print-short (name addr &optional shortinfo)
             (concat (about-with-face name 'italic)
index b6c1daa..ff6edde 100644 (file)
        (byte-optimize-predicate form)
       (nth 1 form))))
 
+;;; For the byte optimizer, `cond' is just overly sweet syntactic sugar.
+;;; So we rewrite (cond ...) in terms of `if' and `or',
+;;; which are easier to optimize.
 (defun byte-optimize-cond (form)
-  ;; if any clauses have a literal nil as their test, throw them away.
-  ;; if any clause has a literal non-nil constant as its test, throw
-  ;; away all following clauses.
-  (let (rest)
-    ;; This must be first, to reduce (cond (t ...) (nil)) to (progn t ...)
-    (while (setq rest (assq nil (cdr form)))
-      (setq form (delq rest (copy-sequence form))))
-    (if (memq nil (cdr form))
-       (setq form (delq nil (copy-sequence form))))
-    (setq rest form)
-    (while (setq rest (cdr rest))
-      (cond ((byte-compile-trueconstp (car-safe (car rest)))
-            (cond ((eq rest (cdr form))
-                   (setq form
-                         (if (cdr (car rest))
-                             (if (cdr (cdr (car rest)))
-                                 (cons 'progn (cdr (car rest)))
-                               (nth 1 (car rest)))
-                           (car (car rest)))))
-                  ((cdr rest)
-                   (setq form (copy-sequence form))
-                   (setcdr (memq (car rest) form) nil)))
-            (setq rest nil)))))
-  ;;
-  ;; Turn (cond (( <x> )) ... ) into (or <x> (cond ... ))
-  (if (eq 'cond (car-safe form))
-      (let ((clauses (cdr form)))
-       (if (and (consp (car clauses))
-                (null (cdr (car clauses))))
-           (list 'or (car (car clauses))
-                 (byte-optimize-cond
-                  (cons (car form) (cdr (cdr form)))))
-         form))
-    form))
+  (byte-optimize-cond-1 (cdr form)))
+
+(defun byte-optimize-cond-1 (clauses)
+  (cond
+   ((null clauses) nil)
+   ((consp (car clauses))
+    (nconc
+     (case (length (car clauses))
+       (1 `(or ,(nth 0 (car clauses))))
+       (2 `(if ,(nth 0 (car clauses)) ,(nth 1 (car clauses))))
+       (t `(if ,(nth 0 (car clauses)) (progn ,@(cdr (car clauses))))))
+     (when (cdr clauses) (list (byte-optimize-cond-1 (cdr clauses))))))
+   (t (error "malformed cond clause %s" (car clauses)))))
 
 (defun byte-optimize-if (form)
   ;; (if <true-constant> <then> <else...>) ==> <then>
index 5a9452c..edc5964 100644 (file)
@@ -2099,22 +2099,38 @@ START should be at the beginning of a line."
       (c++-keywords
 ;      ("break" "continue" "do" "else" "for" "if" "return" "switch" "while"
 ;      "asm" "catch" "delete" "new" "operator" "sizeof" "this" "throw" "try"
-;       "protected" "private" "public")
-       (concat "asm\\|break\\|c\\(atch\\|ontinue\\)\\|d\\(elete\\|o\\)\\|"
-              "else\\|for\\|if\\|new\\|"
-              "p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|return\\|"
-              "s\\(izeof\\|witch\\)\\|t\\(h\\(is\\|row\\)\\|ry\\)\\|while"))
+;       "protected" "private" "public" "const_cast" "dynamic_cast" "reinterpret_cast"
+;       "static_cast" "and" "bitor" "or" "xor" "compl" "bitand" "and_eq"
+;      "or_eq" "xor_eq" "not" "not_eq" "typeid" "false" "true")
+       (concat "a\\(nd\\(\\|_eq\\)\\|sm\\)\\|"
+              "b\\(it\\(or\\|and\\)\\|reak\\)\\|"
+              "c\\(atch\\|o\\(mpl\\|n\\(tinue\\|st_cast\\)\\)\\)\\|"
+              "d\\(elete\\|o\\|ynamic_cast\\)\\|"
+              "else\\|"
+              "f\\(alse\\|or\\)\\|if\\|"
+              "n\\(ew\\|ot\\(\\|_eq\\)\\)\\|"
+              "p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|"
+              "or\\(\\|_eq\\)\\|"
+              "re\\(interpret_cast\\|turn\\)\\|"
+              "s\\(izeof\\|tatic_cast\\|witch\\)\\|"
+              "t\\(h\\(is\\|row\\)\\|r\\(ue\\|y\\)\\|ypeid\\)\\|"
+              "xor\\(\\|_eq\\)\\|while"))
       (c++-type-types
 ;      ("auto" "extern" "register" "static" "typedef" "struct" "union" "enum"
 ;      "signed" "unsigned" "short" "long" "int" "char" "float" "double"
 ;      "void" "volatile" "const" "class" "inline" "friend" "bool"
-;      "virtual" "complex" "template")
+;      "virtual" "complex" "template" "explicit" "mutable" "export" "namespace"
+;       "using" "typename" "wchar_t")
        (concat "auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|"
-              "double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|"
-              "in\\(line\\|t\\)\\|long\\|register\\|"
+              "double\\|"
+              "e\\(num\\|x\\(p\\(licit\\|ort\\)\\|tern\\)\\)\\|"
+              "f\\(loat\\|riend\\)\\|"
+              "in\\(line\\|t\\)\\|long\\|mutable\\|namespace\\|register\\|"
               "s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|"
-              "t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|"
-              "v\\(irtual\\|o\\(id\\|latile\\)\\)"))           ; 11 ()s deep.
+              "t\\(emplate\\|ype\\(def\\|name\\)\\)\\|"
+              "u\\(\\(n\\(ion\\|signed\\)\\|sing\\)\\)\\|"
+              "v\\(irtual\\|o\\(id\\|latile\\)\\)\\|"
+              "wchar_t"))              ; 11 ()s deep.
       (ctoken "\\(\\sw\\|\\s_\\|[:~*&]\\)+")
       )
  (setq c-font-lock-keywords-1
index ab1aa09..3b1adbb 100644 (file)
@@ -343,7 +343,7 @@ The return value has the form (NAME . ADDRESS)."
 
 (defun lm-version (&optional file)
   "Return the version listed in file FILE, or current buffer if FILE is nil.
-This can befound in an RCS or SCCS header to crack it out of."
+This can be found in an RCS or SCCS header to crack it out of."
   (save-excursion 
     (if file
        (find-file file))
index 2f971ea..d13a853 100644 (file)
@@ -165,13 +165,13 @@ or return a location appropriate for the package otherwise."
                 (featurep package-feature)
                 (setq autoload-dir (feature-file package-feature))
                 (setq autoload-dir (file-name-directory autoload-dir))
-                (member autoload-dir late-package-load-path))
+                (member autoload-dir (append early-package-load-path late-package-load-path)))
        ;; Find the corresponding entry in late-package
        (setq pkg-dir
              (car-safe (member-if (lambda (h)
                           (string-match (concat "^" (regexp-quote h))
                                         autoload-dir))
-                        late-packages))))
+                        (append (cdr early-packages) late-packages)))))
       (if pkg-dir
          pkg-dir
        ;; Ok we need to guess
index 780d9a0..810b1f7 100644 (file)
@@ -202,8 +202,10 @@ is used instead of `load-path'."
                          (member 'crypt-find-file-hook find-file-hooks)))
                 ;; Compression involved.
                 (if nosuffix
-                    '("" ".gz" ".Z")
-                  '(".elc" ".elc.gz" "elc.Z" ".el" ".el.gz" ".el.Z" "" ".gz" ".Z")))
+                    '("" ".gz" ".Z" ".bz2")
+                  '(".elc" ".elc.gz" "elc.Z" ".elc.bz2"
+                    ".el" ".el.gz" ".el.Z" ".el.bz2"
+                    "" ".gz" ".Z" ".bz2")))
                (t
                 ;; No compression.
                 (if nosuffix
index 6d7c7ee..ec2ce62 100644 (file)
@@ -394,8 +394,8 @@ default is t.")
 
 If a match spreads across multiple lines, all those lines are shown.
 
-If variable `list-matching-lines-whole-buffer' is non-nil, the entire buffer is
-searched, otherwise search begins at point.
+If variable `list-matching-lines-whole-buffer' is non-nil, the entire
+buffer is searched, otherwise search begins at point.
 
 Each line is displayed with NLINES lines before and after, or -NLINES
 before if NLINES is negative.
index 51cc77d..38fd6fa 100644 (file)
@@ -2544,7 +2544,8 @@ If nil, use `comment-end' instead."
   :group 'fill-comments)
 
 (defun indent-for-comment ()
-  "Indent this line's comment to comment column, or insert an empty comment."
+  "Indent this line's comment to comment column, or insert an empty
+comment.  Comments starting in column 0 are not moved."
   (interactive "*")
   (let* ((empty (save-excursion (beginning-of-line)
                                (looking-at "[ \t]*$")))
@@ -2571,13 +2572,19 @@ If nil, use `comment-end' instead."
                     (skip-syntax-backward "^ " (match-beginning 0)))))
        (setq begpos (point))
        ;; Compute desired indent.
-       (if (= (current-column)
-              (setq indent (funcall comment-indent-function)))
-           (goto-char begpos)
+        ;; XEmacs change: Preserve indentation of comments starting in
+        ;; column 0, as documented.
+       (cond
+        ((= (current-column) 0)
+         (goto-char begpos))
+        ((= (current-column)
+            (setq indent (funcall comment-indent-function)))
+         (goto-char begpos))
+        (t
          ;; If that's different from current, change it.
          (skip-chars-backward " \t")
          (delete-region (point) begpos)
-         (indent-to indent))
+         (indent-to indent)))
        ;; An existing comment?
        (if cpos
            (progn (goto-char cpos)
index 07d6f5d..71cbd9d 100644 (file)
@@ -1,3 +1,23 @@
+2000-12-31  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.39 is released.
+
+2000-12-30  Andy Piper  <andy@xemacs.org>
+
+       * xlwtabs.c: remove assertion definitions and put them in
+       lwlib-internal.h. This has the effect of enabling assertions which
+       should have been done from the very start.
+       (TabsShuffleRows): fix duff assertion.
+       (PreferredSize3): use dimensions throughout.
+       (PreferredSize2): ditto.
+       (TabLayout): ditto.
+       (DrawFrame): be clever about the enclosing frame if the child
+       height is 0.
+       (TabsResize): don't configure children that are no visible
+       anyway. Make sure geometry calculations don't end up negative.
+
+       * lwlib-internal.h: put in assertion definitions.
+
 2000-12-05  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.38 is released.
index 85dff5a..b202230 100644 (file)
@@ -3,6 +3,20 @@
 
 #include "lwlib.h"
 
+#ifdef USE_ASSERTIONS
+/* Highly dubious kludge */
+/*   (thanks, Jamie, I feel better now -- ben) */
+void assert_failed (const char *, int, const char *);
+# define abort() (assert_failed (__FILE__, __LINE__, "abort()"))
+# define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x))
+#else
+# ifdef DEBUG_XEMACS
+#  define assert(x) ((x) ? (void) 0 : (void) abort ())
+# else
+#  define assert(x)
+# endif
+#endif
+
 /* This represents a single widget within a widget tree.  All the
    widgets in a widget tree are chained through the `next' field.
    `info' is a back pointer to the widget tree. */
index 5bd2293..cb32e69 100644 (file)
@@ -1,3 +1,16 @@
+2000-12-31  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.39 is released.
+
+2000-12-05  Stephen J. Turnbull  <stephen@xemacs.org>
+
+       * internals/internals.texi (General Coding Rules): further document
+       usage of symsinit.h.  Reorder slightly.
+
+2000-11-29  Stephen J. Turnbull  <stephen@xemacs.org>
+
+       * xemacs/packages.texi (Creating Packages): new node.
+
 2000-12-05  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.38 is released.
index a59e3c1..d4bbfd2 100644 (file)
@@ -1721,21 +1721,6 @@ been found by compiling with C++.  The ability to use both C and C++
 tools means that a greater variety of development tools are available to
 the developer.
 
-Almost every module contains a @code{syms_of_*()} function and a
-@code{vars_of_*()} function.  The former declares any Lisp primitives
-you have defined and defines any symbols you will be using.  The latter
-declares any global Lisp variables you have added and initializes global
-C variables in the module.  For each such function, declare it in
-@file{symsinit.h} and make sure it's called in the appropriate place in
-@file{emacs.c}.  @strong{Important}: There are stringent requirements on
-exactly what can go into these functions.  See the comment in
-@file{emacs.c}.  The reason for this is to avoid obscure unwanted
-interactions during initialization.  If you don't follow these rules,
-you'll be sorry!  If you want to do anything that isn't allowed, create
-a @code{complex_vars_of_*()} function for it.  Doing this is tricky,
-though: You have to make sure your function is called at the right time
-so that all the initialization dependencies work out.
-
 Every module includes @file{<config.h>} (angle brackets so that
 @samp{--srcdir} works correctly; @file{config.h} may or may not be in
 the same directory as the C sources) and @file{lisp.h}.  @file{config.h}
@@ -1753,6 +1738,24 @@ directory using @samp{../work/configure}.  There will be two different
 @file{config.h} files.  Which one will be used if you @samp{#include
 "config.h"}?
 
+Almost every module contains a @code{syms_of_*()} function and a
+@code{vars_of_*()} function.  The former declares any Lisp primitives
+you have defined and defines any symbols you will be using.  The latter
+declares any global Lisp variables you have added and initializes global
+C variables in the module.  @strong{Important}: There are stringent
+requirements on exactly what can go into these functions.  See the
+comment in @file{emacs.c}.  The reason for this is to avoid obscure
+unwanted interactions during initialization.  If you don't follow these
+rules, you'll be sorry!  If you want to do anything that isn't allowed,
+create a @code{complex_vars_of_*()} function for it.  Doing this is
+tricky, though: you have to make sure your function is called at the
+right time so that all the initialization dependencies work out.
+
+Declare each function of these kinds in @file{symsinit.h}.  Make sure
+it's called in the appropriate place in @file{emacs.c}.  You never need
+to include @file{symsinit.h} directly, because it is included by
+@file{lisp.h}.
+
 @strong{All global and static variables that are to be modifiable must
 be declared uninitialized.}  This means that you may not use the
 ``declare with initializer'' form for these variables, such as @code{int
@@ -5865,7 +5868,7 @@ differences though:
 @enumerate
 @item
 We do not use the mark bit (which does not exist for C structures
-anyway), we use a big hash table instead.
+anyway); we use a big hash table instead.
 
 @item
 We do not use the mark function of lrecords but instead rely on the
@@ -5882,7 +5885,7 @@ The hash table doubles as a map object to pdump_entry_list_elmt (i.e.
 allows us to look up a pdump_entry_list_elmt with the object it points
 to).  Entries are added with @code{pdump_add_entry()} and looked up with
 @code{pdump_get_entry()}.  There is no need for entry removal.  The hash
-value is computed quite basically from the object pointer by
+value is computed quite simply from the object pointer by
 @code{pdump_make_hash()}.
 
 The roots for the marking are:
@@ -5893,7 +5896,7 @@ the @code{staticpro}'ed variables (there is a special @code{staticpro_nodump()}
 call for protected variables we do not want to dump).
 
 @item
-the @code{pdump_wire}'d variables (@code{staticpro} is equivalent to
+the @code{pdump_wire}'d variables (@code{staticpro()} is equivalent to
 @code{staticpro_nodump()} + @code{pdump_wire()}).
 
 @item
@@ -5925,7 +5928,7 @@ real world alignment requirements are powers of two.
 
 @item
 the C compiler is required to adjust the size of a struct so that you
-can have an array of them next to each other.  This means you can have a
+can have an array of them next to each other.  This means you can have an
 upper bound of the alignment requirements of a given structure by
 looking at which power of two its size is a multiple.
 
@@ -5943,14 +5946,14 @@ first.  This ensures the best packing.
 The maximum alignment requirement we take into account is 2^8.
 
 @code{pdump_allocate_offset()} only has to do a linear allocation,
-starting at offset 256 (this leaves room for the header and keep the
+starting at offset 256 (this leaves room for the header and keeps the
 alignments happy).
 
 @node The header, Data dumping, Address allocation, Dumping phase
 @subsection The header
 
 The next step creates the file and writes a header with a signature and
-some random informations in it (number of staticpro, number of assigned
+some random information in it (number of staticpro, number of assigned
 lrecord types, etc...).  The reloc_address field, which indicates at
 which address the file should be loaded if we want to avoid post-reload
 relocation, is set to 0.  It then seeks to offset 256 (base offset for
@@ -5985,7 +5988,7 @@ the lrecord_implementation_table array
 a vector of all the offsets to the objects in the file that include a
 description (for faster relocation at reload time)
 @item
-the pdump_wired and pdump_wired_list arrays
+the pdump_wire and pdump_wire_list arrays
 @end enumerate
 
 For each of the arrays we write both the pointer to the variables and
@@ -5993,7 +5996,7 @@ the relocated offset of the object they point to.  Since these variables
 are global, the pointers are still valid when restarting the program and
 are used to regenerate the global pointers.
 
-The @code{pdump_wired_list} array is a special case.  The variables it
+The @code{pdump_wire_list} array is a special case.  The variables it
 points to are the head of weak linked lists of lisp objects of the same
 type.  Not all objects of this list are dumped so the relocated pointer
 we associate with them points to the first dumped object of the list, or