emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r102853: Merge from emacs-23 branch.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102853: Merge from emacs-23 branch.
Date: Sat, 15 Jan 2011 12:03:38 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102853 [merge]
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2011-01-15 12:03:38 -0800
message:
  Merge from emacs-23 branch.
modified:
  doc/emacs/ChangeLog
  doc/emacs/files.texi
  doc/emacs/msdog.texi
  doc/lispref/ChangeLog
  doc/lispref/files.texi
  lisp/ChangeLog
  lisp/buff-menu.el
  lisp/files.el
  lisp/jka-compr.el
  lisp/mail/rmailmm.el
  lisp/net/ldap.el
  lisp/net/tramp-sh.el
  lisp/net/tramp.el
  lisp/progmodes/grep.el
  lisp/tmm.el
  lisp/vc/vc-bzr.el
  lisp/whitespace.el
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2011-01-14 17:18:41 +0000
+++ b/doc/emacs/ChangeLog       2011-01-15 20:03:38 +0000
@@ -1,3 +1,14 @@
+2011-01-15  Chong Yidong  <address@hidden>
+
+       * files.texi (File Aliases): Move directory-abbrev-alist doc from Lisp
+       manual.  Explain why directory-abbrev-alist elements should be anchored
+       (Bug#7777).
+
+2011-01-15  Eli Zaretskii  <address@hidden>
+
+       * msdog.texi (Windows Startup): Correct inaccurate description of
+       differences between emacsclient.exe and emacsclientw.exe.
+
 2011-01-02  Chong Yidong  <address@hidden>
 
        * rmail.texi (Rmail Display): Edit for grammar and conciseness.

=== modified file 'doc/emacs/files.texi'
--- a/doc/emacs/files.texi      2011-01-14 17:18:41 +0000
+++ b/doc/emacs/files.texi      2011-01-15 20:03:38 +0000
@@ -1160,7 +1160,6 @@
 
 @vindex find-file-existing-other-name
 @vindex find-file-suppress-same-file-warnings
-
   Normally, if you visit a file which Emacs is already visiting under
 a different name, Emacs displays a message in the echo area and uses
 the existing buffer visiting that file.  This can happen on systems
@@ -1182,6 +1181,31 @@
 than the name you specify.  Setting @code{find-file-visit-truename} also
 implies the effect of @code{find-file-existing-other-name}.
 
address@hidden directory name abbreviation
address@hidden directory-abbrev-alist
+  Sometimes, a directory is ordinarily accessed through a symbolic
+link, and you may want Emacs to preferentially display its ``linked''
+name instead of its truename.  To do this, customize the variable
address@hidden  Each element in this list should have
+the form @code{(@var{from} . @var{to})}, which says to replace
address@hidden with @var{to} when it appears in a directory name.  For
+this feature to work properly, @var{from} and @var{to} should point to
+the same file.  The @var{from} string is actually a regular expression
+(@pxref{Regexps}); it should always start with @samp{\`}, to avoid
+matching to an incorrect part of the original directory name.  The
address@hidden string should be an ordinary absolute directory name.  Do not
+use @samp{~} to stand for a home directory in the @var{to} string;
+Emacs performs these substitutions separately.
+
+  Here's an example, from a system on which file system
address@hidden/home/fsf} and so on are normally accessed through symbolic
+links named @file{/fsf} and so on.
+
address@hidden
+(("\\`/home/fsf" . "/fsf")
+ ("\\`/home/gd" . "/gd"))
address@hidden example
+
 @node Directories
 @section File Directories
 

=== modified file 'doc/emacs/msdog.texi'
--- a/doc/emacs/msdog.texi      2011-01-14 17:18:41 +0000
+++ b/doc/emacs/msdog.texi      2011-01-15 20:03:38 +0000
@@ -90,20 +90,24 @@
 programs, and to reuse a running Emacs process for serving editing
 jobs required by other programs.  @xref{Emacs Server}.  The difference
 between @file{emacsclient.exe} and @file{emacsclientw.exe} is that the
-former waits for Emacs to signal that the editing job is finished,
-while the latter does not wait.  Which one of them to use in each case
-depends on the expectations of the program that needs editing
-services.  If the program will use the edited files, it needs to wait
-for Emacs, so you should use @file{emacsclient.exe}.  By contrast, if
-the results of editing are not needed by the invoking program, you
-will be better off using @file{emacsclientw.exe}.  A notable situation
-where you would want @file{emacsclientw.exe} is when you right-click
-on a file in the Windows Explorer and select ``Open With'' from the
-pop-up menu.  Use the @samp{--alternate-editor=} or @samp{-a} options
-if Emacs might not be running (or not running as a server) when
address@hidden is invoked---that will always give you an
-editor.  When invoked via @command{emacsclient}, Emacs will start in
-the current directory of the program that invoked
+former is a console program, while the latter is a Windows GUI
+program.  Both programs wait for Emacs to signal that the editing job
+is finished, before they exit and return control to the program that
+invoked them.  Which one of them to use in each case depends on the
+expectations of the program that needs editing services.  If that
+program is itself a console (text-mode) program, you should use
address@hidden, so that any of its messages and prompts appear
+in the same command window as those of the invoking program.  By
+contrast, if the invoking program is a GUI program, you will be better
+off using @file{emacsclientw.exe}, because @file{emacsclient.exe} will
+pop up a command window if it is invoked from a GUI program.  A
+notable situation where you would want @file{emacsclientw.exe} is when
+you right-click on a file in the Windows Explorer and select ``Open
+With'' from the pop-up menu.  Use the @samp{--alternate-editor=} or
address@hidden options if Emacs might not be running (or not running as a
+server) when @command{emacsclient} is invoked---that will always give
+you an editor.  When invoked via @command{emacsclient}, Emacs will
+start in the current directory of the program that invoked
 @command{emacsclient}.
 @end enumerate
 

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2011-01-14 17:18:41 +0000
+++ b/doc/lispref/ChangeLog     2011-01-15 20:03:38 +0000
@@ -1,3 +1,13 @@
+2011-01-15  Chong Yidong  <address@hidden>
+
+       * files.texi (Directory Names): Move directory-abbrev-alist doc to
+       Emacs manual.
+
+2011-01-15  Eli Zaretskii  <address@hidden>
+
+       * files.texi (Directory Names): Explain why FROM in
+       directory-abbrev-alist should begin with \`.  (Bug#7777)
+
 2011-01-11  Stefan Monnier  <address@hidden>
 
        * loading.texi (Hooks for Loading): Adjust doc of eval-after-load.

=== modified file 'doc/lispref/files.texi'
--- a/doc/lispref/files.texi    2011-01-14 17:18:41 +0000
+++ b/doc/lispref/files.texi    2011-01-15 20:03:38 +0000
@@ -1906,51 +1906,22 @@
 because this is not portable.  Always use
 @code{file-name-as-directory}.
 
address@hidden directory name abbreviation
-  Directory name abbreviations are useful for directories that are
-normally accessed through symbolic links.  Sometimes the users recognize
-primarily the link's name as ``the name'' of the directory, and find it
-annoying to see the directory's ``real'' name.  If you define the link
-name as an abbreviation for the ``real'' name, Emacs shows users the
-abbreviation instead.
-
address@hidden directory-abbrev-alist
-The variable @code{directory-abbrev-alist} contains an alist of
-abbreviations to use for file directories.  Each element has the form
address@hidden(@var{from} . @var{to})}, and says to replace @var{from} with
address@hidden when it appears in a directory name.  The @var{from} string is
-actually a regular expression; it ought to always start with @samp{\`}.
-The @var{to} string should be an ordinary absolute directory name.  Do
-not use @samp{~} to stand for a home directory in that string.  The
-function @code{abbreviate-file-name} performs these substitutions.
-
-You can set this variable in @file{site-init.el} to describe the
-abbreviations appropriate for your site.
-
-Here's an example, from a system on which file system @file{/home/fsf}
-and so on are normally accessed through symbolic links named @file{/fsf}
-and so on.
-
address@hidden
-(("\\`/home/fsf" . "/fsf")
- ("\\`/home/gp" . "/gp")
- ("\\`/home/gd" . "/gd"))
address@hidden example
address@hidden defopt
-
   To convert a directory name to its abbreviation, use this
 function:
 
 @defun abbreviate-file-name filename
 @anchor{Definition of abbreviate-file-name}
