diff options
| author | Michael Albinus | 2024-08-06 20:25:20 +0200 |
|---|---|---|
| committer | Michael Albinus | 2024-08-06 20:25:20 +0200 |
| commit | f0a7eec5a7ddd4a009d050b97acf29744d576e5d (patch) | |
| tree | 076b0a1907d5383f0a4600318d75545c19577d32 | |
| parent | fb642d9cf546f52a11cdfef479447ce2e8fa3ec8 (diff) | |
| download | emacs-f0a7eec5a7ddd4a009d050b97acf29744d576e5d.tar.gz emacs-f0a7eec5a7ddd4a009d050b97acf29744d576e5d.zip | |
* lisp/net/tramp-integration.el (shortdoc): Use `tramp--with-startup'.
| -rw-r--r-- | lisp/net/tramp-integration.el | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el index 6b28ddb7472..8d039c25eae 100644 --- a/lisp/net/tramp-integration.el +++ b/lisp/net/tramp-integration.el | |||
| @@ -274,37 +274,38 @@ NAME must be equal to `tramp-current-connection'." | |||
| 274 | 274 | ||
| 275 | ;;; Integration of shortdoc.el: | 275 | ;;; Integration of shortdoc.el: |
| 276 | 276 | ||
| 277 | (with-eval-after-load 'shortdoc | 277 | (tramp--with-startup |
| 278 | ;; Some packages deactivate Tramp. They don't deserve a shortdoc entry then. | 278 | (with-eval-after-load 'shortdoc |
| 279 | (when (file-remote-p "/ssh:user@host:/tmp/foo") | 279 | ;; Some packages deactivate Tramp. They don't deserve a shortdoc entry then. |
| 280 | (dolist (elem `((file-remote-p | 280 | (when (file-remote-p "/ssh:user@host:/tmp/foo") |
| 281 | :eval (file-remote-p "/ssh:user@host:/tmp/foo") | 281 | (dolist (elem `((file-remote-p |
| 282 | :eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method) | 282 | :eval (file-remote-p "/ssh:user@host:/tmp/foo") |
| 283 | :eval (file-remote-p "/ssh:user@[::1]#1234:/tmp/foo" 'host) | 283 | :eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method) |
| 284 | ;; We don't want to see the text properties. | 284 | :eval (file-remote-p "/ssh:user@[::1]#1234:/tmp/foo" 'host) |
| 285 | :no-eval (file-remote-p "/sudo::/tmp/foo" 'user) | 285 | ;; We don't want to see the text properties. |
| 286 | :result ,(substring-no-properties | 286 | :no-eval (file-remote-p "/sudo::/tmp/foo" 'user) |
| 287 | (file-remote-p "/sudo::/tmp/foo" 'user))) | 287 | :result ,(substring-no-properties |
| 288 | (file-local-name | 288 | (file-remote-p "/sudo::/tmp/foo" 'user))) |
| 289 | :eval (file-local-name "/ssh:user@host:/tmp/foo")) | 289 | (file-local-name |
| 290 | (file-local-copy | 290 | :eval (file-local-name "/ssh:user@host:/tmp/foo")) |
| 291 | :no-eval (file-local-copy "/ssh:user@host:/tmp/foo") | 291 | (file-local-copy |
| 292 | :eg-result "/tmp/tramp.8ihLbO" | 292 | :no-eval (file-local-copy "/ssh:user@host:/tmp/foo") |
| 293 | :eval (file-local-copy "/tmp/foo")))) | 293 | :eg-result "/tmp/tramp.8ihLbO" |
| 294 | (unless (assoc (car elem) | 294 | :eval (file-local-copy "/tmp/foo")))) |
| 295 | (member "Remote Files" (assq 'file shortdoc--groups))) | 295 | (unless (assoc (car elem) |
| 296 | (shortdoc-add-function 'file "Remote Files" elem))) | 296 | (member "Remote Files" (assq 'file shortdoc--groups))) |
| 297 | 297 | (shortdoc-add-function 'file "Remote Files" elem))) | |
| 298 | (add-hook | 298 | |
| 299 | 'tramp-integration-unload-hook | 299 | (add-hook |
| 300 | (lambda () | 300 | 'tramp-integration-unload-hook |
| 301 | (let ((glist (assq 'file shortdoc--groups))) | 301 | (lambda () |
| 302 | (while (and (consp glist) | 302 | (let ((glist (assq 'file shortdoc--groups))) |
| 303 | (not (and (stringp (cadr glist)) | 303 | (while (and (consp glist) |
| 304 | (string-equal (cadr glist) "Remote Files")))) | 304 | (not (and (stringp (cadr glist)) |
| 305 | (setq glist (cdr glist))) | 305 | (string-equal (cadr glist) "Remote Files")))) |
| 306 | (when (consp glist) | 306 | (setq glist (cdr glist))) |
| 307 | (setcdr glist nil))))))) | 307 | (when (consp glist) |
| 308 | (setcdr glist nil)))))))) | ||
| 308 | 309 | ||
| 309 | ;;; Integration of compile.el: | 310 | ;;; Integration of compile.el: |
| 310 | 311 | ||