summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-01-15 12:03:38 -0800
committerGlenn Morris <rgm@gnu.org>2011-01-15 12:03:38 -0800
commit362b9d483c714a8fd87966ddbd8686850f870e34 (patch)
treee37a94fe030c9361fa28b4f3f5c8910cc7ab8448 /lisp
parentdab7376027ea499962b2916652c6f30b40eac6d9 (diff)
parent0ad254447b7542284a2eb3c63b0732edb9409af7 (diff)
downloademacs-362b9d483c714a8fd87966ddbd8686850f870e34.tar.gz
Merge from emacs-23 branch.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog51
-rw-r--r--lisp/buff-menu.el11
-rw-r--r--lisp/files.el5
-rw-r--r--lisp/jka-compr.el5
-rw-r--r--lisp/mail/rmailmm.el10
-rw-r--r--lisp/net/ldap.el3
-rw-r--r--lisp/net/tramp-sh.el36
-rw-r--r--lisp/net/tramp.el11
-rw-r--r--lisp/progmodes/grep.el11
-rw-r--r--lisp/tmm.el66
-rw-r--r--lisp/vc/vc-bzr.el2
-rw-r--r--lisp/whitespace.el3
12 files changed, 157 insertions, 57 deletions
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)))