Skip to content

Commit

Permalink
Explain, `why tramp-*-file-name-p' is a defsubst.
Browse files Browse the repository at this point in the history
  • Loading branch information
albinus committed Dec 14, 2012
1 parent 566faed commit 8ffbfa2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lisp/tramp-adb.el
Expand Up @@ -111,6 +111,8 @@
(start-file-process . tramp-adb-handle-start-file-process))
"Alist of handler functions for Tramp ADB method.")

;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading.
;;;###tramp-autoload
(defsubst tramp-adb-file-name-p (filename)
"Check if it's a filename for ADB."
Expand Down
2 changes: 2 additions & 0 deletions lisp/tramp-efs.el
Expand Up @@ -209,6 +209,8 @@ pass to the OPERATION."
;; syntax (see defadvice of `efs-dired-before-readin' and
;; `efs-set-buffer-mode'). So a syntax check must be performed first;
;; otherwise `tramp-dissect-file-name' returns with an error.
;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading.
;;;###tramp-autoload
(defsubst tramp-efs-file-name-p (filename)
"Check if it's a filename that should be forwarded to EFS."
Expand Down
2 changes: 2 additions & 0 deletions lisp/tramp-ftp.el
Expand Up @@ -200,6 +200,8 @@ pass to the OPERATION."
(inhibit-file-name-operation operation))
(apply 'ange-ftp-hook-function operation args)))))))

;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading.
;;;###tramp-autoload
(defsubst tramp-ftp-file-name-p (filename)
"Check if it's a filename that should be forwarded to Ange-FTP."
Expand Down
2 changes: 2 additions & 0 deletions lisp/tramp-gvfs.el
Expand Up @@ -432,6 +432,8 @@ Every entry is a list (NAME ADDRESS).")
"Alist of handler functions for Tramp GVFS method.
Operations not mentioned here will be handled by the default Emacs primitives.")

;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading.
;;;###tramp-autoload
(defsubst tramp-gvfs-file-name-p (filename)
"Check if it's a filename handled by the GVFS daemon."
Expand Down
2 changes: 2 additions & 0 deletions lisp/tramp-smb.el
Expand Up @@ -265,6 +265,8 @@ This can be used to disable echo etc."
:type 'string
:version "24.3")

;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading.
;;;###tramp-autoload
(defsubst tramp-smb-file-name-p (filename)
"Check if it's a filename for SMB servers."
Expand Down

0 comments on commit 8ffbfa2

Please sign in to comment.