emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110967: Merge from emacs-24; up to r


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110967: Merge from emacs-24; up to r110931
Date: Tue, 20 Nov 2012 20:47:55 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110967 [merge]
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2012-11-20 20:47:55 -0800
message:
  Merge from emacs-24; up to r110931
modified:
  ChangeLog
  configure.ac
  doc/emacs/ChangeLog
  doc/emacs/display.texi
  doc/lispref/ChangeLog
  doc/lispref/debugging.texi
  doc/lispref/elisp.texi
  doc/lispref/os.texi
  doc/lispref/tips.texi
  doc/lispref/windows.texi
  etc/NEWS
  lisp/ChangeLog
  lisp/calendar/time-date.el
  lisp/emacs-lisp/ert.el
  lisp/eshell/em-cmpl.el
  lisp/files.el
  lisp/net/tramp-sh.el
  lisp/net/tramp.el
  lisp/pcomplete.el
  lisp/ps-bdf.el
  lisp/simple.el
  lisp/window.el
  nt/ChangeLog
  nt/inc/stdint.h
  nt/nmake.defs
  src/ChangeLog
  src/emacs.c
  src/fileio.c
  src/w32.c
  src/w32term.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-11-20 08:29:04 +0000
+++ b/ChangeLog 2012-11-21 04:47:55 +0000
@@ -1,3 +1,7 @@
+2012-11-21  Glenn Morris  <address@hidden>
+
+       * configure.ac (--enable-profiling): Doc fix.
+
 2012-11-20  Paul Eggert  <address@hidden>
 
        Improve static checking of integer overflow and stack smashing.

=== modified file 'configure.ac'
--- a/configure.ac      2012-11-20 08:29:04 +0000
+++ b/configure.ac      2012-11-21 04:47:55 +0000
@@ -329,10 +329,15 @@
 fi)
 
 
+dnl The name of this option is unfortunate.  It predates, and has no
+dnl relation to, the "sampling-based elisp profiler" added in 24.3.
+dnl Actually, it stops it working.
+dnl http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00393.html
 AC_ARG_ENABLE(profiling,
 [AS_HELP_STRING([--enable-profiling],
-               [build emacs with profiling support.
-                This might not work on all platforms])],
+               [build emacs with low-level, gprof profiling support.
+                Mainly useful for debugging Emacs itself.  May not work on
+                all platforms.  Stops profiler.el working.])],
 [ac_enable_profiling="${enableval}"],[])
 if test x$ac_enable_profiling != x ; then
    PROFILING_CFLAGS="-DPROFILING=1 -pg"

