* Documentation/topdocs/AUTHORS.texi (AUTHORS): Updated contact
[lilypond.git] / emacsclient.patch
blobe2df3ede6bdefa66dd983229a921cb502efa5807
1 diff -ur emacs-20.5/lib-src/ChangeLog emacs-hanwen/lib-src/ChangeLog
2 --- emacs-20.5/lib-src/ChangeLog Fri Dec 10 17:25:36 1999
3 +++ emacs-hanwen/lib-src/ChangeLog Sun Jul 16 23:00:54 2000
4 @@ -1,3 +1,7 @@
5 +2000-07-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 +
7 + * emacsclient.c: Added support for +LINE:COLUMN style arguments.
9 1999-12-04 Gerd Moellmann <gerd@gnu.org>
11 * Version 20.5 released.
12 Only in emacs-hanwen/lib-src: ChangeLog~
13 diff -ur emacs-20.5/lib-src/emacsclient.c emacs-hanwen/lib-src/emacsclient.c
14 --- emacs-20.5/lib-src/emacsclient.c Wed Nov 3 14:12:46 1999
15 +++ emacs-hanwen/lib-src/emacsclient.c Sun Jul 16 22:10:35 2000
16 @@ -27,6 +27,7 @@
17 #undef close
18 #undef signal
20 +#include <ctype.h>
21 #include <stdio.h>
22 #include <getopt.h>
23 #ifdef STDC_HEADERS
24 @@ -323,7 +324,7 @@
25 if (*argv[i] == '+')
27 char *p = argv[i] + 1;
28 - while (*p >= '0' && *p <= '9') p++;
29 + while (isdigit (*p) || *p == ':') p++;
30 if (*p != 0)
31 fprintf (out, "%s/", quote_file_name (cwd));
33 @@ -466,7 +467,8 @@
34 if (*modified_arg == '+')
36 char *p = modified_arg + 1;
37 - while (*p >= '0' && *p <= '9') p++;
38 + while (isdigit (*p) || *p == ':')
39 + p++;
40 if (*p != 0)
41 need_cwd = 1;
43 Only in emacs-hanwen/lib-src: emacsclient.c~
44 diff -ur emacs-20.5/lib-src/emacsserver.c emacs-hanwen/lib-src/emacsserver.c
45 --- emacs-20.5/lib-src/emacsserver.c Mon Feb 22 21:44:14 1999
46 +++ emacs-hanwen/lib-src/emacsserver.c Sun Jul 16 22:09:52 2000
47 @@ -61,6 +61,7 @@
48 #include <errno.h>
49 #include <sys/stat.h>
52 #ifdef HAVE_UNISTD_H
53 #include <unistd.h>
54 #endif
55 Only in emacs-hanwen/lib-src: emacsserver.c~
56 Only in emacs-hanwen/lib-src: suf.el~
57 diff -ur emacs-20.5/lisp/ChangeLog emacs-hanwen/lisp/ChangeLog
58 --- emacs-20.5/lisp/ChangeLog Fri Dec 10 17:25:02 1999
59 +++ emacs-hanwen/lisp/ChangeLog Sun Jul 16 23:00:04 2000
60 @@ -1,3 +1,8 @@
61 +2000-07-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
63 + * server.el (server-process-filter,server-visit-files): add support for "LINE:COLUMN"
64 + style emacsclient calls.
66 1999-12-04 Gerd Moellmann <gerd@gnu.org>
68 * Version 20.5 released.
69 Only in emacs-hanwen/lisp: ChangeLog~
70 diff -ur emacs-20.5/lisp/server.el emacs-hanwen/lisp/server.el
71 --- emacs-20.5/lisp/server.el Sat Mar 13 01:20:25 1999
72 +++ emacs-hanwen/lisp/server.el Sun Jul 16 23:04:41 2000
73 @@ -215,7 +215,8 @@
74 default-file-name-coding-system)))
75 client nowait
76 (files nil)
77 - (lineno 1))
78 + (lineno 1)
79 + (columnno 0))
80 ;; Remove this line from STRING.
81 (setq string (substring string (match-end 0)))
82 (if (string-match "^Error: " request)
83 @@ -232,9 +233,17 @@
84 (setq request (substring request (match-end 0)))
85 (if (string-match "\\`-nowait" arg)
86 (setq nowait t)
87 - (if (string-match "\\`\\+[0-9]+\\'" arg)
88 - ;; ARG is a line number option.
89 - (setq lineno (read (substring arg 1)))
90 + (cond
91 + ;; ARG is a line number option.
92 + ((string-match "\\`\\+[0-9]+\\'" arg)
93 + (setq lineno (read (substring arg 1)))
94 + )
95 + ;; ARG is line number / column option.
96 + ((string-match "\\`\\+[0-9]+:[0-9]+\\'" arg)
97 + (setq lineno (read (substring arg 1 (string-match ":" arg))))
98 + (setq columnno (read (substring arg (+ 1 (string-match ":" arg)))))
99 + )
100 + (t
101 ;; ARG is a file name.
102 ;; Collapse multiple slashes to single slashes.
103 (setq arg (command-line-normalize-file-name arg))
104 @@ -253,9 +262,11 @@
105 (if coding-system
106 (setq arg (decode-coding-string arg coding-system)))
107 (setq files
108 - (cons (list arg lineno)
109 + (cons (list arg lineno columnno)
110 files))
111 - (setq lineno 1)))))
112 + (setq lineno 1)
113 + (setq columnno 0)
114 + )))))
115 (server-visit-files files client nowait)
116 ;; CLIENT is now a list (CLIENTNUM BUFFERS...)
117 (or nowait
118 @@ -267,9 +278,11 @@
119 ;; Save for later any partial line that remains.
120 (setq server-previous-string string))
124 (defun server-visit-files (files client &optional nowait)
125 "Finds FILES and returns the list CLIENT with the buffers nconc'd.
126 -FILES is an alist whose elements are (FILENAME LINENUMBER).
127 +FILES is an alist whose elements are (FILENAME LINENUMBER COLUMNNUMBER).
128 NOWAIT non-nil means this client is not waiting for the results,
129 so don't mark these buffers specially, just visit them normally."
130 ;; Bind last-nonmenu-event to force use of keyboard, not mouse, for queries.
131 @@ -297,6 +310,7 @@
132 (set-buffer (find-file-noselect filen))
133 (run-hooks 'server-visit-hook)))
134 (goto-line (nth 1 (car files)))
135 + (move-to-column (nth 2 (car files)))
136 (if (not nowait)
137 (setq server-buffer-clients
138 (cons (car client) server-buffer-clients)))
139 @@ -304,6 +318,7 @@
140 (setq files (cdr files)))
141 (set-buffer obuf))
142 (nconc client client-record)))
145 (defun server-buffer-done (buffer &optional for-killing)
146 "Mark BUFFER as \"done\" for its client(s).
147 Only in emacs-hanwen/lisp: server.el.orig
148 Only in emacs-hanwen/lisp: server.el~