Mercurial > emacs
annotate etc/emacs.csh @ 83103:efc0b56b83d9
Another server.el overhaul.
lib-src/emacsclient.c (xstrdup): New function.
(quote_argument): Use xmalloc, not malloc.
(main): Send environment variable values.
lisp/server.el (server-clients): Documentation update.
(server-ttys, server-frames): Removed.
(server-client, server-client-get, server-client-set)
(server-clients-with, server-add-client)
(server-delete-client): New functions.
(server-sentinel, server-handle-suspend-tty)
(server-handle-delete-tty, server-handle-delete-frame)
(server-start, server-process-filter, server-visit-files)
(server-buffer-done, server-kill-buffer-query-function)
(server-kill-emacs-query-function, server-switch-buffer): Use them.
(server-log): Handle both kinds of client references.
(server-start): Set up all hooks here.
(server-process-filter): Cleanup. Store version in client.
Handle -env commands for passing environment variable values.
(server-buffer-done): Don't close clients that were created bufferless.
(server-switch-buffer): Only look at frameless clients.
Don't switch away from current buffer if there is no next-buffer.
(server-unload-hook): Remove frame/tty hooks, too.
lisp/server.el (server-quote-arg, server-unquote-arg)
(server-process-filter, server-kill-buffer-query-function)
(server-kill-emacs-query-function): Doc update.
(server-buffer-done, server-switch-buffer): Use buffer-live-p, not
buffer-name.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-143
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 18 Apr 2004 01:34:11 +0000 |
parents | 695cf19ef79e |
children | 3681678d3d86 375f2633d815 |
rev | line source |
---|---|
25853 | 1 # This defines a csh command named `edit' which resumes an |
2 # existing Emacs or starts a new one if none exists. | |
3 # One way or another, any arguments are passed to Emacs to specify files | |
4 # (provided you have loaded `resume.el'). | |
5 # - Michael DeCorte | |
6 | |
7 # These are the possible values of $whichjob | |
8 # 1 = new ordinary emacs (the -nw is so that it doesn't try to do X) | |
9 # 2 = resume emacs | |
10 # 3 = new emacs under X (-i is so that you get a reasonable icon) | |
11 # 4 = resume emacs under X | |
12 # 5 = new emacs under suntools | |
13 # 6 = resume emacs under suntools | |
14 # 7 = new emacs under X and suntools - doesn't make any sense, so use X | |
15 # 8 = resume emacs under X and suntools - doesn't make any sense, so use X | |
16 set EMACS_PATTERN="^\[[0-9]\] . Stopped ............ $EMACS" | |
17 | |
18 alias edit 'set emacs_command=("emacs -nw \!*" "fg %emacs" "emacs -i \!* &"\ | |
19 "emacsclient \!* &" "emacstool \!* &" "emacsclient \!* &" "emacs -i \!* &"\ | |
20 "emacsclient \!* &") ; \ | |
21 jobs >! $HOME/.jobs; grep "$EMACS_PATTERN" < $HOME/.jobs >& /dev/null; \ | |
22 @ isjob = ! $status; \ | |
23 @ whichjob = 1 + $isjob + $?DISPLAY * 2 + $?WINDOW_PARENT * 4; \ | |
24 test -S ~/.emacs_server && emacsclient \!* \ | |
25 || echo `pwd` \!* >! ~/.emacs_args && eval $emacs_command[$whichjob]' | |
52401 | 26 |
27 # arch-tag: 433d58df-15b9-446f-ad37-f0393e3a23d4 |