Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
775a132d
Commit
775a132d
authored
Oct 08, 2012
by
Michael Albinus
Browse files
* ffap.el (ffap-replace-file-component): Support Tramp file name
syntax, not only ange-ftp's one.
parent
607446ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/ffap.el
lisp/ffap.el
+6
-12
No files found.
lisp/ChangeLog
View file @
775a132d
2012-10-08 Michael Albinus <michael.albinus@gmx.de>
* ffap.el (ffap-replace-file-component): Support Tramp file name
syntax, not only ange-ftp's one.
2012-10-08 Glenn Morris <rgm@gnu.org>
* cus-start.el (message-log-max): Set :version.
...
...
lisp/ffap.el
View file @
775a132d
...
...
@@ -482,18 +482,12 @@ Returned values:
(
defun
ffap-replace-file-component
(
fullname
name
)
"In remote FULLNAME, replace path with NAME. May return nil."
;; Use ange-ftp or efs if loaded, but do not load them otherwise.
(
let
(
found
)
(
mapc
(
function
(
lambda
(
sym
)
(
and
(
fboundp
sym
)
(
setq
found
sym
))))
'
(
efs-replace-path-component
ange-ftp-replace-path-component
ange-ftp-replace-name-component
))
(
and
found
(
fset
'ffap-replace-file-component
found
)
(
funcall
found
fullname
name
))))
;; Use efs if loaded, but do not load it otherwise.
(
if
(
fboundp
'efs-replace-path-component
)
(
funcall
efs-replace-path-component
fullname
name
)
(
and
(
stringp
fullname
)
(
stringp
name
)
(
concat
(
file-remote-p
fullname
)
name
))))
;; (ffap-replace-file-component "/who@foo.com:/whatever" "/new")
(
defun
ffap-file-suffix
(
file
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment