Mercurial > hg > xemacs-beta
comparison lisp/packages/gnuserv.el @ 120:cca96a509cfe r20-1b12
Import from CVS: tag r20-1b12
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:25:29 +0200 |
parents | 8619ce7e4c50 |
children | b980b6286996 |
comparison
equal
deleted
inserted
replaced
119:d101af7320b8 | 120:cca96a509cfe |
---|---|
60 ; ported kill-*-query functions from server.el (and made it optional) | 60 ; ported kill-*-query functions from server.el (and made it optional) |
61 ; synced other behaviour with server.el | 61 ; synced other behaviour with server.el |
62 | 62 |
63 | 63 |
64 | 64 |
65 (defgroup gnuserv nil | |
66 "Lisp interface between Emacs and gnuserv" | |
67 :prefix "server-" | |
68 :group 'processes | |
69 :group 'terminals) | |
70 | |
71 | |
65 (defconst gnuserv-rcs-header-id "!Header: gnuserv.el,v 2.1 95/02/16 12:00:16 arup alpha !") | 72 (defconst gnuserv-rcs-header-id "!Header: gnuserv.el,v 2.1 95/02/16 12:00:16 arup alpha !") |
66 | 73 |
67 | 74 |
68 ;; server.el and gnuserv.el can't coexist because of conflicting defvar's and | 75 ;; server.el and gnuserv.el can't coexist because of conflicting defvar's and |
69 ;; function names. | 76 ;; function names. |
76 (defvar gnuserv-frame nil | 83 (defvar gnuserv-frame nil |
77 "*If non-nil, the frame to be used to display all edited files. | 84 "*If non-nil, the frame to be used to display all edited files. |
78 If nil, then a new frame is created for each file edited. | 85 If nil, then a new frame is created for each file edited. |
79 This variable has no effect in XEmacs versions older than 19.9.") | 86 This variable has no effect in XEmacs versions older than 19.9.") |
80 | 87 |
81 (defvar server-done-function 'kill-buffer | 88 (defcustom server-done-function 'kill-buffer |
82 "*A function of one argument, a buffer, which removes the buffer after editing. | 89 "*A function of one argument, a buffer, which removes the buffer after editing. |
83 Functions such as 'kill-buffer' and 'bury-buffer' are good values. See also | 90 Functions such as 'kill-buffer' and 'bury-buffer' are good values. See also |
84 `server-done-temp-file-function'") | 91 `server-done-temp-file-function'" |
85 | 92 :type 'function |
86 (defvar server-done-temp-file-function 'kill-buffer | 93 :group 'gnuserv) |
94 | |
95 (defcustom server-done-temp-file-function 'kill-buffer | |
87 "*A function of one argument, a buffer, which removes the buffer after editing a | 96 "*A function of one argument, a buffer, which removes the buffer after editing a |
88 temporary file. Functions such as 'kill-buffer' and 'bury-buffer' are | 97 temporary file. Functions such as 'kill-buffer' and 'bury-buffer' are |
89 good values. See also `server-done-function'") | 98 good values. See also `server-done-function'" |
90 | 99 :type 'function |
91 (defvar server-program "gnuserv" | 100 :group 'gnuserv) |
92 "*The program to use as the edit server") | 101 |
93 | 102 (defcustom server-program "gnuserv" |
94 | 103 "*The program to use as the edit server" |
95 (defvar server-visit-hook nil | 104 :type 'string |
96 "*List of hooks to call when visiting a file for the Emacs server.") | 105 :group 'gnuserv) |
106 | |
107 | |
108 (defcustom server-visit-hook nil | |
109 "*List of hooks to call when visiting a file for the Emacs server." | |
110 :type 'hook | |
111 :group 'gnuserv) | |
97 | 112 |
98 ;; defined by server.el but obsolete? | 113 ;; defined by server.el but obsolete? |
99 ;; (defvar server-switch-hook nil | 114 ;; (defvar server-switch-hook nil |
100 ;; "*List of hooks to call when switching to a buffer for the Emacs server.") | 115 ;; "*List of hooks to call when switching to a buffer for the Emacs server.") |
101 | 116 |
102 (defvar server-done-hook nil | 117 (defcustom server-done-hook nil |
103 "*List of hooks to call when done editing a buffer for the Emacs server.") | 118 "*List of hooks to call when done editing a buffer for the Emacs server." |
119 :type 'hook | |
120 :group 'gnuserv) | |
104 | 121 |
105 | 122 |
106 (defvar server-process nil | 123 (defvar server-process nil |
107 "The current server process") | 124 "The current server process") |
108 | 125 |
119 "List of current server clients. | 136 "List of current server clients. |
120 Each element is (CLIENTID BUFFER...) where CLIENTID is an integer | 137 Each element is (CLIENTID BUFFER...) where CLIENTID is an integer |
121 that can be given to the server process to identify a client. | 138 that can be given to the server process to identify a client. |
122 When a buffer is killed, it is removed from this list.") | 139 When a buffer is killed, it is removed from this list.") |
123 | 140 |
124 (defvar server-kill-quietly nil | 141 (defcustom server-kill-quietly nil |
125 "If this variable is set then don't confirm kills of buffers with | 142 "If this variable is set then don't confirm kills of buffers with |
126 clients attached") | 143 clients attached" |
144 :type 'boolean | |
145 :group 'gnuserv) | |
127 | 146 |
128 | 147 |
129 (defvar server-buffer-clients nil | 148 (defvar server-buffer-clients nil |
130 "List of client ids for clients requesting editing of the current buffer.") | 149 "List of client ids for clients requesting editing of the current buffer.") |
131 | 150 |
132 (defvar server-temp-file-regexp "^/tmp/Re\\|/draft$" | 151 (defcustom server-temp-file-regexp "^/tmp/Re\\|/draft$" |
133 "*Regexp which should match filenames of temporary files | 152 "*Regexp which should match filenames of temporary files |
134 which are deleted and reused after each edit | 153 which are deleted and reused after each edit |
135 by the programs that invoke the emacs server.") | 154 by the programs that invoke the emacs server." |
136 | 155 :type 'regexp |
137 (defvar server-make-temp-file-backup nil | 156 :group 'gnuserv) |
138 "Non-nil makes the server backup temporary files also") | 157 |
158 (defcustom server-make-temp-file-backup nil | |
159 "Non-nil makes the server backup temporary files also" | |
160 :type 'regexp | |
161 :group 'gnuserv) | |
139 | 162 |
140 (make-variable-buffer-local 'server-buffer-clients) | 163 (make-variable-buffer-local 'server-buffer-clients) |
141 (setq-default server-buffer-clients nil) | 164 (setq-default server-buffer-clients nil) |
142 (or (assq 'server-buffer-clients minor-mode-alist) | 165 (or (assq 'server-buffer-clients minor-mode-alist) |
143 (setq minor-mode-alist (cons '(server-buffer-clients " Server") | 166 (setq minor-mode-alist (cons '(server-buffer-clients " Server") |