From fa660969617d1904b4040148c79d936c6e50692e Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 21 Feb 1996 21:32:35 +0000 Subject: [PATCH] (find-file-noselect): If after-find-file switches buffers, return the buffer that it leaves current. --- lisp/files.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 31c7f257ce7..309410ba992 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -829,7 +829,8 @@ The buffer is not selected, just returned to the caller." (setq backup-inhibited t))) (if rawfile nil - (after-find-file error (not nowarn))))) + (after-find-file error (not nowarn)) + (setq buf (current-buffer))))) buf))) (defvar after-find-file-from-revert-buffer nil) -- 2.39.2