1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-06 14:02:07 -08:00

* lisp/net/tramp.el (with-parsed-tramp-file-name): Silence compiler

warnings, and factor our common code.
This commit is contained in:
Stefan Monnier 2013-09-03 12:23:10 -04:00
parent bc923770d2
commit 9d3f707c59
3 changed files with 21 additions and 15 deletions

View file

@ -1,3 +1,8 @@
2013-09-03 Stefan Monnier <monnier@iro.umontreal.ca>
* net/tramp.el (with-parsed-tramp-file-name): Silence compiler
warnings, and factor our common code.
2013-09-03 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-calculate-indent): Consider
@ -7,8 +12,8 @@
2013-09-02 Fabián Ezequiel Gallina <fgallina@gnu.org>
Format code sent to Python shell for robustness.
* progmodes/python.el (python-shell-buffer-substring): New
function.
* progmodes/python.el (python-shell-buffer-substring):
New function.
(python-shell-send-region, python-shell-send-buffer): Use it.
2013-09-02 Michael Albinus <michael.albinus@gmx.de>

View file

@ -186,7 +186,7 @@
;; `with-temp-message' does not exist in XEmacs.
(if (fboundp 'with-temp-message)
(defalias 'tramp-compat-with-temp-message 'with-temp-message)
(defmacro tramp-compat-with-temp-message (message &rest body)
(defmacro tramp-compat-with-temp-message (_message &rest body)
"Display MESSAGE temporarily if non-nil while BODY is evaluated."
`(progn ,@body)))

View file

@ -1632,18 +1632,19 @@ Remaining args are Lisp expressions to be evaluated (inside an implicit
If VAR is nil, then we bind `v' to the structure and `method', `user',
`host', `localname', `hop' to the components."
`(let* ((,(or var 'v) (tramp-dissect-file-name ,filename))
(,(if var (intern (concat (symbol-name var) "-method")) 'method)
(tramp-file-name-method ,(or var 'v)))
(,(if var (intern (concat (symbol-name var) "-user")) 'user)
(tramp-file-name-user ,(or var 'v)))
(,(if var (intern (concat (symbol-name var) "-host")) 'host)
(tramp-file-name-host ,(or var 'v)))
(,(if var (intern (concat (symbol-name var) "-localname")) 'localname)
(tramp-file-name-localname ,(or var 'v)))
(,(if var (intern (concat (symbol-name var) "-hop")) 'hop)
(tramp-file-name-hop ,(or var 'v))))
,@body))
(let ((bindings
(mapcar (lambda (elem)
`(,(if var (intern (format "%s-%s" var elem)) elem)
(,(intern (format "tramp-file-name-%s" elem))
,(or var 'v))))
'(method user host localname hop))))
`(let* ((,(or var 'v) (tramp-dissect-file-name ,filename))
,@bindings)
;; We don't know which of those vars will be used, so we bind them all,
;; and then add here a dummy use of all those variables, so we don't get
;; flooded by warnings about those vars `body' didn't use.
(ignore ,@(mapcar #'car bindings))
,@body)))
(put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
(put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body))