diff options
-rw-r--r-- | doc/emacs/ChangeLog | 11 | ||||
-rw-r--r-- | doc/emacs/files.texi | 26 | ||||
-rw-r--r-- | doc/emacs/msdog.texi | 32 | ||||
-rw-r--r-- | doc/lispref/ChangeLog | 10 | ||||
-rw-r--r-- | doc/lispref/files.texi | 51 | ||||
-rw-r--r-- | lisp/ChangeLog | 51 | ||||
-rw-r--r-- | lisp/buff-menu.el | 11 | ||||
-rw-r--r-- | lisp/files.el | 5 | ||||
-rw-r--r-- | lisp/jka-compr.el | 5 | ||||
-rw-r--r-- | lisp/mail/rmailmm.el | 10 | ||||
-rw-r--r-- | lisp/net/ldap.el | 3 | ||||
-rw-r--r-- | lisp/net/tramp-sh.el | 36 | ||||
-rw-r--r-- | lisp/net/tramp.el | 11 | ||||
-rw-r--r-- | lisp/progmodes/grep.el | 11 | ||||
-rw-r--r-- | lisp/tmm.el | 66 | ||||
-rw-r--r-- | lisp/vc/vc-bzr.el | 2 | ||||
-rw-r--r-- | lisp/whitespace.el | 3 |
17 files changed, 232 insertions, 112 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index c2d058119a4..fa7b38e8bcb 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,14 @@ +2011-01-15 Chong Yidong <cyd@stupidchicken.com> + + * 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 <eliz@gnu.org> + + * msdog.texi (Windows Startup): Correct inaccurate description of + differences between emacsclient.exe and emacsclientw.exe. + 2011-01-02 Chong Yidong <cyd@stupidchicken.com> * rmail.texi (Rmail Display): Edit for grammar and conciseness. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 0df3769cd8b..c869e19afe7 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1160,7 +1160,6 @@ links point to directories. @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 @@ then the file name recorded for a buffer is the file's @dfn{truename} than the name you specify. Setting @code{find-file-visit-truename} also implies the effect of @code{find-file-existing-other-name}. +@cindex directory name abbreviation +@vindex 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 +@code{directory-abbrev-alist}. Each element in this list should have +the form @code{(@var{from} . @var{to})}, which says to replace +@var{from} 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 +@var{to} 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 +@file{/home/fsf} and so on are normally accessed through symbolic +links named @file{/fsf} and so on. + +@example +(("\\`/home/fsf" . "/fsf") + ("\\`/home/gd" . "/gd")) +@end example + @node Directories @section File Directories diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index 0c0dcb3f4af..306cb213374 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi @@ -90,20 +90,24 @@ Via the Emacs client program, @file{emacsclient.exe} or 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 -@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 +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 +@file{emacsclient.exe}, 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 +@samp{-a} 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 diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 6a51b3f506b..40481acec12 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,13 @@ +2011-01-15 Chong Yidong <cyd@stupidchicken.com> + + * files.texi (Directory Names): Move directory-abbrev-alist doc to + Emacs manual. + +2011-01-15 Eli Zaretskii <eliz@gnu.org> + + * files.texi (Directory Names): Explain why FROM in + directory-abbrev-alist should begin with \`. (Bug#7777) + 2011-01-11 Stefan Monnier <monnier@iro.umontreal.ca> * loading.texi (Hooks for Loading): Adjust doc of eval-after-load. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index e2d22033a0e..ee820b9ec88 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1906,51 +1906,22 @@ Don't try concatenating a slash by hand, as in because this is not portable. Always use @code{file-name-as-directory}. -@cindex 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. - -@defopt directory-abbrev-alist -The variable @code{directory-abbrev-alist} contains an alist of -abbreviations to use for file directories. Each element has the form -@code{(@var{from} . @var{to})}, and says to replace @var{from} with -@var{to} 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. - -@example -(("\\`/home/fsf" . "/fsf") - ("\\`/home/gp" . "/gp") - ("\\`/home/gd" . "/gd")) -@end example -@end 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 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3c88bb33646..8c0bfe3aaeb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,54 @@ +2011-01-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * 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 <michael.albinus@gmx.de> + + * 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 <michael.albinus@gmx.de> + + * net/tramp.el (tramp-default-method): Initialize with pscp/plink + only when running under W32. + +2011-01-15 Eli Zaretskii <eliz@gnu.org> + + * 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 <lennart.borgman@gmail.com> + + * 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 <eric.hanchrow@gmail.com> + + * net/ldap.el (ldap-search-internal): Discard stderr output. + +2011-01-15 Eli Zaretskii <eliz@gnu.org> + + * files.el (directory-abbrev-alist): Doc fix. (Bug#7777) + +2011-01-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * vc-bzr.el (vc-bzr-annotate-time): Tweak previous change. + +2011-01-15 Kenichi Handa <handa@m17n.org> + + * 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 <monnier@iro.umontreal.ca> * hexl.el (hexl-mode-old-*): Remove. diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 4eac52ac4a5..70f48a8a58e 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -112,9 +112,15 @@ A nil value means sort by visited order (the default).") 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 @@ Letters do not insert themselves; instead, they are commands. ;; 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 @@ For more information, see the function `buffer-menu'." (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)))) diff --git a/lisp/files.el b/lisp/files.el index 1e03ba1920f..2223c1ae6b8 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -57,7 +57,10 @@ when it has unsaved changes." 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; diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 8c9866380b3..739fd3f1dd0 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -166,8 +166,11 @@ to keep: LEN chars starting BEG chars from the beginning." (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 diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index ba1f39798e3..2221568e55f 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -742,7 +742,11 @@ directly." (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 @@ The other arguments are the same as `rmail-mime-multipart-handler'." (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 diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 88284af06f0..0de4c7f32d8 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -557,7 +557,8 @@ an alist of attribute/value pairs." (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)) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index ae7deeeb953..c50f4649e8e 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -803,7 +803,7 @@ This string is passed to `format', so percent characters need to be doubled.") (defconst tramp-perl-decode "%s -e ' # This script contributed by Juanma Barranquero <lektu@terra.es>. -# 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 @@ Goes through the list `tramp-inline-compress-commands'." 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 @@ function cell is returned to be applied on a buffer." ((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 diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cd9ef314acc..ef312af80ba 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -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 <kai.grossjohann@gmx.net> ;; Michael Albinus <michael.albinus@gmx.de> @@ -291,8 +291,11 @@ shouldn't return t when it isn't." ;; 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. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 8e36d3f5c6d..b327cf6b87d 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -565,7 +565,10 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." (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 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." (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 diff --git a/lisp/tmm.el b/lisp/tmm.el index 3d8433e281f..0341b5384f0 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -168,14 +168,13 @@ Its value should be an event that has a binding in MENU." ;; 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 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (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 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." (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)) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index d5d3c9d4888..1f368e1169b 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -750,7 +750,7 @@ property containing author and date information." (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))) diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 6a8b3b671e8..16f9bb451f5 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -1188,7 +1188,8 @@ See also `whitespace-newline' and `whitespace-display-mappings'." :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))) |