[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1720ebecc7: ; * lisp/files.el (find-file-noselect): Minor simplif
From: |
Stefan Kangas |
Subject: |
master 1720ebecc7: ; * lisp/files.el (find-file-noselect): Minor simplification. |
Date: |
Wed, 5 Oct 2022 09:09:03 -0400 (EDT) |
branch: master
commit 1720ebecc7670903129de70fee1a72c875c42d95
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
; * lisp/files.el (find-file-noselect): Minor simplification.
---
lisp/files.el | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index 667e3325bb..43c5d7d1da 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2379,16 +2379,15 @@ the various files."
'buffer-file-name buffer)))
(and file (file-exists-p file))))))))
;; Let user know if there is a buffer with the same truename.
- (if other
- (progn
- (or nowarn
- find-file-suppress-same-file-warnings
- (string-equal filename (buffer-file-name other))
- (files--message "%s and %s are the same file"
- filename (buffer-file-name other)))
- ;; Optionally also find that buffer.
- (if (or find-file-existing-other-name find-file-visit-truename)
- (setq buf other))))
+ (when other
+ (or nowarn
+ find-file-suppress-same-file-warnings
+ (string-equal filename (buffer-file-name other))
+ (files--message "%s and %s are the same file"
+ filename (buffer-file-name other)))
+ ;; Optionally also find that buffer.
+ (if (or find-file-existing-other-name find-file-visit-truename)
+ (setq buf other)))
;; Check to see if the file looks uncommonly large.
(when (not (or buf nowarn))
(when (eq (abort-if-file-too-large
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1720ebecc7: ; * lisp/files.el (find-file-noselect): Minor simplification.,
Stefan Kangas <=