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
a522e5bf
Commit
a522e5bf
authored
Jul 05, 1994
by
Richard M. Stallman
Browse files
(set-visited-file-name): Handle find-file-visit-truename
early on, before we deal with lock files.
parent
ed160f1f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
29 deletions
+34
-29
lisp/files.el
lisp/files.el
+34
-29
No files found.
lisp/files.el
View file @
a522e5bf
...
@@ -1172,11 +1172,19 @@ nil or empty string as argument means make buffer not be visiting any file.
...
@@ -1172,11 +1172,19 @@ nil or empty string as argument means make buffer not be visiting any file.
Remember to delete the initial contents of the minibuffer
Remember to delete the initial contents of the minibuffer
if you wish to pass an empty string as the argument."
if you wish to pass an empty string as the argument."
(
interactive
"FSet visited file name: "
)
(
interactive
"FSet visited file name: "
)
(
let
(
truename
)
(
if
filename
(
if
filename
(
setq
filename
(
setq
filename
(
if
(
string-equal
filename
""
)
(
if
(
string-equal
filename
""
)
nil
nil
(
expand-file-name
filename
))))
(
expand-file-name
filename
))))
(
if
filename
(
progn
(
setq
truename
(
file-truename
filename
))
(
if
find-file-visit-truename
;; Do not use the abbreviated filename, because
;; write-region will reset it to the expanded filename
(
setq
filename
truename
))))
(
or
(
equal
filename
buffer-file-name
)
(
or
(
equal
filename
buffer-file-name
)
(
progn
(
progn
(
and
filename
(
lock-buffer
filename
))
(
and
filename
(
lock-buffer
filename
))
...
@@ -1193,14 +1201,11 @@ if you wish to pass an empty string as the argument."
...
@@ -1193,14 +1201,11 @@ if you wish to pass an empty string as the argument."
(
rename-buffer
new-name
t
))))
(
rename-buffer
new-name
t
))))
(
setq
buffer-backed-up
nil
)
(
setq
buffer-backed-up
nil
)
(
clear-visited-file-modtime
)
(
clear-visited-file-modtime
)
(
setq
buffer-file-truename
(
abbreviate-file-name
truename
))
(
setq
buffer-file-number
(
if
filename
(
if
filename
(
progn
(
nth
10
(
file-attributes
buffer-file-name
))
(
setq
buffer-file-truename
nil
)))
(
abbreviate-file-name
(
file-truename
buffer-file-name
)))
(
if
find-file-visit-truename
(
setq
buffer-file-name
buffer-file-truename
))
(
setq
buffer-file-number
(
nth
10
(
file-attributes
buffer-file-name
))))
(
setq
buffer-file-truename
nil
buffer-file-number
nil
))
;; write-file-hooks is normally used for things like ftp-find-file
;; write-file-hooks is normally used for things like ftp-find-file
;; that visit things that are not local files as if they were files.
;; that visit things that are not local files as if they were files.
;; Changing to visit an ordinary local file instead should flush the hook.
;; Changing to visit an ordinary local file instead should flush the hook.
...
...
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