-This function applies abbreviations from @code{directory-abbrev-alist}
-to its argument, and also substitutes @samp{~} for the user's home
-directory if the argument names a file in the home directory or one of
-its subdirectories.  (If the home directory is a root directory, it is
-not replaced with @samp{~}, because this does not make the result
-shorter on many systems.)  You can use it for directory names and for
-file names, because it recognizes abbreviations even as part of the
-name.
+This function returns an abbreviated form of @var{filename}.  It
+applies the abbreviations specified in @code{directory-abbrev-alist}
+(@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}),
+then substitutes @samp{~} for the user's home directory if the
+argument names a file in the home directory or one of its
+subdirectories.  If the home directory is a root directory, it is not
+replaced with @samp{~}, because this does not make the result shorter
+on many systems.
+
+You can use this function for directory names and for file names,
+because it recognizes abbreviations even as part of the name.
 @end defun
 
 @node File Name Expansion

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-01-14 19:55:35 +0000
+++ b/lisp/ChangeLog    2011-01-15 20:03:38 +0000
@@ -1,3 +1,54 @@
+2011-01-15  Stefan Monnier  <address@hidden>
+
+       * tmm.el (tmm-get-keymap): Skip bindings without labels (bug#7721).
+       (tmm-prompt): Simplify.
+       (tmm-add-prompt): Remove unused var `win'.
+
+       * whitespace.el (global-whitespace-newline-mode): Fix call (bug#7810)
+       to minor mode which used nil accidentally to mean "turn off".
+
+2011-01-15  Michael Albinus  <address@hidden>
+
+       * net/tramp-sh.el (tramp-find-inline-compress)
+       (tramp-get-inline-coding): Quote command after pipe symbol for
+       local calls under W32.  (Bug#6784)
+
+2011-01-15  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-default-method): Initialize with pscp/plink
+       only when running under W32.
+
+2011-01-15  Eli Zaretskii  <address@hidden>
+
+       * progmodes/grep.el (grep-compute-defaults): Quote the program
+       file name after the pipe symbol in Grep templates.  (Bug#6784)
+       * jka-compr.el (jka-compr-partial-uncompress): Likewise.
+
+2011-01-15  Lennart Borgman  <address@hidden>
+
+       * buff-menu.el (Buffer-menu-buffer-list): New var.
+       (Buffer-menu-revert-function, list-buffers-noselect): Use it, so a
+       restricted buffer list is not lost on revert (Bug#7749).
+
+2011-01-15  Eric Hanchrow  <address@hidden>
+
+       * net/ldap.el (ldap-search-internal): Discard stderr output.
+
+2011-01-15  Eli Zaretskii  <address@hidden>
+
+       * files.el (directory-abbrev-alist): Doc fix.  (Bug#7777)
+
+2011-01-15  Stefan Monnier  <address@hidden>
+
+       * vc-bzr.el (vc-bzr-annotate-time): Tweak previous change.
+
+2011-01-15  Kenichi Handa  <address@hidden>
+
+       * mail/rmailmm.el (rmail-mime-insert-bulk): Display an unknown
+       part as a plain text.
+       (rmail-mime-process-multipart): Set the default content-type to
+       nil for unknown multipart subtypes (bug#7651).
+
 2011-01-14  Stefan Monnier  <address@hidden>
 
        * hexl.el (hexl-mode-old-*): Remove.

=== modified file 'lisp/buff-menu.el'
--- a/lisp/buff-menu.el 2011-01-14 17:18:41 +0000
+++ b/lisp/buff-menu.el 2011-01-15 20:03:38 +0000
@@ -112,9 +112,15 @@
 This variable determines whether reverting the buffer lists only
 file buffers.  It affects both manual reverting and reverting by
 Auto Revert Mode.")
-
 (make-variable-buffer-local 'Buffer-menu-files-only)
 
+(defvar Buffer-menu--buffers nil
+  "If non-nil, list of buffers shown in the current buffer-menu.
+This variable determines whether reverting the buffer lists only
+this buffers.  It affects both manual reverting and reverting by
+Auto Revert Mode.")
+(make-variable-buffer-local 'Buffer-menu--buffers)
+
 (defvar Info-current-file) ;; from info.el
 (defvar Info-current-node) ;; from info.el
 
@@ -282,7 +288,7 @@
     ;; interactively current buffer is correctly identified with a `.'
     ;; by `list-buffers-noselect'.
     (with-current-buffer (window-buffer)
-      (list-buffers-noselect Buffer-menu-files-only))
+      (list-buffers-noselect Buffer-menu-files-only Buffer-menu--buffers))
     (if oline
        (while (setq prop (next-single-property-change prop 'buffer))
          (when (eq (get-text-property prop 'buffer) oline)
@@ -919,6 +925,7 @@
       (and desired-point
           (goto-char desired-point))
       (setq Buffer-menu-files-only files-only)
+      (setq Buffer-menu--buffers buffer-list)
       (set-buffer-modified-p nil)
       (current-buffer))))
 

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2011-01-08 21:22:19 +0000
+++ b/lisp/files.el     2011-01-15 20:03:38 +0000
@@ -57,7 +57,10 @@
 A list of elements of the form (FROM . TO), each meaning to replace
 FROM with TO when it appears in a directory name.  This replacement is
 done when setting up the default directory of a newly visited file.
-*Every* FROM string ought to start with \"\\\\`\".
+
+FROM is matched against directory names anchored at the first
+character, so it should start with a \"\\\\`\", or, if directory
+names cannot have embedded newlines, with a \"^\".
 
 FROM and TO should be equivalent names, which refer to the
 same directory.  Do not use `~' in the TO strings;

=== modified file 'lisp/jka-compr.el'
--- a/lisp/jka-compr.el 2011-01-14 17:18:41 +0000
+++ b/lisp/jka-compr.el 2011-01-15 20:03:38 +0000
@@ -166,8 +166,11 @@
          (unwind-protect
              (or (memq (call-process
                         jka-compr-shell infile t nil "-c"
+                        ;; Windows shells need the program file name
+                        ;; after the pipe symbol be quoted if they use
+                        ;; forward slashes as directory separators.
                         (format
-                         "%s %s 2> %s | %s bs=%d skip=%d %s 2> %s"
+                         "%s %s 2> %s | \"%s\" bs=%d skip=%d %s 2> %s"
                          prog
                          (mapconcat 'identity args " ")
                          err-file

=== modified file 'lisp/mail/rmailmm.el'
--- a/lisp/mail/rmailmm.el      2011-01-14 17:18:41 +0000
+++ b/lisp/mail/rmailmm.el      2011-01-15 20:03:38 +0000
@@ -742,7 +742,11 @@
          (cond ((eq (cdr bulk-data) 'text)
                 (rmail-mime-insert-decoded-text entity))
                ((cdr bulk-data)
-                (rmail-mime-insert-image entity)))))
+                (rmail-mime-insert-image entity))
+               (t
+                ;; As we don't know how to display the body, just
+                ;; insert it as a text.
+                (rmail-mime-insert-decoded-text entity)))))
     (put-text-property beg (point) 'rmail-mime-entity entity)))
 
 (defun test-rmail-mime-bulk-handler ()
@@ -820,7 +824,9 @@
     (cond ((string-match "mixed" subtype)
           (setq content-type '("text/plain")))
          ((string-match "digest" subtype)
-          (setq content-type '("message/rfc822"))))
+          (setq content-type '("message/rfc822")))
+         (t
+          (setq content-type nil)))
 
     ;; Loop over all body parts, where beg points at the beginning of
     ;; the part and end points at the end of the part.  next points at

=== modified file 'lisp/net/ldap.el'
--- a/lisp/net/ldap.el  2011-01-14 17:18:41 +0000
+++ b/lisp/net/ldap.el  2011-01-15 20:03:38 +0000
@@ -557,7 +557,8 @@
               (not (equal "" sizelimit)))
          (setq arglist (nconc arglist (list (format "-z%s" sizelimit)))))
       (apply #'call-process ldap-ldapsearch-prog
-            nil buf nil
+            ;; Ignore stderr, which can corrupt results
+            nil (list buf nil) nil
             (append arglist ldap-ldapsearch-args filter))
       (insert "\n")
       (goto-char (point-min))

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2011-01-14 17:18:41 +0000
+++ b/lisp/net/tramp-sh.el      2011-01-15 20:03:38 +0000
@@ -803,7 +803,7 @@
 (defconst tramp-perl-decode
   "%s -e '
 # This script contributed by Juanma Barranquero <address@hidden>.
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 #   Free Software Foundation, Inc.
 use strict;
 
@@ -4065,9 +4065,17 @@
           vec 5
           "Checking local compress command `%s', `%s' for sanity"
           compress decompress)
