diff options
| author | Glenn Morris | 2010-10-27 00:39:34 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-10-27 00:39:34 -0700 |
| commit | c6efd3dd5df2b87f7fa46ee066697b1d439b2b75 (patch) | |
| tree | 1047eadf76d7c56c45e8a8646d614454aee5be18 | |
| parent | 208d109c18bf5a1de184b4d3c70748ca4d68aeef (diff) | |
| download | emacs-c6efd3dd5df2b87f7fa46ee066697b1d439b2b75.tar.gz emacs-c6efd3dd5df2b87f7fa46ee066697b1d439b2b75.zip | |
* lisp/term/ns-win.el (ns-insert-file): Init in let.
(ns-find-file): Use let*.
| -rw-r--r-- | lisp/term/ns-win.el | 12 |
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 |
| 421 | prompting. If file is a directory perform a `find-file' on it." | 421 | prompting. 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)) |