]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from emacs--devo--0
authorMiles Bader <miles@gnu.org>
Wed, 17 May 2006 07:46:49 +0000 (07:46 +0000)
committerMiles Bader <miles@gnu.org>
Wed, 17 May 2006 07:46:49 +0000 (07:46 +0000)
Patches applied:

 * emacs--devo--0  (patch 274-284)

   - Update from CVS
   - Update etc/MORE.STUFF.
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 101)

   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-62

19 files changed:
1  2 
etc/MORE.STUFF
etc/NEWS
lib-src/makefile.w32-in
lisp/ChangeLog
lisp/arc-mode.el
lisp/desktop.el
lisp/emacs-lisp/bytecomp.el
lisp/international/mule.el
lisp/simple.el
lisp/subr.el
src/ChangeLog
src/Makefile.in
src/editfns.c
src/fileio.c
src/frame.c
src/intervals.c
src/lread.c
src/xdisp.c
src/xterm.c

diff --cc etc/MORE.STUFF
Simple merge
diff --cc etc/NEWS
Simple merge
index 10b7c07f5c21860cb98d7116ac28efb21356852e,6aa15964f45cbe1964cbf20d116e6228c5310c74..c145e47f197b1167d31cb08c52162baacedd528a
@@@ -192,6 -192,17 +192,7 @@@ lisp1= 
        $(lispsource)international/mule-conf.el \
        $(lispsource)international/mule-cmds.elc \
        $(lispsource)international/characters.elc \
 -      $(lispsource)international/ucs-tables.elc \
 -      $(lispsource)international/utf-8.elc \
 -      $(lispsource)international/utf-16.elc \
 -      $(lispsource)international/latin-1.el \
 -      $(lispsource)international/latin-2.el \
 -      $(lispsource)international/latin-3.el \
 -      $(lispsource)international/latin-4.el \
 -      $(lispsource)international/latin-5.el \
 -      $(lispsource)international/latin-8.el \
 -      $(lispsource)international/latin-9.el \
+       $(lispsource)fringe.elc \
        $(lispsource)image.elc \
        $(lispsource)international/fontset.elc \
        $(lispsource)dnd.elc \
diff --cc lisp/ChangeLog
Simple merge
index 9da83f1a6352071405d4b0fbb31c5188293cb591,0b016b981e2b2877d8b39879c3294c0e11c9ce3f..5b08182b7ee8a5d457fe6f616d77f81bad0f3d30
@@@ -1519,11 -1501,16 +1523,15 @@@ This doesn't recover lost files, it jus
              files (cons (vector prname ifnname fiddle mode (1- p))
                            files))
        (cond ((= hdrlvl 1)
-              (setq p (+ p hsize 2 csize)))
+              ;; p needs to stay an integer, since we use it in goto-char
+              ;; above.  Passing through `round' limits the compressed size
+              ;; to most-positive-fixnum, but if the compressed size exceeds
+              ;; that, we cannot visit the archive anyway.
+              (setq p (+ p hsize 2 (round csize))))
              ((or (= hdrlvl 2) (= hdrlvl 0))
-              (setq p (+ p thsize 2 csize))))
+              (setq p (+ p thsize 2 (round csize)))))
        ))
      (goto-char (point-min))
 -    (set-buffer-multibyte default-enable-multibyte-characters)
      (let ((dash (concat (if archive-alternate-display
                            "- --------  -----  -----  "
                          "- ----------  --------  -----------  --------  ")
diff --cc lisp/desktop.el
index cfde6237cd958e65a838d81ef4135f72d147942d,8e9d09d4d32b3c0c791a76135143c4d411dfe747..69815117bc23fdc746e8469fbc2c9c29ff3a6ef8
@@@ -763,45 -763,42 +763,42 @@@ See also `desktop-base-file-name'.
                          (setq locals (cdr locals)))
                        ll)))
                (buffer-list)))
