Commit 6f931919 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(hack-local-variables-prop-line): If we can't switch-to-buffer

in selected window, try another window, then a new frame.

(set-visited-file-name): Don't rename-buffer if buffer
already has the desired name.

(insert-file): Add * to interactive spec.
parent aea2e14c
......@@ -947,7 +947,16 @@ If `enable-local-variables' is nil, this function does not check for a
(or (eq enable-local-variables t)
(and enable-local-variables
(switch-to-buffer (current-buffer))
(condition-case nil
(switch-to-buffer (current-buffer))
;; If we fail to switch in the selected window,
;; it is probably a minibuffer.
;; So try another window.
(condition-case nil
(switch-to-buffer-other-window (current-buffer))
(switch-to-buffer-other-frame (current-buffer))))))
(y-or-n-p (format "Set local variables as specified in -*- line of %s? "
(file-name-nondirectory buffer-file-name)))))))
(while result
......@@ -1091,7 +1100,8 @@ if you wish to pass an empty string as the argument."
(if (eq system-type 'vax-vms)
(setq new-name (downcase new-name)))
(setq default-directory (file-name-directory buffer-file-name))
(rename-buffer new-name t)))
(or (string= new-name (buffer-name))
(rename-buffer new-name t))))
(setq buffer-backed-up nil)
(if filename
......@@ -1578,7 +1588,7 @@ Set mark after the inserted text.
This function is meant for the user to run interactively.
Don't call it from programs! Use `insert-file-contents' instead.
\(Its calling sequence is different; see its documentation)."
(interactive "fInsert file: ")
(interactive "*fInsert file: ")
(if (file-directory-p filename)
(signal 'file-error (list "Opening input file" "file is a directory"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment