mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-10 09:43:26 -08:00
* net/tramp-compat.el (tramp-compat-pop-to-buffer-same-window): New defun.
* net/tramp-cmds.el (tramp-append-tramp-buffers): Use it.
This commit is contained in:
parent
53d2167130
commit
1cdd2a1b36
3 changed files with 27 additions and 12 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2011-07-06 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp-compat.el (tramp-compat-pop-to-buffer-same-window):
|
||||
New defun.
|
||||
* net/tramp-cmds.el (tramp-append-tramp-buffers): Use it.
|
||||
|
||||
2011-07-06 Michael R. Mauger <mmaug@yahoo.com>
|
||||
|
||||
* progmodes/sql.el: Version 3.0
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ buffer in your bug report.
|
|||
|
||||
;; There is at least one Tramp buffer.
|
||||
(when buffer-list
|
||||
(pop-to-buffer-same-window (list-buffers-noselect nil))
|
||||
(tramp-compat-pop-to-buffer-same-window (list-buffers-noselect nil))
|
||||
(delete-other-windows)
|
||||
(setq buffer-read-only nil)
|
||||
(goto-char (point-min))
|
||||
|
|
@ -343,7 +343,7 @@ the debug buffer(s).")
|
|||
;; OK, let's send. First we delete the buffer list.
|
||||
(progn
|
||||
(kill-buffer nil)
|
||||
(pop-to-buffer-same-window curbuf)
|
||||
(tramp-compat-pop-to-buffer-same-window curbuf)
|
||||
(goto-char (point-max))
|
||||
(insert "\n\
|
||||
This is a special notion of the `gnus/message' package. If you
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
;;; Commentary:
|
||||
|
||||
;; Tramp's main Emacs version for development is GNU Emacs 24. This
|
||||
;; package provides compatibility functions for GNU Emacs 22, GNU
|
||||
;; Emacs 23 and XEmacs 21.4+.
|
||||
;; Tramp's main Emacs version for development is Emacs 24. This
|
||||
;; package provides compatibility functions for Emacs 22, Emacs 23,
|
||||
;; XEmacs 21.4+ and SXEmacs 22.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
|
@ -286,9 +286,8 @@ Not actually used. Use `(format \"%o\" i)' instead?"
|
|||
(tramp-compat-funcall 'file-attributes filename id-format)
|
||||
(wrong-number-of-arguments (file-attributes filename))))))
|
||||
|
||||
;; PRESERVE-UID-GID has been introduced with Emacs 23. It does not
|
||||
;; hurt to ignore it for other (X)Emacs versions.
|
||||
;; PRESERVE-SELINUX-CONTEXT has been introduced with Emacs 24.
|
||||
;; PRESERVE-UID-GID does not exist in XEmacs.
|
||||
;; PRESERVE-SELINUX-CONTEXT has been introduced with Emacs 24.1.
|
||||
(defun tramp-compat-copy-file
|
||||
(filename newname &optional ok-if-already-exists keep-date
|
||||
preserve-uid-gid preserve-selinux-context)
|
||||
|
|
@ -484,10 +483,7 @@ exiting if process is running."
|
|||
(tramp-compat-funcall 'set-process-query-on-exit-flag process flag)
|
||||
(tramp-compat-funcall 'process-kill-without-query process flag)))
|
||||
|
||||
(add-hook 'tramp-unload-hook
|
||||
(lambda ()
|
||||
(unload-feature 'tramp-compat 'force)))
|
||||
|
||||
;; There exist different implementations for this function.
|
||||
(defun tramp-compat-coding-system-change-eol-conversion (coding-system eol-type)
|
||||
"Return a coding system like CODING-SYSTEM but with given EOL-TYPE.
|
||||
EOL-TYPE can be one of `dos', `unix', or `mac'."
|
||||
|
|
@ -506,6 +502,19 @@ EOL-TYPE can be one of `dos', `unix', or `mac'."
|
|||
"`dos', `unix', or `mac'")))))
|
||||
(t (error "Can't change EOL conversion -- is MULE missing?"))))
|
||||
|
||||
;; `pop-to-buffer-same-window' has been introduced with Emacs 24.1.
|
||||
(defun tramp-compat-pop-to-buffer-same-window
|
||||
(&optional buffer-or-name norecord label)
|
||||
"Pop to buffer specified by BUFFER-OR-NAME in the selected window."
|
||||
(if (fboundp 'pop-to-buffer-same-window)
|
||||
(tramp-compat-funcall
|
||||
'pop-to-buffer-same-window buffer-or-name norecord label)
|
||||
(tramp-compat-funcall 'switch-to-buffer buffer-or-name norecord)))
|
||||
|
||||
(add-hook 'tramp-unload-hook
|
||||
(lambda ()
|
||||
(unload-feature 'tramp-compat 'force)))
|
||||
|
||||
(provide 'tramp-compat)
|
||||
|
||||
;;; TODO:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue