diff options
| author | Paul Eggert | 2011-09-05 13:43:14 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-09-05 13:43:14 -0700 |
| commit | 1dc4aa6d975c9f92cd5c0d0baf5eae89e013fd67 (patch) | |
| tree | 8c3e07779650c446922a93839c3ecdabb85cdaea /lisp | |
| parent | f4af5137d41b5ff71771028385f89be889dd1315 (diff) | |
| parent | 697210c4822d4e7be9a81234d2026e5ace724a90 (diff) | |
| download | emacs-1dc4aa6d975c9f92cd5c0d0baf5eae89e013fd67.tar.gz emacs-1dc4aa6d975c9f92cd5c0d0baf5eae89e013fd67.zip | |
Merge from trunk.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 78 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 19 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-score.el | 14 | ||||
| -rw-r--r-- | lisp/gnus/gnus-spec.el | 58 | ||||
| -rw-r--r-- | lisp/gnus/gnus.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 3 | ||||
| -rw-r--r-- | lisp/help.el | 2 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 2 | ||||
| -rw-r--r-- | lisp/mail/rmailmm.el | 4 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 90 | ||||
| -rw-r--r-- | lisp/mail/smtpmail.el | 2 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 22 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 172 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 94 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 19 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 12 | ||||
| -rw-r--r-- | lisp/subr.el | 2 | ||||
| -rw-r--r-- | lisp/window.el | 48 |
19 files changed, 422 insertions, 230 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 599c383ef13..7a922e002d7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,81 @@ | |||
| 1 | 2011-09-05 Oleksandr Gavenko <gavenkoa@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * progmodes/grep.el (rgrep): Add "-type d" (bug#9414). | ||
| 4 | |||
| 5 | 2011-09-05 Juri Linkov <juri@jurta.org> | ||
| 6 | |||
| 7 | * progmodes/grep.el (grep-process-setup): Fix comments (bug#8084). | ||
| 8 | |||
| 9 | 2011-09-05 Juri Linkov <juri@jurta.org> | ||
| 10 | |||
| 11 | * progmodes/grep.el (grep-filter): Avoid incomplete processing by | ||
| 12 | keeping point where processing of grep matches begins, and | ||
| 13 | continue to delete remaining escape sequences from the same point. | ||
| 14 | (grep-filter): Make leading zero optional in "0?1;31m" because | ||
| 15 | git-grep emits "\033[1;31m" escape sequences unlike expected | ||
| 16 | "\033[01;31m" as GNU Grep does (bug#9408). | ||
| 17 | (grep-process-setup): Replace obsolete "ml=" with newer "sl=". | ||
| 18 | |||
| 19 | 2011-09-05 Juri Linkov <juri@jurta.org> | ||
| 20 | |||
| 21 | * subr.el (y-or-n-p): Capitalize "yes". | ||
| 22 | |||
| 23 | 2011-09-04 Michael Albinus <michael.albinus@gmx.de> | ||
| 24 | |||
| 25 | * net/tramp.el (top): Require 'shell. Use `tramp-unload-hook' but | ||
| 26 | `tramp-cache-unload-hook' where appropriate. | ||
| 27 | (tramp-methods): Rename `tramp-remote-sh' to | ||
| 28 | `tramp-remote-shell'. Add `tramp-remote-shell-args'. | ||
| 29 | (tramp-handle-shell-command): New defun, moved from tramp-sh.el. | ||
| 30 | |||
| 31 | * net/tramp-sh.el (top): Don't require 'shell. | ||
| 32 | (tramp-methods): Add `tramp-remote-shell' and | ||
| 33 | `tramp-remote-shell-args' entries. | ||
| 34 | (tramp-sh-file-name-handler-alist): Use `tramp-handle-shell-command'. | ||
| 35 | (tramp-sh-handle-shell-command): Remove. | ||
| 36 | (tramp-find-shell, tramp-open-connection-setup-interactive-shell): | ||
| 37 | Use `tramp-remote-shell'. | ||
| 38 | |||
| 39 | 2011-09-03 Chong Yidong <cyd@stupidchicken.com> | ||
| 40 | |||
| 41 | * mail/sendmail.el (sendmail-query-once-function): Deleted. | ||
| 42 | (sendmail-query-once): Save directly to send-mail-function. | ||
| 43 | Update message-send-mail-function too. | ||
| 44 | |||
| 45 | * mail/smtpmail.el (smtpmail-try-auth-methods): Clarify prompt. | ||
| 46 | |||
| 47 | 2011-09-03 Christoph Scholtes <cschol2112@googlemail.com> | ||
| 48 | |||
| 49 | * progmodes/python.el (python-mode-map): Use correct function to | ||
| 50 | start python interpreter from menu-bar (as reported by Geert | ||
| 51 | Kloosterman). | ||
| 52 | (inferior-python-mode-map): Fix typo. | ||
| 53 | (python-shell-map): Removed. | ||
| 54 | |||
| 55 | 2011-09-03 Deniz Dogan <deniz@dogan.se> | ||
| 56 | |||
| 57 | * net/rcirc.el (rcirc-print): Simplify code for | ||
| 58 | rcirc-scroll-show-maximum-output. There is no need to walk | ||
| 59 | through all windows to find the right one. | ||
| 60 | |||
| 61 | 2011-09-03 Christoph Scholtes <cschol2112@googlemail.com> | ||
| 62 | |||
| 63 | * help.el (help-return-method): Doc fix. | ||
| 64 | |||
| 65 | 2011-09-03 Martin Rudalics <rudalics@gmx.at> | ||
| 66 | |||
| 67 | * window.el (window-deletable-p): Don't return a non-nil value | ||
| 68 | when there's a buffer that was shown in the window before. | ||
| 69 | (Bug#9419) | ||
| 70 | (display-buffer-pop-up-frame, display-buffer-pop-up-window): Set | ||
| 71 | window's previous buffers to nil. | ||
| 72 | |||
| 73 | 2011-09-03 Eli Zaretskii <eliz@gnu.org> | ||
| 74 | |||
| 75 | * mail/rmailmm.el (rmail-mime-insert-tagline): Insert an extra | ||
| 76 | newline before and after the tag line, so it doesn't interfere | ||
| 77 | with determining the paragraph direction of bidirectional text. | ||
| 78 | |||
| 1 | 2011-09-03 Leo Liu <sdl.web@gmail.com> | 79 | 2011-09-03 Leo Liu <sdl.web@gmail.com> |
| 2 | 80 | ||
| 3 | * files.el (find-file-not-true-dirname-list): Remove. (Bug#9422) | 81 | * files.el (find-file-not-true-dirname-list): Remove. (Bug#9422) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index db5ee353c3c..9d719136cc1 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,22 @@ | |||
| 1 | 2011-09-04 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * gnus.el (gnus-home-directory): Add warning about setting in .gnus.el | ||
| 4 | (bug#9405). | ||
| 5 | |||
| 6 | * gnus-score.el (gnus-summary-increase-score): Doc clarification | ||
| 7 | (bug#9421). | ||
| 8 | |||
| 9 | * gnus-spec.el (gnus-face-0): Make all the face specs into defcustoms | ||
| 10 | (bug#9425). | ||
| 11 | |||
| 12 | * gnus-art.el (gnus-treatment-function-alist): Remove CRs as the first | ||
| 13 | thing (bug#9426). | ||
| 14 | |||
| 15 | 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 16 | |||
| 17 | * nnimap.el (nnimap-open-connection-1): Use the correct port number in | ||
| 18 | the error message. | ||
| 19 | |||
| 1 | 2011-09-02 Eli Zaretskii <eliz@gnu.org> | 20 | 2011-09-02 Eli Zaretskii <eliz@gnu.org> |
| 2 | 21 | ||
| 3 | * message.el (message-setup-1): Return t (Bug#9392). | 22 | * message.el (message-setup-1): Return t (Bug#9392). |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index eaf0ed52f51..9d962fc6d99 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -1657,14 +1657,14 @@ regexp." | |||
| 1657 | 1657 | ||
| 1658 | (defvar gnus-article-mime-handle-alist-1 nil) | 1658 | (defvar gnus-article-mime-handle-alist-1 nil) |
| 1659 | (defvar gnus-treatment-function-alist | 1659 | (defvar gnus-treatment-function-alist |
| 1660 | '((gnus-treat-x-pgp-sig gnus-article-verify-x-pgp-sig) | 1660 | '((gnus-treat-strip-cr gnus-article-remove-cr) |
| 1661 | (gnus-treat-x-pgp-sig gnus-article-verify-x-pgp-sig) | ||
| 1661 | (gnus-treat-strip-banner gnus-article-strip-banner) | 1662 | (gnus-treat-strip-banner gnus-article-strip-banner) |
| 1662 | (gnus-treat-strip-headers-in-body gnus-article-strip-headers-in-body) | 1663 | (gnus-treat-strip-headers-in-body gnus-article-strip-headers-in-body) |
| 1663 | (gnus-treat-highlight-signature gnus-article-highlight-signature) | 1664 | (gnus-treat-highlight-signature gnus-article-highlight-signature) |
| 1664 | (gnus-treat-buttonize gnus-article-add-buttons) | 1665 | (gnus-treat-buttonize gnus-article-add-buttons) |
| 1665 | (gnus-treat-fill-article gnus-article-fill-cited-article) | 1666 | (gnus-treat-fill-article gnus-article-fill-cited-article) |
| 1666 | (gnus-treat-fill-long-lines gnus-article-fill-cited-long-lines) | 1667 | (gnus-treat-fill-long-lines gnus-article-fill-cited-long-lines) |
| 1667 | (gnus-treat-strip-cr gnus-article-remove-cr) | ||
| 1668 | (gnus-treat-unsplit-urls gnus-article-unsplit-urls) | 1668 | (gnus-treat-unsplit-urls gnus-article-unsplit-urls) |
| 1669 | (gnus-treat-display-x-face gnus-article-display-x-face) | 1669 | (gnus-treat-display-x-face gnus-article-display-x-face) |
| 1670 | (gnus-treat-display-face gnus-article-display-face) | 1670 | (gnus-treat-display-face gnus-article-display-face) |
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index eb7234a811e..d8e424eacc8 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el | |||
| @@ -522,9 +522,10 @@ of the last successful match.") | |||
| 522 | (defun gnus-summary-lower-score (&optional score symp) | 522 | (defun gnus-summary-lower-score (&optional score symp) |
| 523 | "Make a score entry based on the current article. | 523 | "Make a score entry based on the current article. |
| 524 | The user will be prompted for header to score on, match type, | 524 | The user will be prompted for header to score on, match type, |
| 525 | permanence, and the string to be used. The numerical prefix will be | 525 | permanence, and the string to be used. The numerical prefix will |
| 526 | used as score. A symbolic prefix of `a' says to use the `all.SCORE' | 526 | be used as SCORE. A symbolic prefix of `a' (the SYMP parameter) |
| 527 | file for the command instead of the current score file." | 527 | says to use the `all.SCORE' file for the command instead of the |
| 528 | current score file." | ||
| 528 | (interactive (gnus-interactive "P\ny")) | 529 | (interactive (gnus-interactive "P\ny")) |
| 529 | (gnus-summary-increase-score (- (gnus-score-delta-default score)) symp)) | 530 | (gnus-summary-increase-score (- (gnus-score-delta-default score)) symp)) |
| 530 | 531 | ||
| @@ -537,9 +538,10 @@ file for the command instead of the current score file." | |||
| 537 | (defun gnus-summary-increase-score (&optional score symp) | 538 | (defun gnus-summary-increase-score (&optional score symp) |
| 538 | "Make a score entry based on the current article. | 539 | "Make a score entry based on the current article. |
| 539 | The user will be prompted for header to score on, match type, | 540 | The user will be prompted for header to score on, match type, |
| 540 | permanence, and the string to be used. The numerical prefix will be | 541 | permanence, and the string to be used. The numerical prefix will |
| 541 | used as score. A symbolic prefix of `a' says to use the `all.SCORE' | 542 | be used as SCORE. A symbolic prefix of `a' (the SYMP parameter) |
| 542 | file for the command instead of the current score file." | 543 | says to use the `all.SCORE' file for the command instead of the |
| 544 | current score file." | ||
| 543 | (interactive (gnus-interactive "P\ny")) | 545 | (interactive (gnus-interactive "P\ny")) |
| 544 | (let* ((nscore (gnus-score-delta-default score)) | 546 | (let* ((nscore (gnus-score-delta-default score)) |
| 545 | (prefix (if (< nscore 0) ?L ?I)) | 547 | (prefix (if (< nscore 0) ?L ?I)) |
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index 0fa64a84b75..31cb9864ff2 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el | |||
| @@ -264,11 +264,30 @@ Return a list of updated types." | |||
| 264 | (push (cons 'version emacs-version) gnus-format-specs)) | 264 | (push (cons 'version emacs-version) gnus-format-specs)) |
| 265 | updated)) | 265 | updated)) |
| 266 | 266 | ||
| 267 | (defvar gnus-mouse-face-0 'highlight) | 267 | (defcustom gnus-mouse-face-0 'highlight |
| 268 | (defvar gnus-mouse-face-1 'highlight) | 268 | "The \"%(hello%)\" face." |
| 269 | (defvar gnus-mouse-face-2 'highlight) | 269 | :group 'gnus-format |
| 270 | (defvar gnus-mouse-face-3 'highlight) | 270 | :type 'face) |
| 271 | (defvar gnus-mouse-face-4 'highlight) | 271 | |
| 272 | (defcustom gnus-mouse-face-1 'highlight | ||
| 273 | "The \"%1(hello%)\" face." | ||
| 274 | :group 'gnus-format | ||
| 275 | :type 'face) | ||
| 276 | |||
| 277 | (defcustom gnus-mouse-face-2 'highlight | ||
| 278 | "The \"%2(hello%)\" face." | ||
| 279 | :group 'gnus-format | ||
| 280 | :type 'face) | ||
| 281 | |||
| 282 | (defcustom gnus-mouse-face-3 'highlight | ||
| 283 | "The \"%3(hello%)\" face." | ||
| 284 | :group 'gnus-format | ||
| 285 | :type 'face) | ||
| 286 | |||
| 287 | (defcustom gnus-mouse-face-4 'highlight | ||
| 288 | "The \"%4(hello%)\" face." | ||
| 289 | :group 'gnus-format | ||
| 290 | :type 'face) | ||
| 272 | 291 | ||
| 273 | (defun gnus-mouse-face-function (form type) | 292 | (defun gnus-mouse-face-function (form type) |
| 274 | `(gnus-put-text-property | 293 | `(gnus-put-text-property |
| @@ -278,11 +297,30 @@ Return a list of updated types." | |||
| 278 | 'gnus-mouse-face | 297 | 'gnus-mouse-face |
| 279 | `(quote ,(symbol-value (intern (format "gnus-mouse-face-%d" type))))))) | 298 | `(quote ,(symbol-value (intern (format "gnus-mouse-face-%d" type))))))) |
| 280 | 299 | ||
| 281 | (defvar gnus-face-0 'bold) | 300 | (defcustom gnus-face-0 'bold |
| 282 | (defvar gnus-face-1 'italic) | 301 | "The \"%{hello%}\" face." |
| 283 | (defvar gnus-face-2 'bold-italic) | 302 | :group 'gnus-format |
| 284 | (defvar gnus-face-3 'bold) | 303 | :type 'face) |
| 285 | (defvar gnus-face-4 'bold) | 304 | |
| 305 | (defcustom gnus-face-1 'italic | ||
| 306 | "The \"%1{hello%}\" face." | ||
| 307 | :group 'gnus-format | ||
| 308 | :type 'face) | ||
| 309 | |||
| 310 | (defcustom gnus-face-2 'bold-italic | ||
| 311 | "The \"%2{hello%}\" face." | ||
| 312 | :group 'gnus-format | ||
| 313 | :type 'face) | ||
| 314 | |||
| 315 | (defcustom gnus-face-3 'bold | ||
| 316 | "The \"%3{hello%}\" face." | ||
| 317 | :group 'gnus-format | ||
| 318 | :type 'face) | ||
| 319 | |||
| 320 | (defcustom gnus-face-4 'bold | ||
| 321 | "The \"%4{hello%}\" face." | ||
| 322 | :group 'gnus-format | ||
| 323 | :type 'face) | ||
| 286 | 324 | ||
| 287 | (defun gnus-face-face-function (form type) | 325 | (defun gnus-face-face-function (form type) |
| 288 | `(gnus-add-text-properties | 326 | `(gnus-add-text-properties |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index cd9b6eeb949..34759cee06f 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -1245,7 +1245,12 @@ REST is a plist of following: | |||
| 1245 | 1245 | ||
| 1246 | (defcustom gnus-home-directory "~/" | 1246 | (defcustom gnus-home-directory "~/" |
| 1247 | "Directory variable that specifies the \"home\" directory. | 1247 | "Directory variable that specifies the \"home\" directory. |
| 1248 | All other Gnus file and directory variables are initialized from this variable." | 1248 | All other Gnus file and directory variables are initialized from this variable. |
| 1249 | |||
| 1250 | Note that Gnus is mostly loaded when the `.gnus.el' file is read. | ||
| 1251 | This means that other directory variables that are initialized | ||
| 1252 | from this variable won't be set properly if you set this variable | ||
| 1253 | in `.gnus.el'. Set this variable in `.emacs' instead." | ||
| 1249 | :group 'gnus-files | 1254 | :group 'gnus-files |
| 1250 | :type 'directory) | 1255 | :type 'directory) |
| 1251 | 1256 | ||
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 2dbc465f8c9..52c4b3c4290 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -350,7 +350,6 @@ textual parts.") | |||
| 350 | (with-current-buffer (nnimap-make-process-buffer buffer) | 350 | (with-current-buffer (nnimap-make-process-buffer buffer) |
| 351 | (let* ((coding-system-for-read 'binary) | 351 | (let* ((coding-system-for-read 'binary) |
| 352 | (coding-system-for-write 'binary) | 352 | (coding-system-for-write 'binary) |
| 353 | (port nil) | ||
| 354 | (ports | 353 | (ports |
| 355 | (cond | 354 | (cond |
| 356 | ((memq nnimap-stream '(network plain starttls)) | 355 | ((memq nnimap-stream '(network plain starttls)) |
| @@ -395,7 +394,7 @@ textual parts.") | |||
| 395 | (if (not stream) | 394 | (if (not stream) |
| 396 | (progn | 395 | (progn |
| 397 | (nnheader-report 'nnimap "Unable to contact %s:%s via %s" | 396 | (nnheader-report 'nnimap "Unable to contact %s:%s via %s" |
| 398 | nnimap-address port nnimap-stream) | 397 | nnimap-address (car ports) nnimap-stream) |
| 399 | 'no-connect) | 398 | 'no-connect) |
| 400 | (gnus-set-process-query-on-exit-flag stream nil) | 399 | (gnus-set-process-query-on-exit-flag stream nil) |
| 401 | (if (not (gnus-string-match-p "[*.] \\(OK\\|PREAUTH\\)" greeting)) | 400 | (if (not (gnus-string-match-p "[*.] \\(OK\\|PREAUTH\\)" greeting)) |
diff --git a/lisp/help.el b/lisp/help.el index 710dc34ea89..3ed6f79275a 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -132,7 +132,7 @@ | |||
| 132 | "What to do to \"exit\" the help buffer. | 132 | "What to do to \"exit\" the help buffer. |
| 133 | This is a list | 133 | This is a list |
| 134 | (WINDOW . t) delete the selected window (and possibly its frame, | 134 | (WINDOW . t) delete the selected window (and possibly its frame, |
| 135 | see `quit-window' and `View-quit'), go to WINDOW. | 135 | see `quit-window'), go to WINDOW. |
| 136 | (WINDOW . quit-window) do quit-window, then select WINDOW. | 136 | (WINDOW . quit-window) do quit-window, then select WINDOW. |
| 137 | (WINDOW BUF START POINT) display BUF at START, POINT, then select WINDOW.") | 137 | (WINDOW BUF START POINT) display BUF at START, POINT, then select WINDOW.") |
| 138 | 138 | ||
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 252fb112a5d..ac07f07a76b 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -4482,7 +4482,7 @@ With prefix argument N moves forward N messages with these labels. | |||
| 4482 | 4482 | ||
| 4483 | ;;;*** | 4483 | ;;;*** |
| 4484 | 4484 | ||
| 4485 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "a7d3e7205efa4e20ca9038c9b260ce83") | 4485 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "2c8675d7c069c68bc36a4003b15448d1") |
| 4486 | ;;; Generated autoloads from rmailmm.el | 4486 | ;;; Generated autoloads from rmailmm.el |
| 4487 | 4487 | ||
| 4488 | (autoload 'rmail-mime "rmailmm" "\ | 4488 | (autoload 'rmail-mime "rmailmm" "\ |
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 597068562b5..d3351255583 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el | |||
| @@ -426,7 +426,7 @@ The value is a vector [ INDEX HEADER TAGLINE BODY END], where | |||
| 426 | "Insert a tag line for MIME-entity ENTITY. | 426 | "Insert a tag line for MIME-entity ENTITY. |
| 427 | ITEM-LIST is a list of strings or button-elements (list) to be added | 427 | ITEM-LIST is a list of strings or button-elements (list) to be added |
| 428 | to the tag line." | 428 | to the tag line." |
| 429 | (insert "[") | 429 | (insert "\n[") |
| 430 | (let ((tag (aref (rmail-mime-entity-tagline entity) 0))) | 430 | (let ((tag (aref (rmail-mime-entity-tagline entity) 0))) |
| 431 | (if (> (length tag) 0) (insert (substring tag 1) ":"))) | 431 | (if (> (length tag) 0) (insert (substring tag 1) ":"))) |
| 432 | (insert (car (rmail-mime-entity-type entity)) " ") | 432 | (insert (car (rmail-mime-entity-type entity)) " ") |
| @@ -439,7 +439,7 @@ to the tag line." | |||
| 439 | (if (stringp item) | 439 | (if (stringp item) |
| 440 | (insert item) | 440 | (insert item) |
| 441 | (apply 'insert-button item)))) | 441 | (apply 'insert-button item)))) |
| 442 | (insert "]\n")) | 442 | (insert "]\n\n")) |
| 443 | 443 | ||
| 444 | (defun rmail-mime-update-tagline (entity) | 444 | (defun rmail-mime-update-tagline (entity) |
| 445 | "Update the current tag line for MIME-entity ENTITY." | 445 | "Update the current tag line for MIME-entity ENTITY." |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 158435de86b..cb02a4b374d 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -156,51 +156,6 @@ This is used by the default mail-sending commands. See also | |||
| 156 | :version "24.1" | 156 | :version "24.1" |
| 157 | :group 'sendmail) | 157 | :group 'sendmail) |
| 158 | 158 | ||
| 159 | (defvar sendmail-query-once-function 'query | ||
| 160 | "Either a function to send email, or the symbol `query'.") | ||
| 161 | |||
| 162 | ;;;###autoload | ||
| 163 | (defun sendmail-query-once () | ||
| 164 | "Send an email via `sendmail-query-once-function'. | ||
| 165 | If `sendmail-query-once-function' is `query', ask the user what | ||
| 166 | function to use, and then save that choice." | ||
| 167 | (when (equal sendmail-query-once-function 'query) | ||
| 168 | (let* ((mail-buffer (current-buffer)) | ||
| 169 | (default | ||
| 170 | (cond | ||
| 171 | ((or (and window-system (eq system-type 'darwin)) | ||
| 172 | (eq system-type 'windows-nt)) | ||
| 173 | 'mailclient-send-it) | ||
| 174 | ((and sendmail-program | ||
| 175 | (executable-find sendmail-program)) | ||
| 176 | 'sendmail-send-it))) | ||
| 177 | (function | ||
| 178 | (if (or (not default) | ||
| 179 | ;; We have detected no OS-level mail senders, or we | ||
| 180 | ;; have already configured smtpmail, so we use the | ||
| 181 | ;; internal SMTP service. | ||
| 182 | (and (boundp 'smtpmail-smtp-server) | ||
| 183 | smtpmail-smtp-server)) | ||
| 184 | 'smtpmail-send-it | ||
| 185 | ;; Query the user. | ||
| 186 | (unwind-protect | ||
| 187 | (progn | ||
| 188 | (pop-to-buffer "*Mail Help*") | ||
| 189 | (erase-buffer) | ||
| 190 | (insert "Sending mail from Emacs hasn't been set up yet.\n\n" | ||
| 191 | "Type `y' to configure outgoing SMTP, or `n' to use\n" | ||
| 192 | "the default mail sender on your system.\n\n" | ||
| 193 | "To change this again at a later date, customize the\n" | ||
| 194 | "`send-mail-function' variable.\n") | ||
| 195 | (goto-char (point-min)) | ||
| 196 | (if (y-or-n-p "Configure outgoing SMTP in Emacs? ") | ||
| 197 | 'smtpmail-send-it | ||
| 198 | default)) | ||
| 199 | (kill-buffer (current-buffer)) | ||
| 200 | (set-buffer mail-buffer))))) | ||
| 201 | (customize-save-variable 'sendmail-query-once-function function))) | ||
| 202 | (funcall sendmail-query-once-function)) | ||
| 203 | |||
| 204 | ;;;###autoload | 159 | ;;;###autoload |
| 205 | (defcustom mail-header-separator (purecopy "--text follows this line--") | 160 | (defcustom mail-header-separator (purecopy "--text follows this line--") |
| 206 | "Line used to separate headers from text in messages being composed." | 161 | "Line used to separate headers from text in messages being composed." |
| @@ -543,6 +498,51 @@ by Emacs.)") | |||
| 543 | "Additional expressions to highlight in Mail mode.") | 498 | "Additional expressions to highlight in Mail mode.") |
| 544 | 499 | ||
| 545 | 500 | ||
| 501 | ;;;###autoload | ||
| 502 | (defun sendmail-query-once () | ||
| 503 | "Query for `send-mail-function' and send mail with it. | ||
| 504 | This also saves the value of `send-mail-function' via Customize." | ||
| 505 | (let* ((mail-buffer (current-buffer)) | ||
| 506 | ;; Compute default mail sender, preferring smtpmail if it's | ||
| 507 | ;; already configured. | ||
| 508 | (default (cond | ||
| 509 | ((and (boundp 'smtpmail-smtp-server) | ||
| 510 | smtpmail-smtp-server) | ||
| 511 | 'smtpmail-send-it) | ||
| 512 | ((or (and window-system (eq system-type 'darwin)) | ||
| 513 | (eq system-type 'windows-nt)) | ||
| 514 | 'mailclient-send-it) | ||
| 515 | ((and sendmail-program | ||
| 516 | (executable-find sendmail-program)) | ||
| 517 | 'sendmail-send-it))) | ||
| 518 | (send-function (if (eq default 'smtpmail-send-it) | ||
| 519 | 'smtpmail-send-it))) | ||
| 520 | (unless send-function | ||
| 521 | ;; Query the user. | ||
| 522 | (with-temp-buffer | ||
| 523 | (rename-buffer "*Mail Help*" t) | ||
| 524 | (erase-buffer) | ||
| 525 | (insert "Emacs has not been set up for sending mail.\n | ||
| 526 | Type `y' to configure and use Emacs as a mail client, | ||
| 527 | or `n' to use your system's default mailer.\n | ||
| 528 | To change your decision later, customize `send-mail-function'.\n") | ||
| 529 | (goto-char (point-min)) | ||
| 530 | (display-buffer (current-buffer)) | ||
| 531 | (if (y-or-n-p "Set up Emacs for sending SMTP mail? ") | ||
| 532 | ;; FIXME: We should check and correct the From: field too. | ||
| 533 | (setq send-function 'smtpmail-send-it) | ||
| 534 | (setq send-function default)))) | ||
| 535 | (when send-function | ||
| 536 | (customize-save-variable 'send-mail-function send-function) | ||
| 537 | ;; HACK: Message mode stupidly has `message-send-mail-function', | ||
| 538 | ;; so we must update it too or sending again in the current | ||
| 539 | ;; Emacs session will still call `sendmail-query-once'. | ||
| 540 | (and (boundp 'message-send-mail-function) | ||
| 541 | (eq message-send-mail-function 'sendmail-query-once) | ||
| 542 | (customize-set-variable 'message-send-mail-function | ||
| 543 | send-function)) | ||
| 544 | (funcall send-function)))) | ||
| 545 | |||
| 546 | (defun sendmail-sync-aliases () | 546 | (defun sendmail-sync-aliases () |
| 547 | (when mail-personal-alias-file | 547 | (when mail-personal-alias-file |
| 548 | (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) | 548 | (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 69c49c471c0..544570a1bc3 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -490,7 +490,7 @@ The list is in preference order.") | |||
| 490 | (let* ((mechs (cdr-safe (assoc 'auth supported-extensions))) | 490 | (let* ((mechs (cdr-safe (assoc 'auth supported-extensions))) |
| 491 | (mech (car (smtpmail-intersection mechs smtpmail-auth-supported))) | 491 | (mech (car (smtpmail-intersection mechs smtpmail-auth-supported))) |
| 492 | (auth-source-creation-prompts | 492 | (auth-source-creation-prompts |
| 493 | '((user . "SMTP user at %h: ") | 493 | '((user . "SMTP user name for %h: ") |
| 494 | (secret . "SMTP password for %u@%h: "))) | 494 | (secret . "SMTP password for %u@%h: "))) |
| 495 | (auth-info (car | 495 | (auth-info (car |
| 496 | (auth-source-search | 496 | (auth-source-search |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 71b3fe0c4a1..06bbfb0b78c 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -1556,18 +1556,16 @@ record activity." | |||
| 1556 | 1556 | ||
| 1557 | ;; keep window on bottom line if it was already there | 1557 | ;; keep window on bottom line if it was already there |
| 1558 | (when rcirc-scroll-show-maximum-output | 1558 | (when rcirc-scroll-show-maximum-output |
| 1559 | (walk-windows (lambda (w) | 1559 | (let ((window (get-buffer-window))) |
| 1560 | (when (eq (window-buffer w) (current-buffer)) | 1560 | (when window |
| 1561 | (with-current-buffer (window-buffer w) | 1561 | (with-selected-window window |
| 1562 | (when (eq major-mode 'rcirc-mode) | 1562 | (when (eq major-mode 'rcirc-mode) |
| 1563 | (with-selected-window w | 1563 | (when (<= (- (window-height) |
| 1564 | (when (<= (- (window-height) | 1564 | (count-screen-lines (window-point) |
| 1565 | (count-screen-lines (window-point) | 1565 | (window-start)) |
| 1566 | (window-start)) | 1566 | 1) |
| 1567 | 1) | 1567 | 0) |
| 1568 | 0) | 1568 | (recenter -1))))))) |
| 1569 | (recenter -1))))))) | ||
| 1570 | nil t)) | ||
| 1571 | 1569 | ||
| 1572 | ;; flush undo (can we do something smarter here?) | 1570 | ;; flush undo (can we do something smarter here?) |
| 1573 | (buffer-disable-undo) | 1571 | (buffer-disable-undo) |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 428bd6422d8..1fa358e9277 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | 28 | ||
| 29 | (eval-when-compile (require 'cl)) ; ignore-errors | 29 | (eval-when-compile (require 'cl)) ; ignore-errors |
| 30 | (require 'tramp) | 30 | (require 'tramp) |
| 31 | (require 'shell) | ||
| 32 | 31 | ||
| 33 | ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm | 32 | ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm |
| 34 | ;; not sure at all that this is the right way to do it, but let's hope | 33 | ;; not sure at all that this is the right way to do it, but let's hope |
| @@ -91,7 +90,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 91 | '("rcp" | 90 | '("rcp" |
| 92 | (tramp-login-program "rsh") | 91 | (tramp-login-program "rsh") |
| 93 | (tramp-login-args (("%h") ("-l" "%u"))) | 92 | (tramp-login-args (("%h") ("-l" "%u"))) |
| 94 | (tramp-remote-sh "/bin/sh") | 93 | (tramp-remote-shell "/bin/sh") |
| 94 | (tramp-remote-shell-args ("-c")) | ||
| 95 | (tramp-copy-program "rcp") | 95 | (tramp-copy-program "rcp") |
| 96 | (tramp-copy-args (("-p" "%k") ("-r"))) | 96 | (tramp-copy-args (("-p" "%k") ("-r"))) |
| 97 | (tramp-copy-keep-date t) | 97 | (tramp-copy-keep-date t) |
| @@ -101,7 +101,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 101 | '("remcp" | 101 | '("remcp" |
| 102 | (tramp-login-program "remsh") | 102 | (tramp-login-program "remsh") |
| 103 | (tramp-login-args (("%h") ("-l" "%u"))) | 103 | (tramp-login-args (("%h") ("-l" "%u"))) |
| 104 | (tramp-remote-sh "/bin/sh") | 104 | (tramp-remote-shell "/bin/sh") |
| 105 | (tramp-remote-shell-args ("-c")) | ||
| 105 | (tramp-copy-program "rcp") | 106 | (tramp-copy-program "rcp") |
| 106 | (tramp-copy-args (("-p" "%k"))) | 107 | (tramp-copy-args (("-p" "%k"))) |
| 107 | (tramp-copy-keep-date t))) | 108 | (tramp-copy-keep-date t))) |
| @@ -111,7 +112,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 111 | (tramp-login-program "ssh") | 112 | (tramp-login-program "ssh") |
| 112 | (tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h"))) | 113 | (tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h"))) |
| 113 | (tramp-async-args (("-q"))) | 114 | (tramp-async-args (("-q"))) |
| 114 | (tramp-remote-sh "/bin/sh") | 115 | (tramp-remote-shell "/bin/sh") |
| 116 | (tramp-remote-shell-args ("-c")) | ||
| 115 | (tramp-copy-program "scp") | 117 | (tramp-copy-program "scp") |
| 116 | (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r"))) | 118 | (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r"))) |
| 117 | (tramp-copy-keep-date t) | 119 | (tramp-copy-keep-date t) |
| @@ -127,7 +129,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 127 | (tramp-login-args (("-l" "%u") ("-p" "%p") | 129 | (tramp-login-args (("-l" "%u") ("-p" "%p") |
| 128 | ("-1") ("-e" "none") ("%h"))) | 130 | ("-1") ("-e" "none") ("%h"))) |
| 129 | (tramp-async-args (("-q"))) | 131 | (tramp-async-args (("-q"))) |
| 130 | (tramp-remote-sh "/bin/sh") | 132 | (tramp-remote-shell "/bin/sh") |
| 133 | (tramp-remote-shell-args ("-c")) | ||
| 131 | (tramp-copy-program "scp") | 134 | (tramp-copy-program "scp") |
| 132 | (tramp-copy-args (("-1") ("-P" "%p") ("-p" "%k") ("-q") ("-r"))) | 135 | (tramp-copy-args (("-1") ("-P" "%p") ("-p" "%k") ("-q") ("-r"))) |
| 133 | (tramp-copy-keep-date t) | 136 | (tramp-copy-keep-date t) |
| @@ -143,7 +146,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 143 | (tramp-login-args (("-l" "%u") ("-p" "%p") | 146 | (tramp-login-args (("-l" "%u") ("-p" "%p") |
| 144 | ("-2") ("-e" "none") ("%h"))) | 147 | ("-2") ("-e" "none") ("%h"))) |
| 145 | (tramp-async-args (("-q"))) | 148 | (tramp-async-args (("-q"))) |
| 146 | (tramp-remote-sh "/bin/sh") | 149 | (tramp-remote-shell "/bin/sh") |
| 150 | (tramp-remote-shell-args ("-c")) | ||
| 147 | (tramp-copy-program "scp") | 151 | (tramp-copy-program "scp") |
| 148 | (tramp-copy-args (("-2") ("-P" "%p") ("-p" "%k") ("-q") ("-r"))) | 152 | (tramp-copy-args (("-2") ("-P" "%p") ("-p" "%k") ("-q") ("-r"))) |
| 149 | (tramp-copy-keep-date t) | 153 | (tramp-copy-keep-date t) |
| @@ -161,7 +165,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 161 | ("-o" "ControlMaster=yes") | 165 | ("-o" "ControlMaster=yes") |
| 162 | ("-e" "none") ("%h"))) | 166 | ("-e" "none") ("%h"))) |
| 163 | (tramp-async-args (("-q"))) | 167 | (tramp-async-args (("-q"))) |
| 164 | (tramp-remote-sh "/bin/sh") | 168 | (tramp-remote-shell "/bin/sh") |
| 169 | (tramp-remote-shell-args ("-c")) | ||
| 165 | (tramp-copy-program "scp") | 170 | (tramp-copy-program "scp") |
| 166 | (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r") | 171 | (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r") |
| 167 | ("-o" "ControlPath=%t.%%r@%%h:%%p") | 172 | ("-o" "ControlPath=%t.%%r@%%h:%%p") |
| @@ -180,7 +185,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 180 | ("-e" "none") ("-t" "-t") | 185 | ("-e" "none") ("-t" "-t") |
| 181 | ("%h") ("/bin/sh"))) | 186 | ("%h") ("/bin/sh"))) |
| 182 | (tramp-async-args (("-q"))) | 187 | (tramp-async-args (("-q"))) |
| 183 | (tramp-remote-sh "/bin/sh") | 188 | (tramp-remote-shell "/bin/sh") |
| 189 | (tramp-remote-shell-args ("-c")) | ||
| 184 | (tramp-copy-program "scp") | 190 | (tramp-copy-program "scp") |
| 185 | (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r"))) | 191 | (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r"))) |
| 186 | (tramp-copy-keep-date t) | 192 | (tramp-copy-keep-date t) |
| @@ -195,7 +201,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 195 | (tramp-login-program "ssh") | 201 | (tramp-login-program "ssh") |
| 196 | (tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h"))) | 202 | (tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h"))) |
| 197 | (tramp-async-args (("-q"))) | 203 | (tramp-async-args (("-q"))) |
| 198 | (tramp-remote-sh "/bin/sh") | 204 | (tramp-remote-shell "/bin/sh") |
| 205 | (tramp-remote-shell-args ("-c")) | ||
| 199 | (tramp-copy-program "sftp"))) | 206 | (tramp-copy-program "sftp"))) |
| 200 | ;;;###tramp-autoload | 207 | ;;;###tramp-autoload |
| 201 | (add-to-list 'tramp-methods | 208 | (add-to-list 'tramp-methods |
| @@ -203,7 +210,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 203 | (tramp-login-program "ssh") | 210 | (tramp-login-program "ssh") |
| 204 | (tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h"))) | 211 | (tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h"))) |
| 205 | (tramp-async-args (("-q"))) | 212 | (tramp-async-args (("-q"))) |
| 206 | (tramp-remote-sh "/bin/sh") | 213 | (tramp-remote-shell "/bin/sh") |
| 214 | (tramp-remote-shell-args ("-c")) | ||
| 207 | (tramp-copy-program "rsync") | 215 | (tramp-copy-program "rsync") |
| 208 | (tramp-copy-args (("-e" "ssh") ("-t" "%k") ("-r"))) | 216 | (tramp-copy-args (("-e" "ssh") ("-t" "%k") ("-r"))) |
| 209 | (tramp-copy-keep-date t) | 217 | (tramp-copy-keep-date t) |
| @@ -218,7 +226,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 218 | ("-o" "ControlMaster=yes") | 226 | ("-o" "ControlMaster=yes") |
| 219 | ("-e" "none") ("%h"))) | 227 | ("-e" "none") ("%h"))) |
| 220 | (tramp-async-args (("-q"))) | 228 | (tramp-async-args (("-q"))) |
| 221 | (tramp-remote-sh "/bin/sh") | 229 | (tramp-remote-shell "/bin/sh") |
| 230 | (tramp-remote-shell-args ("-c")) | ||
| 222 | (tramp-copy-program "rsync") | 231 | (tramp-copy-program "rsync") |
| 223 | (tramp-copy-args (("-t" "%k") ("-r"))) | 232 | (tramp-copy-args (("-t" "%k") ("-r"))) |
| 224 | (tramp-copy-env (("RSYNC_RSH") | 233 | (tramp-copy-env (("RSYNC_RSH") |
| @@ -234,20 +243,23 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 234 | '("rsh" | 243 | '("rsh" |
| 235 | (tramp-login-program "rsh") | 244 | (tramp-login-program "rsh") |
| 236 | (tramp-login-args (("%h") ("-l" "%u"))) | 245 | (tramp-login-args (("%h") ("-l" "%u"))) |
| 237 | (tramp-remote-sh "/bin/sh"))) | 246 | (tramp-remote-shell "/bin/sh") |
| 247 | (tramp-remote-shell-args ("-c")))) | ||
| 238 | ;;;###tramp-autoload | 248 | ;;;###tramp-autoload |
| 239 | (add-to-list 'tramp-methods | 249 | (add-to-list 'tramp-methods |
| 240 | '("remsh" | 250 | '("remsh" |
| 241 | (tramp-login-program "remsh") | 251 | (tramp-login-program "remsh") |
| 242 | (tramp-login-args (("%h") ("-l" "%u"))) | 252 | (tramp-login-args (("%h") ("-l" "%u"))) |
| 243 | (tramp-remote-sh "/bin/sh"))) | 253 | (tramp-remote-shell "/bin/sh") |
| 254 | (tramp-remote-shell-args ("-c")))) | ||
| 244 | ;;;###tramp-autoload | 255 | ;;;###tramp-autoload |
| 245 | (add-to-list 'tramp-methods | 256 | (add-to-list 'tramp-methods |
| 246 | '("ssh" | 257 | '("ssh" |
| 247 | (tramp-login-program "ssh") | 258 | (tramp-login-program "ssh") |
| 248 | (tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h"))) | 259 | (tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h"))) |
| 249 | (tramp-async-args (("-q"))) | 260 | (tramp-async-args (("-q"))) |
| 250 | (tramp-remote-sh "/bin/sh") | 261 | (tramp-remote-shell "/bin/sh") |
| 262 | (tramp-remote-shell-args ("-c")) | ||
| 251 | (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") | 263 | (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") |
| 252 | ("-o" "UserKnownHostsFile=/dev/null") | 264 | ("-o" "UserKnownHostsFile=/dev/null") |
| 253 | ("-o" "StrictHostKeyChecking=no"))) | 265 | ("-o" "StrictHostKeyChecking=no"))) |
| @@ -259,7 +271,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 259 | (tramp-login-args (("-l" "%u") ("-p" "%p") | 271 | (tramp-login-args (("-l" "%u") ("-p" "%p") |
| 260 | ("-1") ("-e" "none") ("%h"))) | 272 | ("-1") ("-e" "none") ("%h"))) |
| 261 | (tramp-async-args (("-q"))) | 273 | (tramp-async-args (("-q"))) |
| 262 | (tramp-remote-sh "/bin/sh") | 274 | (tramp-remote-shell "/bin/sh") |
| 275 | (tramp-remote-shell-args ("-c")) | ||
| 263 | (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") | 276 | (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") |
| 264 | ("-o" "UserKnownHostsFile=/dev/null") | 277 | ("-o" "UserKnownHostsFile=/dev/null") |
| 265 | ("-o" "StrictHostKeyChecking=no"))) | 278 | ("-o" "StrictHostKeyChecking=no"))) |
| @@ -271,7 +284,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 271 | (tramp-login-args (("-l" "%u") ("-p" "%p") | 284 | (tramp-login-args (("-l" "%u") ("-p" "%p") |
| 272 | ("-2") ("-e" "none") ("%h"))) | 285 | ("-2") ("-e" "none") ("%h"))) |
| 273 | (tramp-async-args (("-q"))) | 286 | (tramp-async-args (("-q"))) |
| 274 | (tramp-remote-sh "/bin/sh") | 287 | (tramp-remote-shell "/bin/sh") |
| 288 | (tramp-remote-shell-args ("-c")) | ||
| 275 | (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") | 289 | (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") |
| 276 | ("-o" "UserKnownHostsFile=/dev/null") | 290 | ("-o" "UserKnownHostsFile=/dev/null") |
| 277 | ("-o" "StrictHostKeyChecking=no"))) | 291 | ("-o" "StrictHostKeyChecking=no"))) |
| @@ -284,7 +298,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 284 | ("-e" "none") ("-t" "-t") | 298 | ("-e" "none") ("-t" "-t") |
| 285 | ("%h") ("/bin/sh"))) | 299 | ("%h") ("/bin/sh"))) |
| 286 | (tramp-async-args (("-q"))) | 300 | (tramp-async-args (("-q"))) |
| 287 | (tramp-remote-sh "/bin/sh") | 301 | (tramp-remote-shell "/bin/sh") |
| 302 | (tramp-remote-shell-args ("-c")) | ||
| 288 | (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") | 303 | (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") |
| 289 | ("-o" "UserKnownHostsFile=/dev/null") | 304 | ("-o" "UserKnownHostsFile=/dev/null") |
| 290 | ("-o" "StrictHostKeyChecking=no"))) | 305 | ("-o" "StrictHostKeyChecking=no"))) |
| @@ -294,38 +309,44 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 294 | '("telnet" | 309 | '("telnet" |
| 295 | (tramp-login-program "telnet") | 310 | (tramp-login-program "telnet") |
| 296 | (tramp-login-args (("%h") ("%p"))) | 311 | (tramp-login-args (("%h") ("%p"))) |
| 297 | (tramp-remote-sh "/bin/sh") | 312 | (tramp-remote-shell "/bin/sh") |
| 313 | (tramp-remote-shell-args ("-c")) | ||
| 298 | (tramp-default-port 23))) | 314 | (tramp-default-port 23))) |
| 299 | ;;;###tramp-autoload | 315 | ;;;###tramp-autoload |
| 300 | (add-to-list 'tramp-methods | 316 | (add-to-list 'tramp-methods |
| 301 | '("su" | 317 | '("su" |
| 302 | (tramp-login-program "su") | 318 | (tramp-login-program "su") |
| 303 | (tramp-login-args (("-") ("%u"))) | 319 | (tramp-login-args (("-") ("%u"))) |
| 304 | (tramp-remote-sh "/bin/sh"))) | 320 | (tramp-remote-shell "/bin/sh") |
| 321 | (tramp-remote-shell-args ("-c")))) | ||
| 305 | ;;;###tramp-autoload | 322 | ;;;###tramp-autoload |
| 306 | (add-to-list 'tramp-methods | 323 | (add-to-list 'tramp-methods |
| 307 | '("sudo" | 324 | '("sudo" |
| 308 | (tramp-login-program "sudo") | 325 | (tramp-login-program "sudo") |
| 309 | (tramp-login-args (("-u" "%u") ("-s") ("-H") ("-p" "Password:"))) | 326 | (tramp-login-args (("-u" "%u") ("-s") ("-H") ("-p" "Password:"))) |
| 310 | (tramp-remote-sh "/bin/sh"))) | 327 | (tramp-remote-shell "/bin/sh") |
| 328 | (tramp-remote-shell-args ("-c")))) | ||
| 311 | ;;;###tramp-autoload | 329 | ;;;###tramp-autoload |
| 312 | (add-to-list 'tramp-methods | 330 | (add-to-list 'tramp-methods |
| 313 | '("ksu" | 331 | '("ksu" |
| 314 | (tramp-login-program "ksu") | 332 | (tramp-login-program "ksu") |
| 315 | (tramp-login-args (("%u") ("-q"))) | 333 | (tramp-login-args (("%u") ("-q"))) |
| 316 | (tramp-remote-sh "/bin/sh"))) | 334 | (tramp-remote-shell "/bin/sh") |
| 335 | (tramp-remote-shell-args ("-c")))) | ||
| 317 | ;;;###tramp-autoload | 336 | ;;;###tramp-autoload |
| 318 | (add-to-list 'tramp-methods | 337 | (add-to-list 'tramp-methods |
| 319 | '("krlogin" | 338 | '("krlogin" |
| 320 | (tramp-login-program "krlogin") | 339 | (tramp-login-program "krlogin") |
| 321 | (tramp-login-args (("%h") ("-l" "%u") ("-x"))) | 340 | (tramp-login-args (("%h") ("-l" "%u") ("-x"))) |
| 322 | (tramp-remote-sh "/bin/sh"))) | 341 | (tramp-remote-shell "/bin/sh") |
| 342 | (tramp-remote-shell-args ("-c")))) | ||
| 323 | ;;;###tramp-autoload | 343 | ;;;###tramp-autoload |
| 324 | (add-to-list 'tramp-methods | 344 | (add-to-list 'tramp-methods |
| 325 | '("plink" | 345 | '("plink" |
| 326 | (tramp-login-program "plink") | 346 | (tramp-login-program "plink") |
| 327 | (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) | 347 | (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) |
| 328 | (tramp-remote-sh "/bin/sh") | 348 | (tramp-remote-shell "/bin/sh") |
| 349 | (tramp-remote-shell-args ("-c")) | ||
| 329 | (tramp-password-end-of-line "xy") ;see docstring for "xy" | 350 | (tramp-password-end-of-line "xy") ;see docstring for "xy" |
| 330 | (tramp-default-port 22))) | 351 | (tramp-default-port 22))) |
| 331 | ;;;###tramp-autoload | 352 | ;;;###tramp-autoload |
| @@ -333,7 +354,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 333 | '("plink1" | 354 | '("plink1" |
| 334 | (tramp-login-program "plink") | 355 | (tramp-login-program "plink") |
| 335 | (tramp-login-args (("-l" "%u") ("-P" "%p") ("-1" "-ssh") ("%h"))) | 356 | (tramp-login-args (("-l" "%u") ("-P" "%p") ("-1" "-ssh") ("%h"))) |
| 336 | (tramp-remote-sh "/bin/sh") | 357 | (tramp-remote-shell "/bin/sh") |
| 358 | (tramp-remote-shell-args ("-c")) | ||
| 337 | (tramp-password-end-of-line "xy") ;see docstring for "xy" | 359 | (tramp-password-end-of-line "xy") ;see docstring for "xy" |
| 338 | (tramp-default-port 22))) | 360 | (tramp-default-port 22))) |
| 339 | ;;;###tramp-autoload | 361 | ;;;###tramp-autoload |
| @@ -348,13 +370,15 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 348 | tramp-terminal-type | 370 | tramp-terminal-type |
| 349 | tramp-initial-end-of-output)) | 371 | tramp-initial-end-of-output)) |
| 350 | ("/bin/sh"))) | 372 | ("/bin/sh"))) |
| 351 | (tramp-remote-sh "/bin/sh"))) | 373 | (tramp-remote-shell "/bin/sh") |
| 374 | (tramp-remote-shell-args ("-c")))) | ||
| 352 | ;;;###tramp-autoload | 375 | ;;;###tramp-autoload |
| 353 | (add-to-list 'tramp-methods | 376 | (add-to-list 'tramp-methods |
| 354 | '("pscp" | 377 | '("pscp" |
| 355 | (tramp-login-program "plink") | 378 | (tramp-login-program "plink") |
| 356 | (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) | 379 | (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) |
| 357 | (tramp-remote-sh "/bin/sh") | 380 | (tramp-remote-shell "/bin/sh") |
| 381 | (tramp-remote-shell-args ("-c")) | ||
| 358 | (tramp-copy-program "pscp") | 382 | (tramp-copy-program "pscp") |
| 359 | (tramp-copy-args (("-P" "%p") ("-scp") ("-p" "%k") | 383 | (tramp-copy-args (("-P" "%p") ("-scp") ("-p" "%k") |
| 360 | ("-q") ("-r"))) | 384 | ("-q") ("-r"))) |
| @@ -367,7 +391,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 367 | '("psftp" | 391 | '("psftp" |
| 368 | (tramp-login-program "plink") | 392 | (tramp-login-program "plink") |
| 369 | (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) | 393 | (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) |
| 370 | (tramp-remote-sh "/bin/sh") | 394 | (tramp-remote-shell "/bin/sh") |
| 395 | (tramp-remote-shell-args ("-c")) | ||
| 371 | (tramp-copy-program "pscp") | 396 | (tramp-copy-program "pscp") |
| 372 | (tramp-copy-args (("-P" "%p") ("-sftp") ("-p" "%k") | 397 | (tramp-copy-args (("-P" "%p") ("-sftp") ("-p" "%k") |
| 373 | ("-q") ("-r"))) | 398 | ("-q") ("-r"))) |
| @@ -379,7 +404,8 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 379 | '("fcp" | 404 | '("fcp" |
| 380 | (tramp-login-program "fsh") | 405 | (tramp-login-program "fsh") |
| 381 | (tramp-login-args (("%h") ("-l" "%u") ("sh" "-i"))) | 406 | (tramp-login-args (("%h") ("-l" "%u") ("sh" "-i"))) |
| 382 | (tramp-remote-sh "/bin/sh -i") | 407 | (tramp-remote-shell "/bin/sh") |
| 408 | (tramp-remote-shell-args ("-i") ("-c")) | ||
| 383 | (tramp-copy-program "fcp") | 409 | (tramp-copy-program "fcp") |
| 384 | (tramp-copy-args (("-p" "%k"))) | 410 | (tramp-copy-args (("-p" "%k"))) |
| 385 | (tramp-copy-keep-date t))) | 411 | (tramp-copy-keep-date t))) |
| @@ -942,7 +968,7 @@ This is used to map a mode number to a permission string.") | |||
| 942 | (executable-find . tramp-sh-handle-executable-find) | 968 | (executable-find . tramp-sh-handle-executable-find) |
| 943 | (start-file-process . tramp-sh-handle-start-file-process) | 969 | (start-file-process . tramp-sh-handle-start-file-process) |
| 944 | (process-file . tramp-sh-handle-process-file) | 970 | (process-file . tramp-sh-handle-process-file) |
| 945 | (shell-command . tramp-sh-handle-shell-command) | 971 | (shell-command . tramp-handle-shell-command) |
| 946 | (insert-directory . tramp-sh-handle-insert-directory) | 972 | (insert-directory . tramp-sh-handle-insert-directory) |
| 947 | (expand-file-name . tramp-sh-handle-expand-file-name) | 973 | (expand-file-name . tramp-sh-handle-expand-file-name) |
| 948 | (substitute-in-file-name . tramp-handle-substitute-in-file-name) | 974 | (substitute-in-file-name . tramp-handle-substitute-in-file-name) |
| @@ -2853,7 +2879,7 @@ the result will be a local, non-Tramp, filename." | |||
| 2853 | ;; `process-file-side-effects' has been introduced with GNU | 2879 | ;; `process-file-side-effects' has been introduced with GNU |
| 2854 | ;; Emacs 23.2. If set to `nil', no remote file will be changed | 2880 | ;; Emacs 23.2. If set to `nil', no remote file will be changed |
| 2855 | ;; by `program'. If it doesn't exist, we assume its default | 2881 | ;; by `program'. If it doesn't exist, we assume its default |
| 2856 | ;; value 't'. | 2882 | ;; value `t'. |
| 2857 | (unless (and (boundp 'process-file-side-effects) | 2883 | (unless (and (boundp 'process-file-side-effects) |
| 2858 | (not (symbol-value 'process-file-side-effects))) | 2884 | (not (symbol-value 'process-file-side-effects))) |
| 2859 | (tramp-flush-directory-property v "")) | 2885 | (tramp-flush-directory-property v "")) |
| @@ -2873,87 +2899,6 @@ the result will be a local, non-Tramp, filename." | |||
| 2873 | (apply 'call-process program tmpfile buffer display args) | 2899 | (apply 'call-process program tmpfile buffer display args) |
| 2874 | (delete-file tmpfile)))) | 2900 | (delete-file tmpfile)))) |
| 2875 | 2901 | ||
| 2876 | (defun tramp-sh-handle-shell-command | ||
| 2877 | (command &optional output-buffer error-buffer) | ||
| 2878 | "Like `shell-command' for Tramp files." | ||
| 2879 | (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) | ||
| 2880 | ;; We cannot use `shell-file-name' and `shell-command-switch', | ||
| 2881 | ;; they are variables of the local host. | ||
| 2882 | (args (list | ||
| 2883 | (tramp-get-method-parameter | ||
| 2884 | (tramp-file-name-method | ||
| 2885 | (tramp-dissect-file-name default-directory)) | ||
| 2886 | 'tramp-remote-sh) | ||
| 2887 | "-c" (substring command 0 asynchronous))) | ||
| 2888 | current-buffer-p | ||
| 2889 | (output-buffer | ||
| 2890 | (cond | ||
| 2891 | ((bufferp output-buffer) output-buffer) | ||
| 2892 | ((stringp output-buffer) (get-buffer-create output-buffer)) | ||
| 2893 | (output-buffer | ||
| 2894 | (setq current-buffer-p t) | ||
| 2895 | (current-buffer)) | ||
| 2896 | (t (get-buffer-create | ||
| 2897 | (if asynchronous | ||
| 2898 | "*Async Shell Command*" | ||
| 2899 | "*Shell Command Output*"))))) | ||
| 2900 | (error-buffer | ||
| 2901 | (cond | ||
| 2902 | ((bufferp error-buffer) error-buffer) | ||
| 2903 | ((stringp error-buffer) (get-buffer-create error-buffer)))) | ||
| 2904 | (buffer | ||
| 2905 | (if (and (not asynchronous) error-buffer) | ||
| 2906 | (with-parsed-tramp-file-name default-directory nil | ||
| 2907 | (list output-buffer (tramp-make-tramp-temp-file v))) | ||
| 2908 | output-buffer)) | ||
| 2909 | (p (get-buffer-process output-buffer))) | ||
| 2910 | |||
| 2911 | ;; Check whether there is another process running. Tramp does not | ||
| 2912 | ;; support 2 (asynchronous) processes in parallel. | ||
| 2913 | (when p | ||
| 2914 | (if (yes-or-no-p "A command is running. Kill it? ") | ||
| 2915 | (ignore-errors (kill-process p)) | ||
| 2916 | (error "Shell command in progress"))) | ||
| 2917 | |||
| 2918 | (if current-buffer-p | ||
| 2919 | (progn | ||
| 2920 | (barf-if-buffer-read-only) | ||
| 2921 | (push-mark nil t)) | ||
| 2922 | (with-current-buffer output-buffer | ||
| 2923 | (setq buffer-read-only nil) | ||
| 2924 | (erase-buffer))) | ||
| 2925 | |||
| 2926 | (if (and (not current-buffer-p) (integerp asynchronous)) | ||
| 2927 | (prog1 | ||
| 2928 | ;; Run the process. | ||
| 2929 | (apply 'start-file-process "*Async Shell*" buffer args) | ||
| 2930 | ;; Display output. | ||
| 2931 | (pop-to-buffer output-buffer) | ||
| 2932 | (setq mode-line-process '(":%s")) | ||
| 2933 | (shell-mode)) | ||
| 2934 | |||
| 2935 | (prog1 | ||
| 2936 | ;; Run the process. | ||
| 2937 | (apply 'process-file (car args) nil buffer nil (cdr args)) | ||
| 2938 | ;; Insert error messages if they were separated. | ||
| 2939 | (when (listp buffer) | ||
| 2940 | (with-current-buffer error-buffer | ||
| 2941 | (insert-file-contents (cadr buffer))) | ||
| 2942 | (delete-file (cadr buffer))) | ||
| 2943 | (if current-buffer-p | ||
| 2944 | ;; This is like exchange-point-and-mark, but doesn't | ||
| 2945 | ;; activate the mark. It is cleaner to avoid activation, | ||
| 2946 | ;; even though the command loop would deactivate the mark | ||
| 2947 | ;; because we inserted text. | ||
| 2948 | (goto-char (prog1 (mark t) | ||
| 2949 | (set-marker (mark-marker) (point) | ||
| 2950 | (current-buffer)))) | ||
| 2951 | ;; There's some output, display it. | ||
| 2952 | (when (with-current-buffer output-buffer (> (point-max) (point-min))) | ||
| 2953 | (if (functionp 'display-message-or-buffer) | ||
| 2954 | (tramp-compat-funcall 'display-message-or-buffer output-buffer) | ||
| 2955 | (pop-to-buffer output-buffer)))))))) | ||
| 2956 | |||
| 2957 | (defun tramp-sh-handle-file-local-copy (filename) | 2902 | (defun tramp-sh-handle-file-local-copy (filename) |
| 2958 | "Like `file-local-copy' for Tramp files." | 2903 | "Like `file-local-copy' for Tramp files." |
| 2959 | (with-parsed-tramp-file-name filename nil | 2904 | (with-parsed-tramp-file-name filename nil |
| @@ -3680,7 +3625,7 @@ file exists and nonzero exit status otherwise." | |||
| 3680 | (tramp-set-connection-property | 3625 | (tramp-set-connection-property |
| 3681 | vec "remote-shell" | 3626 | vec "remote-shell" |
| 3682 | (tramp-get-method-parameter | 3627 | (tramp-get-method-parameter |
| 3683 | (tramp-file-name-method vec) 'tramp-remote-sh))))))))) | 3628 | (tramp-file-name-method vec) 'tramp-remote-shell))))))))) |
| 3684 | 3629 | ||
| 3685 | ;; Utility functions. | 3630 | ;; Utility functions. |
| 3686 | 3631 | ||
| @@ -3716,7 +3661,8 @@ process to set up. VEC specifies the connection." | |||
| 3716 | ;; discarded as well. | 3661 | ;; discarded as well. |
| 3717 | (tramp-open-shell | 3662 | (tramp-open-shell |
| 3718 | vec | 3663 | vec |
| 3719 | (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-remote-sh)) | 3664 | (tramp-get-method-parameter |
| 3665 | (tramp-file-name-method vec) 'tramp-remote-shell)) | ||
| 3720 | 3666 | ||
| 3721 | ;; Disable echo. | 3667 | ;; Disable echo. |
| 3722 | (tramp-message vec 5 "Setting up remote shell environment") | 3668 | (tramp-message vec 5 "Setting up remote shell environment") |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 274bc72391b..6475ea42ec8 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -58,6 +58,7 @@ | |||
| 58 | ;;; Code: | 58 | ;;; Code: |
| 59 | 59 | ||
| 60 | (require 'tramp-compat) | 60 | (require 'tramp-compat) |
| 61 | (require 'shell) | ||
| 61 | 62 | ||
| 62 | ;;; User Customizable Internal Variables: | 63 | ;;; User Customizable Internal Variables: |
| 63 | 64 | ||
| @@ -190,13 +191,16 @@ See the variable `tramp-encoding-shell' for more information." | |||
| 190 | This is a list of entries of the form (NAME PARAM1 PARAM2 ...). | 191 | This is a list of entries of the form (NAME PARAM1 PARAM2 ...). |
| 191 | Each NAME stands for a remote access method. Each PARAM is a | 192 | Each NAME stands for a remote access method. Each PARAM is a |
| 192 | pair of the form (KEY VALUE). The following KEYs are defined: | 193 | pair of the form (KEY VALUE). The following KEYs are defined: |
| 193 | * `tramp-remote-sh' | 194 | * `tramp-remote-shell' |
| 194 | This specifies the Bourne shell to use on the remote host. This | 195 | This specifies the Bourne shell to use on the remote host. This |
| 195 | MUST be a Bourne-like shell. It is normally not necessary to set | 196 | MUST be a Bourne-like shell. It is normally not necessary to set |
| 196 | this to any value other than \"/bin/sh\": Tramp wants to use a shell | 197 | this to any value other than \"/bin/sh\": Tramp wants to use a shell |
| 197 | which groks tilde expansion, but it can search for it. Also note | 198 | which groks tilde expansion, but it can search for it. Also note |
| 198 | that \"/bin/sh\" exists on all Unixen, this might not be true for | 199 | that \"/bin/sh\" exists on all Unixen, this might not be true for |
| 199 | the value that you decide to use. You Have Been Warned. | 200 | the value that you decide to use. You Have Been Warned. |
| 201 | * `tramp-remote-shell-args' | ||
| 202 | For implementation of `shell-command', this specifies the | ||
| 203 | argument to let `tramp-remote-shell' run a command. | ||
| 200 | * `tramp-login-program' | 204 | * `tramp-login-program' |
| 201 | This specifies the name of the program to use for logging in to the | 205 | This specifies the name of the program to use for logging in to the |
| 202 | remote host. This may be the name of rsh or a workalike program, | 206 | remote host. This may be the name of rsh or a workalike program, |
| @@ -2959,6 +2963,92 @@ User is always nil." | |||
| 2959 | (delete-file local-copy))))) | 2963 | (delete-file local-copy))))) |
| 2960 | t))) | 2964 | t))) |
| 2961 | 2965 | ||
| 2966 | (defun tramp-handle-shell-command | ||
| 2967 | (command &optional output-buffer error-buffer) | ||
| 2968 | "Like `shell-command' for Tramp files." | ||
| 2969 | (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) | ||
| 2970 | ;; We cannot use `shell-file-name' and `shell-command-switch', | ||
| 2971 | ;; they are variables of the local host. | ||
| 2972 | (args (append | ||
| 2973 | (cons | ||
| 2974 | (tramp-get-method-parameter | ||
| 2975 | (tramp-file-name-method | ||
| 2976 | (tramp-dissect-file-name default-directory)) | ||
| 2977 | 'tramp-remote-shell) | ||
| 2978 | (tramp-get-method-parameter | ||
| 2979 | (tramp-file-name-method | ||
| 2980 | (tramp-dissect-file-name default-directory)) | ||
| 2981 | 'tramp-remote-shell-args)) | ||
| 2982 | (list (substring command 0 asynchronous)))) | ||
| 2983 | current-buffer-p | ||
| 2984 | (output-buffer | ||
| 2985 | (cond | ||
| 2986 | ((bufferp output-buffer) output-buffer) | ||
| 2987 | ((stringp output-buffer) (get-buffer-create output-buffer)) | ||
| 2988 | (output-buffer | ||
| 2989 | (setq current-buffer-p t) | ||
| 2990 | (current-buffer)) | ||
| 2991 | (t (get-buffer-create | ||
| 2992 | (if asynchronous | ||
| 2993 | "*Async Shell Command*" | ||
| 2994 | "*Shell Command Output*"))))) | ||
| 2995 | (error-buffer | ||
| 2996 | (cond | ||
| 2997 | ((bufferp error-buffer) error-buffer) | ||
| 2998 | ((stringp error-buffer) (get-buffer-create error-buffer)))) | ||
| 2999 | (buffer | ||
| 3000 | (if (and (not asynchronous) error-buffer) | ||
| 3001 | (with-parsed-tramp-file-name default-directory nil | ||
| 3002 | (list output-buffer (tramp-make-tramp-temp-file v))) | ||
| 3003 | output-buffer)) | ||
| 3004 | (p (get-buffer-process output-buffer))) | ||
| 3005 | |||
| 3006 | ;; Check whether there is another process running. Tramp does not | ||
| 3007 | ;; support 2 (asynchronous) processes in parallel. | ||
| 3008 | (when p | ||
| 3009 | (if (yes-or-no-p "A command is running. Kill it? ") | ||
| 3010 | (ignore-errors (kill-process p)) | ||
| 3011 | (error "Shell command in progress"))) | ||
| 3012 | |||
| 3013 | (if current-buffer-p | ||
| 3014 | (progn | ||
| 3015 | (barf-if-buffer-read-only) | ||
| 3016 | (push-mark nil t)) | ||
| 3017 | (with-current-buffer output-buffer | ||
| 3018 | (setq buffer-read-only nil) | ||
| 3019 | (erase-buffer))) | ||
| 3020 | |||
| 3021 | (if (and (not current-buffer-p) (integerp asynchronous)) | ||
| 3022 | (prog1 | ||
| 3023 | ;; Run the process. | ||
| 3024 | (apply 'start-file-process "*Async Shell*" buffer args) | ||
| 3025 | ;; Display output. | ||
| 3026 | (pop-to-buffer output-buffer) | ||
| 3027 | (setq mode-line-process '(":%s")) | ||
| 3028 | (shell-mode)) | ||
| 3029 | |||
| 3030 | (prog1 | ||
| 3031 | ;; Run the process. | ||
| 3032 | (apply 'process-file (car args) nil buffer nil (cdr args)) | ||
| 3033 | ;; Insert error messages if they were separated. | ||
| 3034 | (when (listp buffer) | ||
| 3035 | (with-current-buffer error-buffer | ||
| 3036 | (insert-file-contents (cadr buffer))) | ||
| 3037 | (delete-file (cadr buffer))) | ||
| 3038 | (if current-buffer-p | ||
| 3039 | ;; This is like exchange-point-and-mark, but doesn't | ||
| 3040 | ;; activate the mark. It is cleaner to avoid activation, | ||
| 3041 | ;; even though the command loop would deactivate the mark | ||
| 3042 | ;; because we inserted text. | ||
| 3043 | (goto-char (prog1 (mark t) | ||
| 3044 | (set-marker (mark-marker) (point) | ||
| 3045 | (current-buffer)))) | ||
| 3046 | ;; There's some output, display it. | ||
| 3047 | (when (with-current-buffer output-buffer (> (point-max) (point-min))) | ||
| 3048 | (if (functionp 'display-message-or-buffer) | ||
| 3049 | (tramp-compat-funcall 'display-message-or-buffer output-buffer) | ||
| 3050 | (pop-to-buffer output-buffer)))))))) | ||
| 3051 | |||
| 2962 | (defun tramp-handle-substitute-in-file-name (filename) | 3052 | (defun tramp-handle-substitute-in-file-name (filename) |
| 2963 | "Like `substitute-in-file-name' for Tramp files. | 3053 | "Like `substitute-in-file-name' for Tramp files. |
| 2964 | \"//\" and \"/~\" substitute only in the local filename part. | 3054 | \"//\" and \"/~\" substitute only in the local filename part. |
| @@ -3477,7 +3567,7 @@ Return the local name of the temporary file." | |||
| 3477 | (ignore-errors (delete-file tramp-temp-buffer-file-name)))) | 3567 | (ignore-errors (delete-file tramp-temp-buffer-file-name)))) |
| 3478 | 3568 | ||
| 3479 | (add-hook 'kill-buffer-hook 'tramp-delete-temp-file-function) | 3569 | (add-hook 'kill-buffer-hook 'tramp-delete-temp-file-function) |
| 3480 | (add-hook 'tramp-cache-unload-hook | 3570 | (add-hook 'tramp-unload-hook |
| 3481 | (lambda () | 3571 | (lambda () |
| 3482 | (remove-hook 'kill-buffer-hook | 3572 | (remove-hook 'kill-buffer-hook |
| 3483 | 'tramp-delete-temp-file-function))) | 3573 | 'tramp-delete-temp-file-function))) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 709f01444bf..de46dc19169 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -446,9 +446,10 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 446 | (when (eq grep-highlight-matches 'auto-detect) | 446 | (when (eq grep-highlight-matches 'auto-detect) |
| 447 | (grep-compute-defaults)) | 447 | (grep-compute-defaults)) |
| 448 | (unless (or (eq grep-highlight-matches 'auto-detect) | 448 | (unless (or (eq grep-highlight-matches 'auto-detect) |
| 449 | ;; Uses font-lock to parse color escapes. (Bug#8084) | 449 | (null grep-highlight-matches) |
| 450 | (null font-lock-mode) | 450 | ;; Don't output color escapes if they can't be |
| 451 | (null grep-highlight-matches)) | 451 | ;; highlighted with `font-lock-face' by `grep-filter'. |
| 452 | (null font-lock-mode)) | ||
| 452 | ;; `setenv' modifies `process-environment' let-bound in `compilation-start' | 453 | ;; `setenv' modifies `process-environment' let-bound in `compilation-start' |
| 453 | ;; Any TERM except "dumb" allows GNU grep to use `--color=auto' | 454 | ;; Any TERM except "dumb" allows GNU grep to use `--color=auto' |
| 454 | (setenv "TERM" "emacs-grep") | 455 | (setenv "TERM" "emacs-grep") |
| @@ -459,7 +460,7 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 459 | ;; GREP_COLOR is used in GNU grep 2.5.1, but deprecated in later versions | 460 | ;; GREP_COLOR is used in GNU grep 2.5.1, but deprecated in later versions |
| 460 | (setenv "GREP_COLOR" "01;31") | 461 | (setenv "GREP_COLOR" "01;31") |
| 461 | ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions | 462 | ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions |
| 462 | (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:ml=:cx=:ne")) | 463 | (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:sl=:cx=:ne")) |
| 463 | (set (make-local-variable 'compilation-exit-message-function) | 464 | (set (make-local-variable 'compilation-exit-message-function) |
| 464 | (lambda (status code msg) | 465 | (lambda (status code msg) |
| 465 | (if (eq status 'exit) | 466 | (if (eq status 'exit) |
| @@ -480,20 +481,21 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 480 | This function is called from `compilation-filter-hook'." | 481 | This function is called from `compilation-filter-hook'." |
| 481 | (save-excursion | 482 | (save-excursion |
| 482 | (forward-line 0) | 483 | (forward-line 0) |
| 483 | (let ((end (point))) | 484 | (let ((end (point)) beg) |
| 484 | (goto-char compilation-filter-start) | 485 | (goto-char compilation-filter-start) |
| 485 | (forward-line 0) | 486 | (forward-line 0) |
| 487 | (setq beg (point)) | ||
| 486 | ;; Only operate on whole lines so we don't get caught with part of an | 488 | ;; Only operate on whole lines so we don't get caught with part of an |
| 487 | ;; escape sequence in one chunk and the rest in another. | 489 | ;; escape sequence in one chunk and the rest in another. |
| 488 | (when (< (point) end) | 490 | (when (< (point) end) |
| 489 | (setq end (copy-marker end)) | 491 | (setq end (copy-marker end)) |
| 490 | ;; Highlight grep matches and delete marking sequences. | 492 | ;; Highlight grep matches and delete marking sequences. |
| 491 | (while (re-search-forward "\033\\[01;31m\\(.*?\\)\033\\[[0-9]*m" end 1) | 493 | (while (re-search-forward "\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m" end 1) |
| 492 | (replace-match (propertize (match-string 1) | 494 | (replace-match (propertize (match-string 1) |
| 493 | 'face nil 'font-lock-face grep-match-face) | 495 | 'face nil 'font-lock-face grep-match-face) |
| 494 | t t)) | 496 | t t)) |
| 495 | ;; Delete all remaining escape sequences | 497 | ;; Delete all remaining escape sequences |
| 496 | (goto-char compilation-filter-start) | 498 | (goto-char beg) |
| 497 | (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1) | 499 | (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1) |
| 498 | (replace-match "" t t)))))) | 500 | (replace-match "" t t)))))) |
| 499 | 501 | ||
| @@ -987,7 +989,8 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]." | |||
| 987 | dir | 989 | dir |
| 988 | (concat | 990 | (concat |
| 989 | (and grep-find-ignored-directories | 991 | (and grep-find-ignored-directories |
| 990 | (concat (shell-quote-argument "(") | 992 | (concat "-type d " |
| 993 | (shell-quote-argument "(") | ||
| 991 | ;; we should use shell-quote-argument here | 994 | ;; we should use shell-quote-argument here |
| 992 | " -path " | 995 | " -path " |
| 993 | (mapconcat | 996 | (mapconcat |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4d2f15c69d8..3f923f496b9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -296,7 +296,7 @@ Used for syntactic keywords. N is the match number (1, 2 or 3)." | |||
| 296 | :filter (lambda (&rest junk) | 296 | :filter (lambda (&rest junk) |
| 297 | (abbrev-table-menu python-mode-abbrev-table))) | 297 | (abbrev-table-menu python-mode-abbrev-table))) |
| 298 | "-" | 298 | "-" |
| 299 | ["Start interpreter" python-shell | 299 | ["Start interpreter" run-python |
| 300 | :help "Run `inferior' Python in separate buffer"] | 300 | :help "Run `inferior' Python in separate buffer"] |
| 301 | ["Import/reload file" python-load-file | 301 | ["Import/reload file" python-load-file |
| 302 | :help "Load into inferior Python session"] | 302 | :help "Load into inferior Python session"] |
| @@ -328,14 +328,6 @@ Used for syntactic keywords. N is the match number (1, 2 or 3)." | |||
| 328 | ;; eric has items including: (un)indent, (un)comment, restart script, | 328 | ;; eric has items including: (un)indent, (un)comment, restart script, |
| 329 | ;; run script, debug script; also things for profiling, unit testing. | 329 | ;; run script, debug script; also things for profiling, unit testing. |
| 330 | 330 | ||
| 331 | (defvar python-shell-map | ||
| 332 | (let ((map (copy-keymap comint-mode-map))) | ||
| 333 | (define-key map [tab] 'tab-to-tab-stop) | ||
| 334 | (define-key map "\C-c-" 'py-up-exception) | ||
| 335 | (define-key map "\C-c=" 'py-down-exception) | ||
| 336 | map) | ||
| 337 | "Keymap used in *Python* shell buffers.") | ||
| 338 | |||
| 339 | (defvar python-mode-syntax-table | 331 | (defvar python-mode-syntax-table |
| 340 | (let ((table (make-syntax-table))) | 332 | (let ((table (make-syntax-table))) |
| 341 | ;; Give punctuation syntax to ASCII that normally has symbol | 333 | ;; Give punctuation syntax to ASCII that normally has symbol |
| @@ -1345,7 +1337,7 @@ local value.") | |||
| 1345 | (define-key map "\C-c\C-l" 'python-load-file) | 1337 | (define-key map "\C-c\C-l" 'python-load-file) |
| 1346 | (define-key map "\C-c\C-v" 'python-check) | 1338 | (define-key map "\C-c\C-v" 'python-check) |
| 1347 | ;; Note that we _can_ still use these commands which send to the | 1339 | ;; Note that we _can_ still use these commands which send to the |
| 1348 | ;; Python process even at the prompt iff we have a normal prompt, | 1340 | ;; Python process even at the prompt if we have a normal prompt, |
| 1349 | ;; i.e. '>>> ' and not '... '. See the comment before | 1341 | ;; i.e. '>>> ' and not '... '. See the comment before |
| 1350 | ;; python-send-region. Fixme: uncomment these if we address that. | 1342 | ;; python-send-region. Fixme: uncomment these if we address that. |
| 1351 | 1343 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index b49a20e7f6e..a2676b1173d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2254,7 +2254,7 @@ is nil and `use-dialog-box' is non-nil." | |||
| 2254 | (listp last-nonmenu-event) | 2254 | (listp last-nonmenu-event) |
| 2255 | use-dialog-box) | 2255 | use-dialog-box) |
| 2256 | (setq answer | 2256 | (setq answer |
| 2257 | (x-popup-dialog t `(,prompt ("yes" . act) ("No" . skip)))) | 2257 | (x-popup-dialog t `(,prompt ("Yes" . act) ("No" . skip)))) |
| 2258 | (setq prompt (concat prompt | 2258 | (setq prompt (concat prompt |
| 2259 | (if (eq ?\s (aref prompt (1- (length prompt)))) | 2259 | (if (eq ?\s (aref prompt (1- (length prompt)))) |
| 2260 | "" " ") | 2260 | "" " ") |
diff --git a/lisp/window.el b/lisp/window.el index d078fbec35d..5272841a9c7 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -2291,29 +2291,45 @@ frame." | |||
| 2291 | (setq window (window-atom-root window)))) | 2291 | (setq window (window-atom-root window)))) |
| 2292 | (let ((parent (window-parent window)) | 2292 | (let ((parent (window-parent window)) |
| 2293 | (frame (window-frame window)) | 2293 | (frame (window-frame window)) |
| 2294 | (buffer (window-buffer window)) | ||
| 2294 | (dedicated (and (window-buffer window) (window-dedicated-p window))) | 2295 | (dedicated (and (window-buffer window) (window-dedicated-p window))) |
| 2295 | (quit-restore (window-parameter window 'quit-restore))) | 2296 | (quit-restore (window-parameter window 'quit-restore))) |
| 2296 | (cond | 2297 | (cond |
| 2297 | ((frame-root-window-p window) | 2298 | ((frame-root-window-p window) |
| 2299 | ;; Don't delete FRAME if `frame-auto-delete' is nil. | ||
| 2298 | (when (and (or (eq frame-auto-delete t) | 2300 | (when (and (or (eq frame-auto-delete t) |
| 2299 | (and (eq frame-auto-delete 'automatic) | 2301 | (and (eq frame-auto-delete 'automatic) |
| 2302 | ;; Delete FRAME only if it's either dedicated | ||
| 2303 | ;; or quit-restore's car is `new-frame' and | ||
| 2304 | ;; WINDOW still displays the same buffer | ||
| 2300 | (or dedicated | 2305 | (or dedicated |
| 2301 | (and (eq (car-safe quit-restore) 'new-frame) | 2306 | (and (eq (car-safe quit-restore) 'new-frame) |
| 2302 | (eq (nth 1 quit-restore) | 2307 | (eq (nth 1 quit-restore) |
| 2303 | (window-buffer window)))))) | 2308 | (window-buffer window)))))) |
| 2309 | ;; Don't delete FRAME if we have another buffer in | ||
| 2310 | ;; WINDOW's previous buffers. Bug#9419. | ||
| 2311 | (or (not (window-prev-buffers window)) | ||
| 2312 | (eq (caar (window-prev-buffers window)) buffer)) | ||
| 2313 | ;; Don't try to delete FRAME when there are no other | ||
| 2314 | ;; visible frames left. | ||
| 2304 | (other-visible-frames-p frame)) | 2315 | (other-visible-frames-p frame)) |
| 2305 | ;; WINDOW is the root window of its frame. Return `frame' but | ||
| 2306 | ;; only if WINDOW is (1) either dedicated or quit-restore's car | ||
| 2307 | ;; is `new-frame' and the window still displays the same buffer | ||
| 2308 | ;; and (2) there are other frames left. | ||
| 2309 | 'frame)) | 2316 | 'frame)) |
| 2310 | ((and (not ignore-window-parameters) | 2317 | ;; Don't delete WINDOW if we find another buffer in WINDOW's |
| 2311 | (eq (window-parameter window 'window-side) 'none) | 2318 | ;; previous buffers. |
| 2312 | (or (not parent) | 2319 | ((and (or (not (window-prev-buffers window)) |
| 2313 | (not (eq (window-parameter parent 'window-side) 'none)))) | 2320 | (eq (caar (window-prev-buffers window)) buffer)) |
| 2314 | ;; Can't delete last main window. | 2321 | ;; Delete WINDOW only if it's dedicated or quit-restore's car |
| 2315 | nil) | 2322 | ;; is `new-frame' or `new-window' and it still displays the |
| 2316 | (t)))) | 2323 | ;; same buffer. |
| 2324 | (or dedicated | ||
| 2325 | (and (memq (car-safe quit-restore) '(new-window new-frame)) | ||
| 2326 | (eq (nth 1 quit-restore) (window-buffer window)))) | ||
| 2327 | ;; Don't delete the last main window. | ||
| 2328 | (or ignore-window-parameters | ||
| 2329 | (not (eq (window-parameter window 'window-side) 'none)) | ||
| 2330 | (and parent | ||
| 2331 | (eq (window-parameter parent 'window-side) 'none)))) | ||
| 2332 | t)))) | ||
| 2317 | 2333 | ||
| 2318 | (defun window-or-subwindow-p (subwindow window) | 2334 | (defun window-or-subwindow-p (subwindow window) |
| 2319 | "Return t if SUBWINDOW is either WINDOW or a subwindow of WINDOW." | 2335 | "Return t if SUBWINDOW is either WINDOW or a subwindow of WINDOW." |
| @@ -4714,7 +4730,10 @@ return the window on the new frame; otherwise return nil." | |||
| 4714 | (setq frame (funcall fun)) | 4730 | (setq frame (funcall fun)) |
| 4715 | (setq window (frame-selected-window frame))) | 4731 | (setq window (frame-selected-window frame))) |
| 4716 | (display-buffer-record-window 'pop-up-frame window buffer) | 4732 | (display-buffer-record-window 'pop-up-frame window buffer) |
| 4717 | (window--display-buffer-2 buffer window)))) | 4733 | (window--display-buffer-2 buffer window) |
| 4734 | ;; Reset list of WINDOW's previous buffers to nil. | ||
| 4735 | (set-window-prev-buffers window nil) | ||
| 4736 | window))) | ||
| 4718 | 4737 | ||
| 4719 | (defun display-buffer-pop-up-window (buffer alist) | 4738 | (defun display-buffer-pop-up-window (buffer alist) |
| 4720 | "Display BUFFER by popping up a new window. | 4739 | "Display BUFFER by popping up a new window. |
| @@ -4737,7 +4756,10 @@ If sucessful, return the new window; otherwise return nil." | |||
| 4737 | (window--try-to-split-window | 4756 | (window--try-to-split-window |
| 4738 | (get-lru-window frame t))))) | 4757 | (get-lru-window frame t))))) |
| 4739 | (display-buffer-record-window 'pop-up-window window buffer) | 4758 | (display-buffer-record-window 'pop-up-window window buffer) |
| 4740 | (window--display-buffer-2 buffer window)))) | 4759 | (window--display-buffer-2 buffer window) |
| 4760 | ;; Reset list of WINDOW's previous buffers to nil. | ||
| 4761 | (set-window-prev-buffers window nil) | ||
| 4762 | window))) | ||
| 4741 | 4763 | ||
| 4742 | ;; This display action function groups together some lower-level ones: | 4764 | ;; This display action function groups together some lower-level ones: |
| 4743 | (defun display-buffer-reuse-or-pop-window (buffer alist) | 4765 | (defun display-buffer-reuse-or-pop-window (buffer alist) |