-         (unless (zerop (tramp-call-local-coding-command
-                         (format "echo %s | %s | %s"
-                                 magic compress decompress) nil nil))
+         (unless
+             (zerop
+              (tramp-call-local-coding-command
+               (format
+                ;; Windows shells need the program file name after
+                ;; the pipe symbol be quoted if they use forward
+                ;; slashes as directory separators.
+                (if (memq system-type '(windows-nt))
+                    "echo %s | \"%s\" | \"%s\""
+                  "echo %s | %s | %s")
+                magic compress decompress) nil nil))
            (throw 'next nil))
          (tramp-message
           vec 5
@@ -4961,9 +4969,25 @@
         ((symbolp coding)
          coding)
         ((and compress (string-match "decoding" prop))
-         (format "(%s | %s >%%s)" coding compress))
+         (format
+          ;; Windows shells need the program file name after
+          ;; the pipe symbol be quoted if they use forward
+          ;; slashes as directory separators.
+          (if (and (string-match "local" prop)
+                   (memq system-type '(windows-nt)))
+              "(%s | \"%s\" >%%s)"
+            "(%s | %s >%%s)")
+          coding compress))
         (compress
-         (format "(%s <%%s | %s)" compress coding))
+         (format
+          ;; Windows shells need the program file name after
+          ;; the pipe symbol be quoted if they use forward
+          ;; slashes as directory separators.
+          (if (and (string-match "local" prop)
+                   (memq system-type '(windows-nt)))
+              "(%s <%%s | \"%s\")"
+            "(%s <%%s | %s)")
+          compress coding))
         ((string-match "decoding" prop)
          (format "%s >%%s" coding))
         (t

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2011-01-14 17:18:41 +0000
+++ b/lisp/net/tramp.el 2011-01-15 20:03:38 +0000
@@ -1,7 +1,7 @@
 ;;; tramp.el --- Transparent Remote Access, Multiple Protocol
 
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+;;   2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: Kai Großjohann <address@hidden>
 ;;         Michael Albinus <address@hidden>
@@ -291,8 +291,11 @@
   ;; password caching.  "scpc" is chosen if we detect that the user is
   ;; running OpenSSH 4.0 or newer.
   (cond
-   ;; PuTTY is installed.
-   ((executable-find "pscp")
+   ;; PuTTY is installed.  We don't take it, if it is installed on a
+   ;; non-windows system, or pscp from the pssh (parallel ssh) package
+   ;; is found.
+   ((and (eq system-type 'windows-nt)
+        (executable-find "pscp"))
     (if        (or (fboundp 'password-read)
            (fboundp 'auth-source-user-or-password)
            ;; Pageant is running.

=== modified file 'lisp/progmodes/grep.el'
--- a/lisp/progmodes/grep.el    2011-01-14 17:18:41 +0000
+++ b/lisp/progmodes/grep.el    2011-01-15 20:03:38 +0000
@@ -565,7 +565,10 @@
        (unless grep-find-command
          (setq grep-find-command
                (cond ((eq grep-find-use-xargs 'gnu)
-                      (format "%s . -type f -print0 | %s -0 -e %s"
+                      ;; Windows shells need the program file name
+                      ;; after the pipe symbol be quoted if they use
+                      ;; forward slashes as directory separators.
+                      (format "%s . -type f -print0 | \"%s\" -0 -e %s"
                               find-program xargs-program grep-command))
                      ((eq grep-find-use-xargs 'exec)
                       (let ((cmd0 (format "%s . -type f -exec %s"
@@ -576,21 +579,21 @@
                                  (shell-quote-argument ";"))
                          (1+ (length cmd0)))))
                      (t
-                      (format "%s . -type f -print | %s %s"
+                      (format "%s . -type f -print | \"%s\" %s"
                               find-program xargs-program grep-command)))))
        (unless grep-find-template
          (setq grep-find-template
                (let ((gcmd (format "%s <C> %s <R>"
                                    grep-program grep-options)))
                  (cond ((eq grep-find-use-xargs 'gnu)
-                        (format "%s . <X> -type f <F> -print0 | %s -0 -e %s"
+                        (format "%s . <X> -type f <F> -print0 | \"%s\" -0 -e 
%s"
                                 find-program xargs-program gcmd))
                        ((eq grep-find-use-xargs 'exec)
                         (format "%s . <X> -type f <F> -exec %s {} %s %s"
                                 find-program gcmd null-device
                                 (shell-quote-argument ";")))
                        (t
-                        (format "%s . <X> -type f <F> -print | %s %s"
+                        (format "%s . <X> -type f <F> -print | \"%s\" %s"
                                 find-program xargs-program gcmd))))))))
     (when (eq grep-highlight-matches 'auto-detect)
       (setq grep-highlight-matches

=== modified file 'lisp/tmm.el'
--- a/lisp/tmm.el       2011-01-14 17:18:41 +0000
+++ b/lisp/tmm.el       2011-01-15 20:03:38 +0000
@@ -168,14 +168,13 @@
     ;; It has no other elements.
     ;; The order of elements in tmm-km-list is the order of the menu bar.
     (mapc (lambda (elt)
-           (if (stringp elt)
-               (setq gl-str elt)
-             (cond
-              ((listp elt) (tmm-get-keymap elt not-menu))
-              ((vectorp elt)
-               (dotimes (i (length elt))
-                 (tmm-get-keymap (cons i (aref elt i)) not-menu))))))
-           menu)
+            (cond
+             ((stringp elt) (setq gl-str elt))
+             ((listp elt) (tmm-get-keymap elt not-menu))
+             ((vectorp elt)
+              (dotimes (i (length elt))
+                (tmm-get-keymap (cons i (aref elt i)) not-menu)))))
+          menu)
     ;; Choose an element of tmm-km-list; put it in choice.
     (if (and not-menu (= 1 (length tmm-km-list)))
        ;; If this is the top-level of an x-popup-menu menu,
@@ -368,32 +367,31 @@
   (add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t)
   (unless tmm-c-prompt
     (error "No active menu entries"))
-  (let ((win (selected-window)))
-    (setq tmm-old-mb-map (tmm-define-keys t))
-    ;; Get window and hide it for electric mode to get correct size
-    (save-window-excursion
-      (let ((completions
-            (mapcar 'car minibuffer-completion-table)))
-        (or tmm-completion-prompt
-            (add-hook 'completion-setup-hook
-                      'tmm-completion-delete-prompt 'append))
-        (unwind-protect
-            (with-output-to-temp-buffer "*Completions*"
-              (display-completion-list completions))
-          (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt)))
-      (set-buffer "*Completions*")
-      (tmm-remove-inactive-mouse-face)
-      (when tmm-completion-prompt
-       (let ((buffer-read-only nil))
-         (goto-char (point-min))
-         (insert tmm-completion-prompt))))
-    (save-selected-window
-      (other-window 1)                 ; Electric-pop-up-window does
+  (setq tmm-old-mb-map (tmm-define-keys t))
+  ;; Get window and hide it for electric mode to get correct size
+  (save-window-excursion
+    (let ((completions
+           (mapcar 'car minibuffer-completion-table)))
+      (or tmm-completion-prompt
+          (add-hook 'completion-setup-hook
+                    'tmm-completion-delete-prompt 'append))
+      (unwind-protect
+          (with-output-to-temp-buffer "*Completions*"
+            (display-completion-list completions))
+        (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt)))
+    (set-buffer "*Completions*")
+    (tmm-remove-inactive-mouse-face)
+    (when tmm-completion-prompt
+      (let ((buffer-read-only nil))
+        (goto-char (point-min))
+        (insert tmm-completion-prompt))))
+  (save-selected-window
+    (other-window 1)                   ; Electric-pop-up-window does
                                        ; not work in minibuffer
-      (Electric-pop-up-window "*Completions*")
-      (with-current-buffer "*Completions*"
-       (setq tmm-old-comp-map (tmm-define-keys nil))))
-    (insert tmm-c-prompt)))
+    (Electric-pop-up-window "*Completions*")
+    (with-current-buffer "*Completions*"
+      (setq tmm-old-comp-map (tmm-define-keys nil))))
+  (insert tmm-c-prompt))
 
 (defun tmm-delete-map ()
   (remove-hook 'minibuffer-exit-hook 'tmm-delete-map t)
@@ -497,7 +495,7 @@
               (if (or in-x-menu (stringp (car-safe elt)))
                   (setq str event event nil km elt)
                 (setq str event event nil km (cons 'keymap elt)))))
-        (unless (eq km 'ignore)
+        (unless (or (eq km 'ignore) (null str))
           (let ((binding (where-is-internal km nil t)))
             (when binding
               (setq binding (key-description binding))

=== modified file 'lisp/vc/vc-bzr.el'
--- a/lisp/vc/vc-bzr.el 2011-01-14 17:18:41 +0000
+++ b/lisp/vc/vc-bzr.el 2011-01-15 20:03:38 +0000
@@ -750,7 +750,7 @@
 (declare-function vc-annotate-convert-time "vc-annotate" (time))
 
 (defun vc-bzr-annotate-time ()
-  (when (re-search-forward "^ *[0-9.]+ +.* +|" nil t)
+  (when (re-search-forward "^ *[0-9.]+ +.+? +|" nil t)
     (let ((prop (get-text-property (line-beginning-position) 'help-echo)))
       (string-match "[0-9]+\\'" prop)
       (let ((str (match-string-no-properties 0 prop)))

=== modified file 'lisp/whitespace.el'
--- a/lisp/whitespace.el        2011-01-14 17:18:41 +0000
+++ b/lisp/whitespace.el        2011-01-15 20:03:38 +0000
@@ -1188,7 +1188,8 @@
   :global     t
   :group      'whitespace
   (let ((whitespace-style '(newline-mark newline)))
-    (global-whitespace-mode global-whitespace-newline-mode)
+    (global-whitespace-mode (if global-whitespace-newline-mode
+                                1 -1))
     ;; sync states (running a batch job)
     (setq global-whitespace-newline-mode global-whitespace-mode)))
 


reply via email to

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