summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorTed Zlatanov <tzz@lifelogs.com>2014-12-12 19:15:10 -0500
committerTed Zlatanov <tzz@lifelogs.com>2014-12-12 19:23:19 -0500
commit28e0d0c95d8e17e18e94744e99ccd68c8c911703 (patch)
treea45021bd7042b2008cf6084bd4019777b7575492 /lisp
parentb81a1837916a7f3f7abd953338302fa237a532f2 (diff)
downloademacs-28e0d0c95d8e17e18e94744e99ccd68c8c911703.tar.gz
Merge from origin/emacs-24
bd6c441 * simple.el (password-word-equivalents): Add "passcode", used for numeric secrets like PINs or RSA tokens. 16d4c1c A better fix for bug#19346 82ec808 * .gitignore: Add !lib/std*.in.h, so as to not ignore the .in.h files. 3cf7629 Git ignore lib/std*.h 301a401 Always define `gnutls-available-p' even if GnuTLS is not available. d76b9b2 Don't break example string between 2 lines (bug#19257) 75b4857 Port commit-msg to mawk 9ac0332 Improve commit-msg messages and autosquash 0c2f254 Support overflow-newline-into-fringe together with word-wrap (bug#19300) 935ee05 * net/tramp-sh.el (tramp-get-remote-path): Use a login shell in order to determine `tramp-own-remote-path'. c2db939 python.el: Support interpreter paths with spaces d83f329 ChangeLog fix 0f9fbb9 Port commit-message checking to FreeBSD 9. 3db1ada admin/MAINTAINERS: Update my interests and responsibilities. 6382f24 * .gitignore: Ignore autosave files. Conflicts: ChangeLog lisp/progmodes/python.el src/gnutls.c
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/net/tramp-sh.el52
-rw-r--r--lisp/progmodes/python.el4
-rw-r--r--lisp/simple.el2
4 files changed, 50 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1db7c97680e..a41b5cc52aa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,18 @@
+2014-12-12 Michael Albinus <michael.albinus@gmx.de>
+
+ * simple.el (password-word-equivalents): Add "passcode", used for
+ numeric secrets like PINs or RSA tokens.
+
+2014-12-10 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp-sh.el (tramp-get-remote-path): Use a login shell in
+ order to determine `tramp-own-remote-path'.
+
+2014-12-09 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ * progmodes/python.el (python-shell-parse-command): Quote
+ `python-shell-interpreter`. (Bug#19289)
+
2014-12-12 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/python.el (python-indent-line): Use `noindent' in strings.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index c564988d370..c4d5e2fa97a 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3868,6 +3868,18 @@ file exists and nonzero exit status otherwise."
(setq item (pop alist))
(when (string-match (car item) shell)
(setq extra-args (cdr item))))
+ ;; It is useful to set the prompt in the following command
+ ;; because some people have a setting for $PS1 which /bin/sh
+ ;; doesn't know about and thus /bin/sh will display a strange
+ ;; prompt. For example, if $PS1 has "${CWD}" in the value, then
+ ;; ksh will display the current working directory but /bin/sh
+ ;; will display a dollar sign. The following command line sets
+ ;; $PS1 to a sane value, and works under Bourne-ish shells as
+ ;; well as csh-like shells. We also unset the variable $ENV
+ ;; because that is read by some sh implementations (eg, bash
+ ;; when called as sh) on startup; this way, we avoid the startup
+ ;; file clobbering $PS1. $PROMPT_COMMAND is another way to set
+ ;; the prompt in /bin/bash, it must be discarded as well.
(tramp-send-command
vec (format
"exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s"
@@ -3944,20 +3956,6 @@ seconds. If not, it produces an error message with the given ERROR-ARGS."
Mainly sets the prompt and the echo correctly. PROC is the shell
process to set up. VEC specifies the connection."
(let ((tramp-end-of-output tramp-initial-end-of-output))
- ;; It is useful to set the prompt in the following command because
- ;; some people have a setting for $PS1 which /bin/sh doesn't know
- ;; about and thus /bin/sh will display a strange prompt. For
- ;; example, if $PS1 has "${CWD}" in the value, then ksh will
- ;; display the current working directory but /bin/sh will display
- ;; a dollar sign. The following command line sets $PS1 to a sane
- ;; value, and works under Bourne-ish shells as well as csh-like
- ;; shells. Daniel Pittman reports that the unusual positioning of
- ;; the single quotes makes it work under `rc', too. We also unset
- ;; the variable $ENV because that is read by some sh
- ;; implementations (eg, bash when called as sh) on startup; this
- ;; way, we avoid the startup file clobbering $PS1. $PROMPT_COMMAND
- ;; is another way to set the prompt in /bin/bash, it must be
- ;; discarded as well.
(tramp-open-shell
vec
(or (tramp-get-connection-property vec "remote-shell" nil)
@@ -5046,13 +5044,25 @@ Return ATTR."
"/bin:/usr/bin")
"/bin:/usr/bin"))))
(own-remote-path
- (when elt2
- (condition-case nil
- (tramp-send-command-and-read vec "echo \\\"$PATH\\\"")
- (error
- (tramp-message
- vec 3 "$PATH not set, ignoring `tramp-own-remote-path'.")
- nil)))))
+ ;; We cannot apply `tramp-send-command-and-read' because
+ ;; the login shell could return more than just the $PATH
+ ;; string. So we emulate that function.
+ (when elt2
+ (tramp-send-command
+ vec
+ (format
+ "%s -l %s 'echo \\\"$PATH\\\"'"
+ (tramp-get-method-parameter
+ (tramp-file-name-method vec) 'tramp-remote-shell)
+ (mapconcat
+ 'identity
+ (tramp-get-method-parameter
+ (tramp-file-name-method vec) 'tramp-remote-shell-args)
+ " ")))
+ (with-current-buffer (tramp-get-connection-buffer vec)
+ (goto-char (point-max))
+ (forward-line -1)
+ (read (current-buffer))))))
;; Replace place holder `tramp-default-remote-path'.
(when elt1
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f1d8cff15ee..35e24e14e1c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2125,7 +2125,9 @@ uniqueness for different types of configurations."
;; `python-shell-interpreter' absolute path can be found by
;; `executable-find'.
(format "%s %s"
- (executable-find python-shell-interpreter)
+ ;; FIXME: Why executable-find?
+ (shell-quote-argument
+ (executable-find python-shell-interpreter))
python-shell-interpreter-args)))
(define-obsolete-function-alias
diff --git a/lisp/simple.el b/lisp/simple.el
index 9f447988a2f..0fcd5db45d9 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2796,7 +2796,7 @@ which is defined in the `warnings' library.\n")
t))
(defcustom password-word-equivalents
- '("password" "passphrase" "pass phrase"
+ '("password" "passcode" "passphrase" "pass phrase"
; These are sorted according to the GNU en_US locale.
"암호" ; ko
"パスワード" ; ja