=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2012-11-18 01:52:36 +0000
+++ b/doc/emacs/ChangeLog       2012-11-21 04:47:55 +0000
@@ -1,3 +1,9 @@
+2012-11-21  Dani Moncayo  <address@hidden>
+
+       * display.texi (Auto Scrolling): Fix some inaccuracies, plus
+       clarifications (Bug#12865).
+       (Horizontal Scrolling): Clarifications.
+
 2012-11-18  Dani Moncayo  <address@hidden>
 
        * mark.texi (Disabled Transient Mark): Doc fixes (Bug#12746).

=== modified file 'doc/emacs/display.texi'
--- a/doc/emacs/display.texi    2012-11-07 20:43:38 +0000
+++ b/doc/emacs/display.texi    2012-11-18 06:27:43 +0000
@@ -213,59 +213,62 @@
 @node Auto Scrolling
 @section Automatic Scrolling
 
address@hidden automatic scrolling
   Emacs performs @dfn{automatic scrolling} when point moves out of the
-visible portion of the text.
+visible portion of the text.  Normally, automatic scrolling centers
+point vertically in the window, but there are several ways to alter
+this behavior.
 
 @vindex scroll-conservatively
-  Normally, this centers point vertically within the window.  However,
-if you set @code{scroll-conservatively} to a small number @var{n},
-then if you move point just a little off the screen (less than @var{n}
-lines), Emacs scrolls the text just far enough to bring point back on
-screen.  If doing so fails to make point visible, Emacs centers point
-in the window.  By default, @code{scroll-conservatively} address@hidden
-If you set @code{scroll-conservatively} to a large number (larger than
-100), Emacs will never center point as result of scrolling, even if
-point moves far away from the text previously displayed in the window.
-With such a large value, Emacs will always scroll text just enough for
-bringing point into view, so point will end up at the top or bottom of
-the window, depending on the scroll direction.
+  If you set @code{scroll-conservatively} to a small number @var{n},
+then moving point just a little off the screen (no more than @var{n}
+lines) causes Emacs to scroll just enough to bring point back on
+screen; if doing so fails to make point visible, Emacs scrolls just
+far enough to center point in the window.  If you set
address@hidden to a large number (larger than 100),
+automatic scrolling never centers point, no matter how far point
+moves; Emacs always scrolls text just enough to bring point into view,
+either at the top or bottom of the window depending on the scroll
+direction.  By default, @code{scroll-conservatively} address@hidden, which
+means to always center point in the window.
 
 @vindex scroll-step
-  An alternative way of controlling how Emacs scrolls text is by
-customizing the variable @code{scroll-step}.  Its value determines how
-many lines to scroll the window when point moves off the screen.  If
-moving by that number of lines fails to bring point back into view,
-point is centered instead.  The default value is zero, which causes
-point to always be centered after scrolling.
-
-  Since both @code{scroll-conservatively} and @code{scroll-step}
-control automatic scrolling in contradicting ways, you should set only
-one of them.  If you customize both, the value of
address@hidden takes precedence.
+  Another way to control automatic scrolling is to customize the
+variable @code{scroll-step}.  Its value determines the number of lines
+by which to automatically scroll, when point moves off the screen.  If
+scrolling by that number of lines fails to bring point back into view,
+point is centered instead.  The default value is zero, which (by
+default) causes point to always be centered after scrolling.
 
 @cindex aggressive scrolling
 @vindex scroll-up-aggressively
 @vindex scroll-down-aggressively
-  When the window does scroll by a distance longer than
address@hidden, you can control how aggressively it scrolls by
-setting the variables @code{scroll-up-aggressively} and
address@hidden  The value of
address@hidden should be either @code{nil}, or a
-fraction @var{f} between 0 and 1.  A fraction specifies where on the
-screen to put point when scrolling upward, i.e.@: forward.  When point
-goes off the window end, the new start position is chosen to put point
address@hidden parts of the window height from the bottom margin.  Thus,
-larger @var{f} means more aggressive scrolling: more new text is
-brought into view.  The default value, @code{nil}, is equivalent to
-0.5.
-
-  Likewise, @code{scroll-down-aggressively} is used for scrolling
-down, i.e.@: backward.  The value specifies how far point should be
-placed from the top margin of the window; thus, as with
address@hidden, a larger value is more aggressive.
-
-  These two variables are ignored if either @code{scroll-step} or
address@hidden are set to a non-zero value.
+  A third way to control automatic scrolling is to customize the
+variables @code{scroll-up-aggressively} and
address@hidden, which directly specify the vertical
+position of point after scrolling.  The value of
address@hidden should be either @code{nil} (the
+default), or a floating point number @var{f} between 0 and 1.  The
+latter means that when point goes below the bottom window edge (i.e.@:
+scrolling forward), Emacs scrolls the window so that point is @var{f}
+parts of the window height from the bottom window edge.  Thus, larger
address@hidden means more aggressive scrolling: more new text is brought into
+view.  The default value, @code{nil}, is equivalent to 0.5.
+
+  Likewise, @code{scroll-down-aggressively} is used when point goes
+above the bottom window edge (i.e.@: scrolling backward).  The value
+specifies how far point should be from the top margin of the window
+after scrolling.  Thus, as with @code{scroll-up-aggressively}, a
+larger value is more aggressive.
+
+  Note that the variables @code{scroll-conservatively},
address@hidden, and @code{scroll-up-aggressively} /
address@hidden control automatic scrolling in
+contradictory ways.  Therefore, you should pick no more than one of
+these methods to customize automatic scrolling.  In case you customize
+multiple variables, the order of priority is:
address@hidden, then @code{scroll-step}, and finally
address@hidden / @code{scroll-down-aggressively}.
 
 @vindex scroll-margin
   The variable @code{scroll-margin} restricts how close point can come
@@ -295,10 +298,10 @@
 
 @vindex hscroll-margin
   The variable @code{hscroll-margin} controls how close point can get
-to the window's edges before automatic scrolling occurs.  It is
-measured in columns.  For example, if the value is 5, then moving
-point within 5 columns of an edge causes horizontal scrolling away
-from that edge.
+to the window's left and right edges before automatic scrolling
+occurs.  It is measured in columns.  For example, if the value is 5,
+then moving point within 5 columns of an edge causes horizontal
+scrolling away from that edge.
 
 @vindex hscroll-step
   The variable @code{hscroll-step} determines how many columns to

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2012-11-18 01:52:36 +0000
+++ b/doc/lispref/ChangeLog     2012-11-21 04:47:55 +0000
@@ -1,3 +1,20 @@
+2012-11-21  Glenn Morris  <address@hidden>
+
+       * debugging.texi (Profiling): New section.
+       (Debugging): Mention profiling in the introduction.
+       * tips.texi (Compilation Tips): Move profiling to separate section.
+       * elisp.texi: Add Profiling to detailed menu.
+
+2012-11-21  Martin Rudalics  <address@hidden>
+
+       * windows.texi (Display Action Functions): Fix recently added
+       example.  Suggested by Michael Heerdegen.
+
+2012-11-21  Paul Eggert  <address@hidden>
+
+       Minor cleanup for times as lists of four integers.
+       * os.texi (Time Parsing): Time values can now be four integers.
+
 2012-11-18  Glenn Morris  <address@hidden>
 
        * loading.texi (How Programs Do Loading): Add eager macro expansion.

=== modified file 'doc/lispref/debugging.texi'
--- a/doc/lispref/debugging.texi        2012-11-11 01:16:25 +0000
+++ b/doc/lispref/debugging.texi        2012-11-21 01:52:03 +0000
@@ -32,6 +32,9 @@
 @item
 You can use the ERT package to write regression tests for the program.
 @xref{Top,the ERT manual,, ERT, ERT: Emacs Lisp Regression Testing}.
+
address@hidden
+You can profile the program to get hints about how to make it more efficient.
 @end itemize
 
   Other useful tools for debugging input and output problems are the
@@ -43,6 +46,7 @@
 * Edebug::              A source-level Emacs Lisp debugger.
 * Syntax Errors::       How to find syntax errors.
 * Test Coverage::       Ensuring you have tested all branches in your code.
+* Profiling::           Measuring the resources that your code uses.
 @end menu
 
 @node Debugger
@@ -809,3 +813,63 @@
   Edebug also has a coverage testing feature (@pxref{Coverage
 Testing}).  These features partly duplicate each other, and it would
 be cleaner to combine them.
+
+
address@hidden Profiling
address@hidden Profiling
address@hidden profiling
address@hidden measuring resource usage
address@hidden memory usage
+
+If your program is working correctly, but you want to make it run more
+quickly or efficiently, the first thing to do is @dfn{profile} your
+code so that you know how it is using resources.  If you find that one
+particular function is responsible for a significant portion of the
+runtime, you can start looking for ways to optimize that piece.
+
+Emacs has built-in support for this.  To begin profiling, type
address@hidden profiler-start}.  You can choose to profile by processor
+usage, memory usage, or both.  After doing some work, type
address@hidden profiler-report} to display a summary buffer for each
+resource that you chose to profile.  The names of the report buffers
+include the times at which the reports were generated, so you can
+generate another report later on without erasing previous results.
+When you have finished profiling, type @kbd{M-x profiler-stop} (there
+is a small overhead associated with profiling).
+
+The profiler report buffer shows, on each line, a function that was
+called, followed by how much resource (processor or memory) it used in
+absolute and percentage times since profiling started.  If a given
+line has a @samp{+} symbol at the left-hand side, you can expand that
+line by typing @key{RET}, in order to see the function(s) called by
+the higher-level function.  Pressing @key{RET} again will collapse
+back to the original state.
+
+Press @kbd{j} or @kbd{mouse-2} to jump to the definition of a function.
+Press @kbd{d} to view a function's documentation.
+You can save a profile to a file using @kbd{C-x C-w}.
+You can compare two profiles using @kbd{=}.
+
address@hidden FIXME reversed calltree?
+
address@hidden @file{elp.el}
address@hidden timing programs
+The @file{elp} library offers an alternative approach.  See the file
address@hidden for instructions.
+
address@hidden @file{benchmark.el}
address@hidden benchmarking
+You can check the speed of individual Emacs Lisp forms using the
address@hidden library.  See the functions @code{benchmark-run} and
address@hidden in @file{benchmark.el}.
+
address@hidden Not worth putting in the printed manual.
address@hidden
address@hidden --enable-profiling option of configure
+For low-level profiling of Emacs itself, you can build it using the
address@hidden option of @command{configure}.  When Emacs
+exits, it generates a file @file{gmon.out} that you can examine using
+the @command{gprof} utility.  This feature is mainly useful for
+debugging Emacs.  It actually stops the Lisp-level @kbd{M-x
address@hidden commands described above from working.
address@hidden ifnottex

=== modified file 'doc/lispref/elisp.texi'
--- a/doc/lispref/elisp.texi    2012-11-07 09:41:52 +0000
+++ b/doc/lispref/elisp.texi    2012-11-20 08:02:54 +0000
@@ -617,6 +617,7 @@
 * Edebug::                  A source-level Emacs Lisp debugger.
 * Syntax Errors::           How to find syntax errors.
 * Test Coverage::           Ensuring you have tested all branches in your code.
+* Profiling::               Measuring the resources that your code uses.
 
 The Lisp Debugger
 

=== modified file 'doc/lispref/os.texi'
--- a/doc/lispref/os.texi       2012-11-08 07:50:43 +0000
+++ b/doc/lispref/os.texi       2012-11-21 04:47:55 +0000
@@ -1373,8 +1373,8 @@
 @node Time Parsing
 @section Parsing and Formatting Times
 
-  These functions convert time values (lists of two or three integers)
-to text in a string, and vice versa.
+  These functions convert time values to text in a string, and vice versa.
+Time values are lists of two to four integers (@pxref{Time of Day}).
 
 @defun date-to-time string
 This function parses the time-string @var{string} and returns the

=== modified file 'doc/lispref/tips.texi'
--- a/doc/lispref/tips.texi     2012-10-22 02:18:58 +0000
+++ b/doc/lispref/tips.texi     2012-11-20 08:02:54 +0000
@@ -460,18 +460,8 @@
 
 @itemize @bullet
 @item
address@hidden profiling
address@hidden timing programs
address@hidden @file{elp.el}
-Profile your program with the @file{elp} library.  See the file
address@hidden for instructions.
-
address@hidden
address@hidden @file{benchmark.el}
address@hidden benchmarking
-Check the speed of individual Emacs Lisp forms using the
address@hidden library.  See the functions @code{benchmark-run} and
address@hidden in @file{benchmark.el}.
+Profile your program, to find out where the time is being spent.
address@hidden
 
 @item
 Use iteration rather than recursion whenever possible.

=== modified file 'doc/lispref/windows.texi'
--- a/doc/lispref/windows.texi  2012-11-18 01:52:36 +0000
+++ b/doc/lispref/windows.texi  2012-11-21 04:47:55 +0000
@@ -2038,7 +2038,8 @@
 follows: If `*foo*' already appears on a visible or iconified frame, it
 will reuse its window.  Otherwise, it will try to pop up a new window
 or, if that is impossible, a new frame.  If all these steps fail, it
-will try to use some existing window.
+will proceed using whatever @code{display-buffer-base-action} and
address@hidden prescribe.
 
    Furthermore, @code{display-buffer} will try to adjust a reused window
 (provided `*foo*' was put by @code{display-buffer} there before) or a

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2012-11-20 20:06:17 +0000
+++ b/etc/NEWS  2012-11-21 04:47:55 +0000
@@ -847,7 +847,7 @@
 ** New sampling-based Elisp profiler.
 Try M-x profiler-start, do some work, and then call M-x profiler-report.
 When finished, use M-x profiler-stop.  The sampling rate can be based on
-CPU time (only supported on some systems) or memory allocations.
+CPU time or memory allocations.
 
 +++
 ** CL-style generalized variables are now in core Elisp.

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-11-20 19:32:20 +0000
+++ b/lisp/ChangeLog    2012-11-21 04:47:55 +0000
@@ -1,3 +1,46 @@
+2012-11-21  Eli Zaretskii  <address@hidden>
+
+       * simple.el (line-move): Don't call line-move-partial if
+       scroll-conservatively is in effect.  (Bug#12927)
+
+2012-11-21  Stefan Monnier  <address@hidden>
+
+       * eshell/em-cmpl.el (eshell-pcomplete): Refine fix for bug#12838:
+       Fallback on completion-at-point rather than
+       pcomplete-expand-and-complete, and only if pcomplete actually failed.
+       (eshell-cmpl-initialize): Setup completion-at-point.
+
+       * pcomplete.el (pcomplete--entries): Obey pcomplete-ignore-case.
+
+       * emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib.
+
+2012-11-21  Michael Albinus  <address@hidden>
+
+       * net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files
+       are remote, check out-of-band property for both.
+
+2012-11-21  Stefan Monnier  <address@hidden>
+
+       * window.el (switch-to-buffer): Re-add the warning that was lost in the
+       code rewrite.
+
+2012-11-21  Paul Eggert  <address@hidden>
+
+       More minor time fixes.
+       * calendar/time-date.el: Commentary fix.
+       * net/tramp-sh.el (tramp-do-file-attributes-with-ls): Undo last change;
+       too much other code depends on (0 0) time stamps.
+       * net/tramp.el (tramp-time-less-p, tramp-time-subtract):
+       Add a couple of FIXME comments.
+
+       Minor cleanup for times as lists of four integers.
+       * files.el (dir-locals-directory-cache):
+       * ps-bdf.el (bdf-file-mod-time, bdf-read-font-info):
+       Doc fixes.
+       * net/tramp-sh.el (tramp-do-file-attributes-with-ls):
+       * ps-bdf.el (bdf-file-newer-than-time):
+       Process four-integers time stamps, not two.  Doc fixes.
+
 2012-11-20  Stefan Monnier  <address@hidden>
 
        * uniquify.el (uniquify-managed): Use defvar-local.

=== modified file 'lisp/calendar/time-date.el'
--- a/lisp/calendar/time-date.el        2012-11-19 16:17:49 +0000
+++ b/lisp/calendar/time-date.el        2012-11-21 04:47:55 +0000
@@ -30,11 +30,10 @@
 ;; value equal to HIGH * 2^16 + LOW + USEC * 10^-6 + PSEC * 10^-12
 ;; seconds, where missing components are treated as zero.  HIGH can be
 ;; negative, either because the value is a time difference, or because
-;; the machine supports negative time stamps that fall before the
-;; epoch.  The macro `with-decoded-time-value' and the
-;; function `encode-time-value' make it easier to deal with these
-;; three formats.  See `time-subtract' for an example of how to use
-;; them.
+;; the machine supports negative time stamps that fall before the epoch.
+;; The macro `with-decoded-time-value' and the function
+;; `encode-time-value' make it easier to deal with these formats.
+;; See `time-subtract' for an example of how to use them.
 
 ;;; Code:
 

=== modified file 'lisp/emacs-lisp/ert.el'
--- a/lisp/emacs-lisp/ert.el    2012-09-24 15:58:20 +0000
+++ b/lisp/emacs-lisp/ert.el    2012-11-19 17:02:20 +0000
@@ -388,16 +388,11 @@
 (defun ert--expand-should-1 (whole form inner-expander)
   "Helper function for the `should' macro and its variants."
   (let ((form
-         ;; If `cl-macroexpand' isn't bound, the code that we're
-         ;; compiling doesn't depend on cl and thus doesn't need an
-         ;; environment arg for `macroexpand'.
-         (if (fboundp 'cl-macroexpand)
-             ;; Suppress warning about run-time call to cl function: we
-             ;; only call it if it's fboundp.
-             (with-no-warnings
-               (cl-macroexpand form (and (boundp 'cl-macro-environment)
-                                         cl-macro-environment)))
-           (macroexpand form))))
+         (macroexpand form (cond
+                            ((boundp 'macroexpand-all-environment)
+                             macroexpand-all-environment)
+                            ((boundp 'cl-macro-environment)
+                             cl-macro-environment)))))
     (cond
      ((or (atom form) (ert--special-operator-p (car form)))
       (let ((value (ert--gensym "value-")))

=== modified file 'lisp/eshell/em-cmpl.el'
--- a/lisp/eshell/em-cmpl.el    2012-11-15 07:59:46 +0000
+++ b/lisp/eshell/em-cmpl.el    2012-11-19 19:22:07 +0000
@@ -297,6 +297,8 @@
   (define-key eshell-command-map [? ] 'pcomplete-expand)
   (define-key eshell-mode-map [tab] 'eshell-pcomplete)
   (define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete)
+  (add-hook 'completion-at-point-functions
+            #'pcomplete-completions-at-point nil t)
   ;; jww (1999-10-19): Will this work on anything but X?
   (if (featurep 'xemacs)
       (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse)
@@ -452,9 +454,9 @@
 (defun eshell-pcomplete ()
   "Eshell wrapper for `pcomplete'."
   (interactive)
-  (if eshell-cmpl-ignore-case
-      (pcomplete-expand-and-complete)  ; hack workaround for bug#12838
-    (pcomplete)))
+  (condition-case nil
+      (pcomplete)
+    (text-read-only (completion-at-point)))) ; Workaround for bug#12838.
 
 (provide 'em-cmpl)
 

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2012-11-19 18:27:25 +0000
+++ b/lisp/files.el     2012-11-21 04:47:55 +0000
@@ -3433,7 +3433,7 @@
 CLASS is the name of a variable class (a symbol).
 MTIME is the recorded modification time of the directory-local
 variables file associated with this entry.  This time is a list
-of two integers (the same format as `file-attributes'), and is
+of integers (the same format as `file-attributes'), and is
 used to test whether the cache entry is still valid.
 Alternatively, MTIME can be nil, which means the entry is always
 considered valid.")

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2012-10-09 12:49:02 +0000
+++ b/lisp/net/tramp-sh.el      2012-11-19 15:25:10 +0000
@@ -1270,9 +1270,10 @@
          res-uid
          ;; 3. File gid.
          res-gid
-         ;; 4. Last access time, as a list of two integers. First
-         ;; integer has high-order 16 bits of time, second has low 16
-         ;; bits.
+         ;; 4. Last access time, as a list of integers.  Normally this
+         ;; would be in the same format as `current-time', but the
+         ;; subseconds part is not currently implemented, and (0 0)
+         ;; denotes an unknown time.
          ;; 5. Last modification time, likewise.
          ;; 6. Last status change time, likewise.
          '(0 0) '(0 0) '(0 0)          ;CCC how to find out?
@@ -1980,6 +1981,7 @@
     (error "Unknown operation `%s', must be `copy' or `rename'" op))
   (let ((t1 (tramp-tramp-file-p filename))
        (t2 (tramp-tramp-file-p newname))
+       (length (nth 7 (file-attributes (file-truename filename))))
        (context (and preserve-selinux-context
                      (apply 'file-selinux-context (list filename))))
        pr tm)
@@ -2009,8 +2011,9 @@
                 ok-if-already-exists keep-date preserve-uid-gid))
 
               ;; Try out-of-band operation.
-              ((tramp-method-out-of-band-p
-                v1 (nth 7 (file-attributes (file-truename filename))))
+              ((and
+                (tramp-method-out-of-band-p v1 length)
+                (tramp-method-out-of-band-p v2 length))
                (tramp-do-copy-or-rename-file-out-of-band
                 op filename newname keep-date))
 
@@ -2038,8 +2041,7 @@
 
           ;; If the Tramp file has an out-of-band method, the
           ;; corresponding copy-program can be invoked.
-          ((tramp-method-out-of-band-p
-            v (nth 7 (file-attributes (file-truename filename))))
+          ((tramp-method-out-of-band-p v length)
            (tramp-do-copy-or-rename-file-out-of-band
             op filename newname keep-date))
 

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2012-11-08 15:10:08 +0000
+++ b/lisp/net/tramp.el 2012-11-21 04:47:55 +0000
@@ -3767,6 +3767,7 @@
     ("oct" . 10) ("nov" . 11) ("dec" . 12))
   "Alist mapping month names to integers.")
 
+;; FIXME: Shouldn't this also look at any subseconds parts of T1 and T2?
 ;;;###tramp-autoload
 (defun tramp-time-less-p (t1 t2)
   "Say whether time value T1 is less than time value T2."
@@ -3776,6 +3777,7 @@
       (and (= (car t1) (car t2))
           (< (nth 1 t1) (nth 1 t2)))))
 
+;; FIXME: Shouldn't this also look at any subseconds parts of T1 and T2?
 (defun tramp-time-subtract (t1 t2)
   "Subtract two time values.
 Return the difference in the format of a time value."

=== modified file 'lisp/pcomplete.el'
--- a/lisp/pcomplete.el 2012-09-28 16:02:31 +0000
+++ b/lisp/pcomplete.el 2012-11-19 19:22:07 +0000
@@ -833,7 +833,8 @@
                       . ,(lambda (comps)
                            (sort comps pcomplete-compare-entry-function)))
                      ,@(cdr (completion-file-name-table s p a)))
-        (let ((completion-ignored-extensions nil))
+        (let ((completion-ignored-extensions nil)
+             (completion-ignore-case pcomplete-ignore-case))
           (completion-table-with-predicate
            #'comint-completion-file-name-table pred 'strict s p a))))))
 

=== modified file 'lisp/ps-bdf.el'
--- a/lisp/ps-bdf.el    2012-01-19 07:21:25 +0000
+++ b/lisp/ps-bdf.el    2012-11-18 02:13:19 +0000
@@ -70,20 +70,15 @@
 
 (defsubst bdf-file-mod-time (filename)
   "Return modification time of FILENAME.
-The value is a list of two integers, the first integer has high-order
-16 bits, the second has low 16 bits."
+The value is a list of integers in the same format as `current-time'."
   (nth 5 (file-attributes filename)))
 
 (defun bdf-file-newer-than-time (filename mod-time)
   "Return non-nil if and only if FILENAME is newer than MOD-TIME.
-MOD-TIME is a modification time as a list of two integers, the first
-integer has high-order 16 bits, the second has low 16 bits."
-  (let* ((new-mod-time (bdf-file-mod-time filename))
-        (new-time (car new-mod-time))
-        (time (car mod-time)))
-    (or (> new-time time)
-       (and (= new-time time)
-            (> (nth 1 new-mod-time) (nth 1 mod-time))))))
+MOD-TIME is a modification time as a list of integers in the same
+format as `current-time'."
+  (let ((new-mod-time (bdf-file-mod-time filename)))
+    (time-less-p mod-time new-mod-time)))
 
 (defun bdf-find-file (bdfname)
   "Return a buffer visiting a bdf file BDFNAME.
@@ -178,8 +173,8 @@
     (BDFFILE MOD-TIME FONT-BOUNDING-BOX
      RELATIVE-COMPOSE BASELINE-OFFSET CODE-RANGE MAXLEN OFFSET-VECTOR)
 
-MOD-TIME is last modification time as a list of two integers, the
-first integer has high-order 16 bits, the second has low 16 bits.
+MOD-TIME is last modification time as a list of integers in the
+same format as `current-time'.
 
 SIZE is a size of the font on 72 dpi device.  This value is got
 from SIZE record of the font.

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2012-10-07 22:31:58 +0000
+++ b/lisp/simple.el    2012-11-20 17:44:04 +0000
@@ -4583,6 +4583,9 @@
     (unless (and auto-window-vscroll try-vscroll
                 ;; Only vscroll for single line moves
                 (= (abs arg) 1)
+                ;; Under scroll-conservatively, the display engine
+                ;; does this better.
+                (zerop scroll-conservatively)
                 ;; But don't vscroll in a keyboard macro.
                 (not defining-kbd-macro)
                 (not executing-kbd-macro)

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2012-11-17 02:03:58 +0000
+++ b/lisp/window.el    2012-11-19 03:16:03 +0000
@@ -5870,7 +5870,12 @@
   :version "24.3")
 
 (defun switch-to-buffer (buffer-or-name &optional norecord force-same-window)
-  "Switch to buffer BUFFER-OR-NAME in the selected window.
+  "Display buffer BUFFER-OR-NAME in the selected window.
+
+WARNING: This is NOT the way to work on another buffer temporarily
+within a Lisp program!  Use `set-buffer' instead.  That avoids
+messing with the window-buffer correspondences.
+
 If the selected window cannot display the specified
 buffer (e.g. if it is a minibuffer window or strongly dedicated
 to another buffer), call `pop-to-buffer' to select the buffer in

=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog      2012-11-18 16:54:31 +0000
+++ b/nt/ChangeLog      2012-11-21 04:47:55 +0000
@@ -1,3 +1,11 @@
+2012-11-21  Eli Zaretskii  <address@hidden>
+
+       * nmake.defs: Use !if, not !ifdef.  For the details, see
+       
http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00027.html
+
+       * inc/stdint.h (INTPTR_MIN):
+       (PTRDIFF_MIN) [!__GNUC__]: Define for MSVC.
+
 2012-11-18  Eli Zaretskii  <address@hidden>
 
        * inc/unistd.h: Don't include fcntl.h and don't define O_RDWR.

=== modified file 'nt/inc/stdint.h'
--- a/nt/inc/stdint.h   2012-01-05 09:46:05 +0000
+++ b/nt/inc/stdint.h   2012-11-20 17:07:55 +0000
@@ -37,6 +37,7 @@
 #define INT64_MAX 9223372036854775807i64
 #define INT64_MIN (~INT64_MAX)
 #define INTPTR_MAX INT64_MAX
+#define INTPTR_MIN INT64_MIN
 #define UINTMAX_MAX UINT64_MAX
 #define UINTMAX_MIN UINT64_MIN
 #define INTMAX_MAX INT64_MAX
@@ -51,6 +52,7 @@
 #define INT32_MAX 2147483647
 #define INT32_MIN (~INT32_MAX)
 #define INTPTR_MAX INT32_MAX
+#define INTPTR_MIN INT32_MIN
 #define UINTMAX_MAX UINT32_MAX
 #define UINTMAX_MIN UINT32_MIN
 #define INTMAX_MAX INT32_MAX
@@ -60,6 +62,7 @@
 #endif
 
 #define PTRDIFF_MAX INTPTR_MAX
+#define PTRDIFF_MIN INTPTR_MIN
 
 #endif /* !__GNUC__ */
 

=== modified file 'nt/nmake.defs'
--- a/nt/nmake.defs     2012-09-30 21:36:42 +0000
+++ b/nt/nmake.defs     2012-11-20 17:13:10 +0000
@@ -116,7 +116,7 @@
 
 USE_CRT_DLL    = 1
 
-!ifdef USE_CRT_DLL
+!if USE_CRT_DLL
 libc           = msvcrt$(D).lib
 EMACS_EXTRA_C_FLAGS= -D_DLL -D_MT -DUSE_CRT_DLL=1
 !else

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-11-20 20:06:17 +0000
+++ b/src/ChangeLog     2012-11-21 04:47:55 +0000
@@ -1,3 +1,24 @@
+2012-11-21  Ken Brown  <address@hidden>
+
+       * emacs.c (main): Set the G_SLICE environment variable for all
+       Cygwin builds, not just GTK builds.  See
+       https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
+
+2012-11-21  Eli Zaretskii  <address@hidden>
+
+       * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
+       (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
+       Define for the MSVC compiler.
+
+       * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
+
+       * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
+       (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
+       dostounix_filename.  Prevents crashes down the road, because
+       dostounix_filename assumes it gets a unibyte string.  Reported by
+       Michel de Ruiter <address@hidden>, see
+       
http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
+
 2012-11-20  Stefan Monnier  <address@hidden>
 
        Conflate Qnil and Qunbound for `symbol-function'.

=== modified file 'src/emacs.c'
--- a/src/emacs.c       2012-11-17 22:12:47 +0000
+++ b/src/emacs.c       2012-11-21 04:47:55 +0000
@@ -715,7 +715,7 @@
   stack_base = &dummy;
 #endif
 
-#if defined (USE_GTK) && defined (G_SLICE_ALWAYS_MALLOC)
+#ifdef G_SLICE_ALWAYS_MALLOC
   /* This is used by the Cygwin build.  */
   setenv ("G_SLICE", "always-malloc", 1);
 #endif

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2012-11-14 04:55:41 +0000
+++ b/src/fileio.c      2012-11-21 04:47:55 +0000
@@ -315,6 +315,7 @@
   register const char *beg;
 #else
   register char *beg;
+  Lisp_Object tem_fn;
 #endif
   register const char *p;
   Lisp_Object handler;
@@ -374,10 +375,13 @@
          p = beg + strlen (beg);
        }
     }
-  dostounix_filename (beg);
-#endif /* DOS_NT */
-
+  tem_fn = ENCODE_FILE (make_specified_string (beg, -1, p - beg,
+                                              STRING_MULTIBYTE (filename)));
+  dostounix_filename (SSDATA (tem_fn));
+  return DECODE_FILE (tem_fn);
+#else  /* DOS_NT */
   return make_specified_string (beg, -1, p - beg, STRING_MULTIBYTE (filename));
+#endif /* DOS_NT */
 }
 
 DEFUN ("file-name-nondirectory", Ffile_name_nondirectory,
@@ -951,7 +955,18 @@
 #ifdef DOS_NT
          /* Make sure directories are all separated with /, but
             avoid allocation of a new string when not required. */
-         dostounix_filename (nm);
+         if (multibyte)
+           {
+             Lisp_Object tem_name = make_specified_string (nm, -1, strlen (nm),
+                                                           multibyte);
+
+             tem_name = ENCODE_FILE (tem_name);
+             dostounix_filename (SSDATA (tem_name));
+             tem_name = DECODE_FILE (tem_name);
+             memcpy (nm, SSDATA (tem_name), SBYTES (tem_name) + 1);
+           }
+         else
+           dostounix_filename (nm);
 #ifdef WINDOWSNT
          if (IS_DIRECTORY_SEP (nm[1]))
            {
@@ -1305,10 +1320,13 @@
        target[0] = '/';
        target[1] = ':';
       }
-    dostounix_filename (target);
-#endif /* DOS_NT */
-
-    result = make_specified_string (target, -1, o - target, multibyte);
+    result = make_specified_string (target, -1, o - target, multibyte);
+    result = ENCODE_FILE (result);
+    dostounix_filename (SSDATA (result));
+    result = DECODE_FILE (result);
+#else  /* !DOS_NT */
+    result = make_specified_string (target, -1, o - target, multibyte);
+#endif /* !DOS_NT */
   }
 
   /* Again look to see if the file name has special constructs in it
@@ -1587,8 +1605,18 @@
   memcpy (nm, SDATA (filename), SBYTES (filename) + 1);
 
 #ifdef DOS_NT
-  dostounix_filename (nm);
-  substituted = (strcmp (nm, SDATA (filename)) != 0);
+  {
+    Lisp_Object encoded_filename = ENCODE_FILE (filename);
+    Lisp_Object tem_fn;
+
+    dostounix_filename (SDATA (encoded_filename));
+    tem_fn = DECODE_FILE (encoded_filename);
+    nm = alloca (SBYTES (tem_fn) + 1);
+    memcpy (nm, SDATA (tem_fn), SBYTES (tem_fn) + 1);
+    substituted = (memcmp (nm, SDATA (filename), SBYTES (filename)) != 0);
+    if (substituted)
+      filename = tem_fn;
+  }
 #endif
   endp = nm + SBYTES (filename);
 

=== modified file 'src/w32.c'
--- a/src/w32.c 2012-11-17 22:12:47 +0000
+++ b/src/w32.c 2012-11-21 04:47:55 +0000
@@ -119,9 +119,10 @@
 #include <aclapi.h>
 
 #ifdef _MSC_VER
-/* MSVC doesn't provide the definition of REPARSE_DATA_BUFFER, except
-   on ntifs.h, which cannot be included because it triggers conflicts
-   with other Windows API headers.  So we define it here by hand.  */
+/* MSVC doesn't provide the definition of REPARSE_DATA_BUFFER and the
+   associated macros, except on ntifs.h, which cannot be included
+   because it triggers conflicts with other Windows API headers.  So
+   we define it here by hand.  */
 
 typedef struct _REPARSE_DATA_BUFFER {
     ULONG  ReparseTag;
@@ -149,6 +150,12 @@
     } DUMMYUNIONNAME;
 } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
 
+#define FILE_DEVICE_FILE_SYSTEM        9
+#define METHOD_BUFFERED                0
+#define FILE_ANY_ACCESS                0x00000000
+#define CTL_CODE(t,f,m,a)       (((t)<<16)|((a)<<14)|((f)<<2)|(m))
+#define FSCTL_GET_REPARSE_POINT \
+  CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #endif
 
 /* TCP connection support.  */

=== modified file 'src/w32term.h'
--- a/src/w32term.h     2012-11-18 01:52:36 +0000
+++ b/src/w32term.h     2012-11-21 04:47:55 +0000
@@ -751,7 +751,7 @@
 typedef BOOL (CALLBACK *LOCALE_ENUMPROCA)(LPSTR);
 typedef BOOL (CALLBACK *LOCALE_ENUMPROCW)(LPWSTR);
 BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA,DWORD);
-BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD)
+BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD);
 #ifdef UNICODE
 #define EnumSystemLocales EnumSystemLocalesW
 #else


reply via email to

[Prev in Thread] Current Thread [Next in Thread]