aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/ns-win.el12
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index ab18d9ad806..e0dffa87251 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -420,8 +420,7 @@ See `ns-insert-working-text'."
420 "Insert contents of file `ns-input-file' like insert-file but with less 420 "Insert contents of file `ns-input-file' like insert-file but with less
421prompting. If file is a directory perform a `find-file' on it." 421prompting. If file is a directory perform a `find-file' on it."
422 (interactive) 422 (interactive)
423 (let (f) 423 (let ((f (pop ns-input-file)))
424 (setq f (pop ns-input-file))
425 (if (file-directory-p f) 424 (if (file-directory-p f)
426 (find-file f) 425 (find-file f)
427 (push-mark (+ (point) (cadr (insert-file-contents f))))))) 426 (push-mark (+ (point) (cadr (insert-file-contents f)))))))
@@ -527,11 +526,10 @@ unless the current buffer is a scratch buffer."
527(defun ns-find-file () 526(defun ns-find-file ()
528 "Do a `find-file' with the `ns-input-file' as argument." 527 "Do a `find-file' with the `ns-input-file' as argument."
529 (interactive) 528 (interactive)
530 (let (f file bufwin1 bufwin2) 529 (let* ((f (file-truename (pop ns-input-file)))
531 (setq f (file-truename (pop ns-input-file)) 530 (file (find-file-noselect f))
532 file (find-file-noselect f) 531 (bufwin1 (get-buffer-window file 'visible))
533 bufwin1 (get-buffer-window file 'visible) 532 (bufwin2 (get-buffer-window "*scratch*" 'visibile)))
534 bufwin2 (get-buffer-window "*scratch*" 'visibile))
535 (cond 533 (cond
536 (bufwin1 534 (bufwin1
537 (select-frame (window-frame bufwin1)) 535 (select-frame (window-frame bufwin1))