]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert previous change (commit mistake).
authorChong Yidong <cyd@stupidchicken.com>
Sat, 10 Jan 2009 13:07:04 +0000 (13:07 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 10 Jan 2009 13:07:04 +0000 (13:07 +0000)
lisp/frame.el
lisp/server.el

index e886a5179285cd14b8a0d087b14c69254b7300bd..c34e5d361f23d0fdb859f35a9859210be259cdb4 100644 (file)
@@ -648,6 +648,23 @@ The optional argument PARAMETERS specifies additional frame parameters."
         (make-frame `((window-system . x)
                       (display . ,display) . ,parameters)))))
 
+(defun make-frame-on-tty (tty type &optional parameters)
+  "Make a frame on terminal device TTY.
+TTY should be the file name of the tty device to use.  TYPE
+should be the terminal type string of TTY, for example \"xterm\"
+or \"vt100\".  The optional third argument PARAMETERS specifies
+additional frame parameters."
+  ;; Use "F" rather than "f", in case the device does not exist, as
+  ;; far as the filesystem is concerned.
+  (interactive "FOpen frame on tty device: \nsTerminal type of %s: ")
+  (unless tty
+    (error "Invalid terminal device"))
+  (unless type
+    (error "Invalid terminal type"))
+  (if (eq window-system 'pc)
+      (make-frame `((window-system . pc) (tty . ,tty) (tty-type . ,type) . ,parameters))
+    (make-frame `((window-system . nil) (tty . ,tty) (tty-type . ,type) . ,parameters))))
+
 (declare-function x-close-connection "xfns.c" (terminal))
 
 (defun close-display-connection (display)
index 69137c6a60e5efea054d1452acd5a6f898f55d0c..6dc84be0e767ebf7d09c372a95466776308cbb83 100644 (file)
@@ -615,8 +615,6 @@ Server mode runs a process that accepts commands from the
 
 (defun server-create-tty-frame (tty type proc)
   (add-to-list 'frame-inherited-parameters 'client)
-  (unless tty  (error "Invalid terminal device"))
-  (unless type (error "Invalid terminal type"))
   (let ((frame
          (server-with-environment (process-get proc 'env)
              '("LANG" "LC_CTYPE" "LC_ALL"
@@ -627,24 +625,22 @@ Server mode runs a process that accepts commands from the
                "TERMINFO_DIRS" "TERMPATH"
                ;; rxvt wants these
                "COLORFGBG" "COLORTERM")
-          (let ((ws (if (eq window-system 'pc) 'pc nil))
-                ;; Ignore nowait here; we always need to clean up
-                ;; opened ttys when the client dies.
-                (parameters `((client . ,proc)
-                              ;; This is left over from an earlier
-                              ;; attempt at causing a process run in
-                              ;; the server process to use the
-                              ;; environment of the client process.
-                              ;; It has no effect now and to make it
-                              ;; work we'd need to decide how to make
-                              ;; process-environment interact with
-                              ;; client envvars, and then to change
-                              ;; the C functions `child_setup' and
-                              ;; `getenv_internal' accordingly.
-                              (environment . ,(process-get proc 'env)))))
-            (make-frame `((window-system . ,ws)
-                          (tty . ,tty)
-                          (tty-type . ,type) . ,parameters))))))
+           (make-frame-on-tty tty type
+                              ;; Ignore nowait here; we always need to
+                              ;; clean up opened ttys when the client dies.
+                              `((client . ,proc)
+                                ;; This is a leftover from an earlier
+                                ;; attempt at making it possible for process
+                                ;; run in the server process to use the
+                                ;; environment of the client process.
+                                ;; It has no effect now and to make it work
+                                ;; we'd need to decide how to make
+                                ;; process-environment interact with client
+                                ;; envvars, and then to change the
+                                ;; C functions `child_setup' and
+                                ;; `getenv_internal' accordingly.
+                                (environment . ,(process-get proc 'env)))))))
+
     ;; ttys don't use the `display' parameter, but callproc.c does to set
     ;; the DISPLAY environment on subprocesses.
     (set-frame-parameter frame 'display