summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-05-04 16:31:28 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-05-04 16:31:50 -0700
commita35639015c532c1fe418420cb8cb1da9053b4162 (patch)
tree89b9098f701ad9a6fbed0c061608bb0b56c08fe2
parent8368610ff5b384b6c4ff08414bf33be5c59ee703 (diff)
downloademacs-a35639015c532c1fe418420cb8cb1da9053b4162.tar.gz
Revert "server-execute: Initialize the *scratch* buffer"
This reverts commit f2d2fe6fc8ef0b6087c4a8a69d05a4e521b23047. To be replaced with factoring out *scratch* buffer initialization.
-rw-r--r--lisp/server.el15
1 files changed, 4 insertions, 11 deletions
diff --git a/lisp/server.el b/lisp/server.el
index fc6991df5f1..763cf27f7ac 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -82,9 +82,7 @@
;;; Code:
-(eval-when-compile
- (require 'cl-lib)
- (require 'subr-x))
+(eval-when-compile (require 'cl-lib))
(defgroup server nil
"Emacs running as a server process."
@@ -1368,14 +1366,9 @@ The following commands are accepted by the client:
(find-file-noselect initial-buffer-choice))
((functionp initial-buffer-choice)
(funcall initial-buffer-choice)))))
- (if (buffer-live-p buf)
- (switch-to-buffer buf 'norecord)
- (if-let ((scratch (get-buffer "*scratch*")))
- (switch-to-buffer scratch 'norecord)
- (switch-to-buffer (get-buffer-create "*scratch*") 'norecord)
- (when initial-scratch-message
- (insert initial-scratch-message))
- (funcall initial-major-mode)))))
+ (switch-to-buffer
+ (if (buffer-live-p buf) buf (get-buffer-create "*scratch*"))
+ 'norecord)))
;; Delete the client if necessary.
(cond