-           (eager desktop-restore-eager)
-           (buf (get-buffer-create "*desktop*")))
-       (set-buffer buf)
-       (erase-buffer)
-       (insert
-         ";; -*- mode: emacs-lisp; coding: utf-8-emacs; -*-\n"
-         desktop-header
-         ";; Created " (current-time-string) "\n"
-         ";; Desktop file format version " desktop-file-version "\n"
-         ";; Emacs version " emacs-version "\n\n"
-         ";; Global section:\n")
-       (mapc (function desktop-outvar) desktop-globals-to-save)
-       (if (memq 'kill-ring desktop-globals-to-save)
-         (insert
-           "(setq kill-ring-yank-pointer (nthcdr "
-           (int-to-string (- (length kill-ring) (length kill-ring-yank-pointer)))
-           " kill-ring))\n"))
-       (insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n")
-       (mapc #'(lambda (l)
-                 (when (apply 'desktop-save-buffer-p l)
-                   (insert "("
-                           (if (or (not (integerp eager))
-                                   (unless (zerop eager)
-                                     (setq eager (1- eager))
-                                     t))
-                               "desktop-create-buffer"
-                             "desktop-append-buffer-args")
-                           " "
-                           desktop-file-version)
-                   (mapc #'(lambda (e)
-                             (insert "\n  " (desktop-value-to-string e)))
-                         l)
-                   (insert ")\n\n")))
-             info)
-       (setq default-directory dirname)
-       (let ((coding-system-for-write 'utf-8-emacs))
-         (write-region (point-min) (point-max) filename nil 'nomessage))))
+           (eager desktop-restore-eager))
+       (with-temp-buffer
 -        (insert
 -         ";; -*- mode: emacs-lisp; coding: emacs-mule; -*-\n"
 -         desktop-header
 -         ";; Created " (current-time-string) "\n"
 -         ";; Desktop file format version " desktop-file-version "\n"
 -         ";; Emacs version " emacs-version "\n\n"
 -         ";; Global section:\n")
 -        (mapc (function desktop-outvar) desktop-globals-to-save)
 -        (if (memq 'kill-ring desktop-globals-to-save)
 -            (insert
 -             "(setq kill-ring-yank-pointer (nthcdr "
 -             (int-to-string (- (length kill-ring) (length kill-ring-yank-pointer)))
 -             " kill-ring))\n"))
 -
 -        (insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n")
 -        (mapc #'(lambda (l)
 -                  (when (apply 'desktop-save-buffer-p l)
 -                    (insert "("
 -                            (if (or (not (integerp eager))
 -                                    (unless (zerop eager)
 -                                      (setq eager (1- eager))
 -                                      t))
 -                                "desktop-create-buffer"
 -                              "desktop-append-buffer-args")
 -                            " "
 -                            desktop-file-version)
 -                    (mapc #'(lambda (e)
 -                              (insert "\n  " (desktop-value-to-string e)))
 -                          l)
 -                    (insert ")\n\n")))
 -              info)
 -        (setq default-directory dirname)
 -        (let ((coding-system-for-write 'emacs-mule))
 -          (write-region (point-min) (point-max) filename nil 'nomessage)))))
++      (insert
++        ";; -*- mode: emacs-lisp; coding: utf-8-emacs; -*-\n"
++        desktop-header
++        ";; Created " (current-time-string) "\n"
++        ";; Desktop file format version " desktop-file-version "\n"
++        ";; Emacs version " emacs-version "\n\n"
++        ";; Global section:\n")
++      (mapc (function desktop-outvar) desktop-globals-to-save)
++      (if (memq 'kill-ring desktop-globals-to-save)
++        (insert
++          "(setq kill-ring-yank-pointer (nthcdr "
++          (int-to-string (- (length kill-ring) (length kill-ring-yank-pointer)))
++          " kill-ring))\n"))
++
++      (insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n")
++      (mapc #'(lambda (l)
++                (when (apply 'desktop-save-buffer-p l)
++                  (insert "("
++                          (if (or (not (integerp eager))
++                                  (unless (zerop eager)
++                                    (setq eager (1- eager))
++                                    t))
++                              "desktop-create-buffer"
++                            "desktop-append-buffer-args")
++                          " "
++                          desktop-file-version)
++                  (mapc #'(lambda (e)
++                            (insert "\n  " (desktop-value-to-string e)))
++                        l)
++                  (insert ")\n\n")))
++            info)
++      (setq default-directory dirname)
++      (let ((coding-system-for-write 'utf-8-emacs))
++        (write-region (point-min) (point-max) filename nil 'nomessage)))))
    (setq desktop-dirname dirname))
  
  ;; ----------------------------------------------------------------------------
Simple merge
Simple merge
diff --cc lisp/simple.el
Simple merge
diff --cc lisp/subr.el
Simple merge
diff --cc src/ChangeLog
Simple merge
diff --cc src/Makefile.in
Simple merge
diff --cc src/editfns.c
Simple merge
diff --cc src/fileio.c
index 066668d107f7b1e3d55332e09e0f21883f02b31d,12ce3c411e8397d55393721abd685f3771ad794a..84b32f8dda95f5da08d26d24a28bbec5d09fef4d
@@@ -4278,43 -4279,58 +4278,38 @@@ actually used.  */
  
          how_much += this;
  
 -        if (CODING_MAY_REQUIRE_DECODING (&coding))
 -          {
 -            int require, result;
 -
 -            this += unprocessed;
 -
 -            /* If we are using more space than estimated,
 -               make CONVERSION_BUFFER bigger.  */
 -            require = decoding_buffer_size (&coding, this);
 -            if (inserted + require + 2 * (total - how_much) > bufsize)
 -              {
 -                bufsize = inserted + require + 2 * (total - how_much);
 -                conversion_buffer = (unsigned char *) xrealloc (conversion_buffer, bufsize);
 -              }
 -
 -            /* Convert this batch with results in CONVERSION_BUFFER.  */
 -            if (how_much >= total)  /* This is the last block.  */
 -              coding.mode |= CODING_MODE_LAST_BLOCK;
 -            if (coding.composing != COMPOSITION_DISABLED)
 -              coding_allocate_composition_data (&coding, BEGV);
 -            result = decode_coding (&coding, read_buf,
 -                                    conversion_buffer + inserted,
 -                                    this, bufsize - inserted);
 -
 -            /* Save for next iteration whatever we didn't convert.  */
 -            unprocessed = this - coding.consumed;
 -            bcopy (read_buf + coding.consumed, read_buf, unprocessed);
 -            if (!NILP (current_buffer->enable_multibyte_characters))
 -              this = coding.produced;
 -            else
 -              this = str_as_unibyte (conversion_buffer + inserted,
 -                                     coding.produced);
 -          }
 -
 -        inserted += this;
 +        BUF_SET_PT (XBUFFER (conversion_buffer),
 +                    BUF_Z (XBUFFER (conversion_buffer)));
 +        decode_coding_c_string (&coding, read_buf, unprocessed + this,
 +                                conversion_buffer);
 +        unprocessed = coding.carryover_bytes;
 +        if (coding.carryover_bytes > 0)
 +          bcopy (coding.carryover, read_buf, unprocessed);
        }
 +      UNGCPRO;
 +      emacs_close (fd);
  
 -      /* At this point, INSERTED is how many characters (i.e. bytes)
 -       are present in CONVERSION_BUFFER.
 -       HOW_MUCH should equal TOTAL,
 -       or should be <= 0 if we couldn't read the file.  */
 +      /* At this point, HOW_MUCH should equal TOTAL, or should be <= 0
 +       if we couldn't read the file.  */
  
        if (how_much < 0)
-       {
-         if (how_much == -1)
-           error ("IO error reading %s: %s",
-                  SDATA (orig_filename), emacs_strerror (errno));
-         else if (how_much == -2)
-           error ("maximum buffer size exceeded");
-       }
++      error ("IO error reading %s: %s",
++             SDATA (orig_filename), emacs_strerror (errno));
 +
 +      if (unprocessed > 0)
        {
 -        xfree (conversion_buffer);
 -        coding_free_composition_data (&coding);
 -        error ("IO error reading %s: %s",
 -               SDATA (orig_filename), emacs_strerror (errno));
 +        coding.mode |= CODING_MODE_LAST_BLOCK;
 +        decode_coding_c_string (&coding, read_buf, unprocessed,
 +                                conversion_buffer);
 +        coding.mode &= ~CODING_MODE_LAST_BLOCK;
        }
  
 -      /* Compare the beginning of the converted file
 -       with the buffer text.  */
 +      decoded = BUF_BEG_ADDR (XBUFFER (conversion_buffer));
 +      inserted = (BUF_Z_BYTE (XBUFFER (conversion_buffer))
 +                - BUF_BEG_BYTE (XBUFFER (conversion_buffer)));
 +
 +      /* Compare the beginning of the converted string with the buffer
 +       text.  */
  
        bufpos = 0;
        while (bufpos < inserted && same_at_start < same_at_end
diff --cc src/frame.c
Simple merge
diff --cc src/intervals.c
Simple merge
diff --cc src/lread.c
Simple merge
diff --cc src/xdisp.c
Simple merge
diff --cc src/xterm.c
Simple merge