1. 29 Dec, 2005 1 commit
    • Karoly Lorentey's avatar
      Store local environment in frame (not terminal) parameters. · da8e8fc1
      Karoly Lorentey authored
      * src/callproc.c (child_setup, getenv_internal, Fgetenv_internal):
        Store the local environment in a frame (not terminal) parameter.
        Update doc strings.
        (syms_of_callproc): Update doc strings.
        (Qenvironment): Moved to frame.c. 
      * lisp/env.el (read-envvar-name, setenv, getenv, environment): Use frame
        parameters to store the local environment, not terminal parameters.
      * server.el (server-process-filter): Store the local environment in a
        frame (not terminal) parameter.  Do not try to decode environment
      * lisp/frame.el (make-frame): Set up the 'environment frame parameter,
        when needed.
      * src/frame.c (Qenvironment): Move here from callproc.c.
        (Fdelete_frame): Don't allow other frames to refer to a deleted frame
        in their 'environment parameter.
        (Fframe_with_environment): New function.
        (syms_of_frame): Defsubr it.  Initialize and staticpro Qenvironment.
      * frame.h (Qenvironment): Declare.
      * lisp.h (Fframe_with_environment): EXFUN it.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-467
  2. 26 Dec, 2005 1 commit
    • Karoly Lorentey's avatar
      Implement automatic terminal-local environment variables via `local-environment-variables'. · f105f403
      Karoly Lorentey authored
      * lisp/env.el (setenv, getenv): Add optional terminal parameter.  Update docs.
        (setenv): Handle `local-environment-variables'.
        (read-envvar-name): Also allow (and complete) local
        environment variables on the current terminal.
      * src/callproc.c: Include frame.h and termhooks.h, for terminal parameters.
        (Qenvironment): New constant.
        (Vlocal_environment_variables): New variable.
        (syms_of_callproc): Register and initialize them.
        (child_setup): Handle Vlocal_environment_variables.
        (getenv_internal): Add terminal parameter.  Handle
        (Fgetenv_internal): Add terminal parameter.
      * src/termhooks.h (get_terminal_param): Declare.
      * src/Makefile.in (callproc.o): Update dependencies.
      * mac/makefile.MPW (callproc.c.x): Update dependencies.
      * lisp/termdev.el (terminal-id): Make parameter optional.
        (terminal-getenv, terminal-setenv, with-terminal-environment): 
        Disable functions.
      * lisp/mule-cmds.el (set-locale-environment): Convert `terminal-getenv' calls
        to `getenv'.
      * lisp/rxvt.el (rxvt-set-background-mode): Ditto.
      * lisp/x-win.el (x-initialize-window-system): Ditto.
      * lisp/xterm.el (terminal-init-xterm): Ditto.
      * lisp/server.el (server-process-filter): Fix reference to the 'display frame
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-461
  3. 19 Nov, 2005 1 commit
    • Karoly Lorentey's avatar
      Store client's environment in terminal parameters, not server parameters. · 59e085e0
      Karoly Lorentey authored
      * lisp/loadup.el: Don't load server.
      * lisp/ldefs-boot.el: Update.
      * lib-src/emacsclient.c (main): Send environment only when a new display
        is created.
      * lisp/server.el (server-save-buffers-kill-display): Add autoload
        cookie.  Move stuff not specific to server into `save-buffers-kill-display'.
      * lisp/files.el (save-buffers-kill-display): New function.
        (ctl-x-map): Bind it to C-x C-c.
      * lisp/frame.el (terminal-getenv): New function.
      * lisp/international/mule-cmds.el (set-locale-environment): Use it.
      * lisp/frame.el (with-terminal-environment): New macro.
      * lisp/server.el (server-getenv, server-with-client-environment): Remove.
        (server-getenv-from, server-with-environment): New functions.
        (server-process-filter): Change syntax of environment
        variables.  Put environment into terminal parameters, not client parameters.
      * lisp/term/rxvt.el: Don't require server.
        (rxvt-set-background-mode): Use terminal-getenv, not server-getenv.
      * lisp/term/x-win.el (x-initialize-window-system): Ditto.
      * lisp/term/xterm.el (terminal-init-xterm): Ditto.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-443
  4. 24 Oct, 2005 1 commit
  5. 18 Sep, 2005 1 commit
  6. 11 Sep, 2005 2 commits
  7. 10 Sep, 2005 1 commit
    • Karoly Lorentey's avatar
      Fix `emacsclient -ne '(+ 2 2)'' (reported by Han Boetes), and clean up some... · 92071250
      Karoly Lorentey authored
      Fix `emacsclient -ne '(+ 2 2)'' (reported by Han Boetes), and clean up some corner cases in Emacs server.
      * lib-src/emacsclient.c (decode_options): Make --no-wait imply
        --current-frame, except when it is the only option given.  Make sure no
        frame is opened when --current-frame is set.  
        (main): Pass --current-frame to server.el.
      * lisp/server.el (server-process-filter): Handle -current-frame command.
        Don't create frames when it is given.  Don't bind X frames to the
        client when we are in -no-wait mode.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-407
  8. 06 Aug, 2005 1 commit
  9. 16 Jul, 2005 1 commit
  10. 11 Jul, 2005 1 commit
    • Karoly Lorentey's avatar
      Cosmetic changes in server.el. · 6d93dbff
      Karoly Lorentey authored
      * lisp/server.el: Use `device' instead of `display' or `display-id' in
        variable and client parameter names.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-383
  11. 06 Jul, 2005 2 commits
    • Karoly Lorentey's avatar
      Handle and document that `delete-frame' may call functions in `delete-frame-functions' twice. · e519a50b
      Karoly Lorentey authored
      * src/frame.c (syms_of_frame): Add warning to `delete-frame-functions' description.
      * lisp/frame.el (terminal-handle-delete-frame): Check that the frame is alive.
      * lisp/server.el (server-handle-delete-frame): Ditto.  Remove bogus comment.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-375
    • Karoly Lorentey's avatar
      Small enhancements. · 626ea340
      Karoly Lorentey authored
      * lisp/international/mule-cmds.el (set-locale-environment): Use
        server-getenv, not getenv.
      * lisp/server.el (server-handle-delete-frame): Add note on possible race
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-374
  12. 04 Jul, 2005 1 commit
  13. 16 May, 2005 1 commit
  14. 03 May, 2005 1 commit
    • Karoly Lorentey's avatar
      Support for ttys with different character locale settings. · 97c57fb2
      Karoly Lorentey authored
      * lisp/server.el (server-process-filter): Set locale environment
        variables from client while creating tty frames.
      * lisp/faces.el (tty-create-frame-with-faces): Call set-locale-environment.
      * lisp/international/mule-cmds.el (set-display-table-and-terminal-coding-system): 
        Add DISPLAY parameter.  Pass it to set-terminal-coding-system.
        (set-locale-environment): Add DISPLAY parameter.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-340
  15. 28 Mar, 2005 1 commit
    • Karoly Lorentey's avatar
      Fix error when creating tty clients. · 4a932511
      Karoly Lorentey authored
      * lisp/server.el (server-process-filter): Disable call to configure-display-for-locale.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-323
  16. 20 Feb, 2005 1 commit
  17. 10 Feb, 2005 1 commit
  18. 09 Feb, 2005 1 commit
  19. 04 Feb, 2005 1 commit
    • Karoly Lorentey's avatar
      Prevent emacsclient errors when Emacs is compiled without X support. · 6afdd335
      Karoly Lorentey authored
      * lisp/frame.el (make-frame-on-display): Protect condition on
        x-initialized when x-win.el is not loaded.
      * lib-src/emacsclient.c (main): Handle -window-system-unsupported
        command.  Doc update.
      * lisp/server.el (server-process-filter): Don't try to create an X frame
        when Emacs does not support it.  Improve logging.
      * lisp/server.el (server-send-string): New function.
        (server-handle-suspend-tty, server-process-filter): Use it.
      * lisp/server.el (server-process-filter, server-unquote-arg)
        (server-quote-arg): Doc updates.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-286
  20. 30 Dec, 2004 1 commit
  21. 17 Oct, 2004 1 commit
  22. 10 Oct, 2004 2 commits
    • Karoly Lorentey's avatar
      Set ncurses-related environment variables while creating a new tty frame.... · 65f64034
      Karoly Lorentey authored
      Set ncurses-related environment variables while creating a new tty frame. (Reported by Dan Nicolaescu.)
      * lisp/server.el (server-with-client-environment): New macro.
        (server-process-filter): Temporarily set ncurses-related environment
        variables to those of the client while creating a new tty frame.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-257
    • Karoly Lorentey's avatar
      Small tweaks in server.el. · 6d3a46f7
      Karoly Lorentey authored
      * lisp/server.el: Doc updates.
        (server-select-display): Remove (unused).
        (server-handle-suspend-tty): Kill the client in case of errors from
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-255
  23. 08 Oct, 2004 1 commit
  24. 23 Aug, 2004 1 commit
  25. 16 Aug, 2004 1 commit
  26. 10 Jul, 2004 1 commit
  27. 04 Jul, 2004 1 commit
    • Karoly Lorentey's avatar
      Implemented display ids for multiple emacsclients on the same tty. Plus assorted bugfixes. · b6660415
      Karoly Lorentey authored
      * lisp/frame.el (make-frame-on-display): Update doc.
      (make-frame): Handle display-id parameter.  Update doc.
      (frames-on-display-list): Update for display ids.
      (framep-on-display): Ditto.
      (suspend-frame): Use display-name, not frame-tty-name.
      (selected-display): New function.
      * lisp/server.el (server-delete-client): Use delete-display, not delete-tty.
      (server-tty-live-p, server-handle-delete-tty): Removed.
      (server-handle-delete-frame): Delete tty clients, if needed.
      (server-process-filter): Set the display parameter, and use it when appropriate.
      (server-handle-suspend-tty): Use the display parameter.
      (server-start, server-unload-hook): Removed obsolete delete-tty hook.
      * lisp/talk.el (talk): Always use talk-add-display.
      (talk-add-tty-frame, talk-handle-delete-tty): Removed.
      (talk-handle-delete-frame): New function.
      (talk-add-display): Open a new frame only if parameter was not a frame.
      * src/dispextern.h (get_display, Fdisplay_tty_type):  New prototypes.
      (Fframe_tty_type): Removed.
      * src/dispnew.c (init_display): Use Fdisplay_tty_type, not Fframe_tty_type.
      * src/frame.c (Qdisplay_id, Qdisplay_live_p): New symbols.
      (make_terminal_frame): Get display as a parameter.
      (Fmake_terminal_frame): Get/create display here; pass it to
      (Fframe_display): New function.
      (Fdelete_frame): Stop if the hook deleted the frame.
      (syms_of_frame): Register new stuff.
      * src/frame.h (Qdisplay_id, Qdisplay_live_p, make_terminal_frame):
      Updated prototypes.
      * src/keyboard.c (interrupt_signal): Updated comment.
      * src/term.c (Vdelete_tty_after_functions): Removed variable.
      (Qframe_tty_name, Qframe_tty_type): Removed.
      (next_display_id): New var.
      (tty_ring_bell): Don't do anything on suspended frames.
      (Ftty_display_color_p, Ftty_display_color_cells): Doc update.
      (get_display): New function.
      (get_tty_display): Use it.
      (get_named_tty_display): Ignore suspended displays.
      (Fframe_tty_name): Renamed to Fdisplay_name.  Handle all kinds of
      (Fframe_tty_type): Renamed to Fdisplay_tty_type.
      (init_initial_display): Set display name.
      (term_init): Allow more displays on the same device.  Set display name.
      (Fdelete_tty): Removed.
      (delete_tty): Don't run hooks.
      (create_display): Set display id.
      (delete_display): Free display name.
      (Fdelete_display, Fdisplay_live_p, Fdisplay_list): New functions.
      (Fsuspend_tty): Call hook with display id.  Doc update.
      (Fresume_tty): Refuse to resume when there is already an active display
      on the same device.  Call hook with display id.  Doc update.
      (syms_of_term): Reflect above changes.
      * src/termhooks.h (struct display): Added `id' and `name' members.
      (DISPLAY_ACTIVE_P): New macro.
      * src/xfns.c (check_x_display_info): Handle display ids.
      (Fx_create_frame): Try to get display from `display-id' parameter.
      * src/xterm.c (x_term_init): Set display name.
      (x_delete_display): Handle the case when `font_table' is NULL.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-207
  28. 03 Jul, 2004 1 commit
    • Karoly Lorentey's avatar
      Fix --no-wait in emacsclient (reported by Dan Nicolaescu). · fc2040c0
      Karoly Lorentey authored
      * lib-src/emacsclient.c (main): Don't exit prematurely on --no-wait,
        let Emacs close the connection for us.
      * lisp/server.el (server-visit-files): Don't set client-record when nowait.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-205
  29. 08 Jun, 2004 1 commit
  30. 27 May, 2004 1 commit
    • Karoly Lorentey's avatar
      Fix background mode initialization on client tty frames (rep. by Dan Nicolaescu). · 3a258474
      Karoly Lorentey authored
      lisp/server.el (server-process-filter): Add the client parameter to
      the initialization parameters of new frames.
      (server-getenv): Use the 'client frame parameter and not
      server-clients-with to get the client; server-getenv is called during
      frame initialization. (Dan Nicolaescu)
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-179
  31. 25 May, 2004 1 commit
  32. 23 May, 2004 2 commits
    • Karoly Lorentey's avatar
      Use the remote locale for terminal & keyboard coding system. · 14de9163
      Karoly Lorentey authored
      lisp/international/mule-cmds.el (set-locale-translation-file-name)
      (get-locale-real-name, get-locale-coding-system)
      (configure-display-for-locale): New functions.
      (set-locale-environment): Factored contents into separate functions.
      lisp/server.el (server-process-filter): Call
      configure-display-for-locale after creating a new terminal frame.
      lisp/startup.el (command-line): Call set-locale-translation-file-name.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-171
    • Karoly Lorentey's avatar
      Fix environment variables on emacsclient frames. · 44070fdf
      Karoly Lorentey authored
      lisp/server.el (server-getenv): Fix string lookup in alist.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-170
  33. 18 May, 2004 1 commit
  34. 08 May, 2004 1 commit
    • Karoly Lorentey's avatar
      Fixed environment variable handling during terminal initialization. · 2cd1371d
      Karoly Lorentey authored
      lisp/server.el (server-getenv): New inline function.
      lisp/term/rxvt.el (rxvt-set-background-mode): Use server-getenv
      instead of getenv.
      lisp/term/x-win.el (x-initialize-window-system): Ditto.
      lisp/term/xterm.el (xterm-rxvt-set-background-mode): Ditto.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-158
  35. 19 Apr, 2004 2 commits
    • Karoly Lorentey's avatar
      Fix one more case of the previous error. · de93c791
      Karoly Lorentey authored
      lisp/server.el (server-delete-client): Added noframe parameter.
      (server-handle-delete-frame): Use it.
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-149
    • Karoly Lorentey's avatar
      Fix error on deleting an emacsclient terminal (Dan Nicolaescu). · 6ed9e43a
      Karoly Lorentey authored
      lisp/server.el (server-delete-client): Check that the buffer is live
      before switching to it.  Also, check that the tty display still has
      live buffers before deleting it.  
      (server-handle-delete-frame): Don't do anything if the frame was on a
      tty device (reported by Dan Nicolaescu).
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-148