Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emacs/slime/files/2.0_p20070816: 70slime-gentoo.el set-swank-wire-protocol-version.patch save-restriction-if-possible.patch swank.asd changelog-date.patch
Date: Fri, 01 Aug 2008 13:01:39
Message-Id: E1KOuGG-0002kW-B0@stork.gentoo.org
1 ulm 08/08/01 13:01:36
2
3 Added: 70slime-gentoo.el
4 set-swank-wire-protocol-version.patch
5 save-restriction-if-possible.patch swank.asd
6 changelog-date.patch
7 Log:
8 Reorganise directory structure. Sync swank.asd from the lisp overlay.
9 (Portage version: 2.2_rc3/cvs/Linux 2.6.25-gentoo-r6 i686)
10
11 Revision Changes Path
12 1.1 app-emacs/slime/files/2.0_p20070816/70slime-gentoo.el
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/70slime-gentoo.el?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/70slime-gentoo.el?rev=1.1&content-type=text/plain
16
17 Index: 70slime-gentoo.el
18 ===================================================================
19
20 ;;; slime site-lisp configuration
21
22 (add-to-list 'load-path "@SITELISP@")
23
24 (require 'slime-autoloads)
25 (slime-setup)
26
27 ;; this allows us not to require dev-lisp/hyperspec
28 ;; (which is non-free) as a hard dependency
29 (setq common-lisp-hyperspec-root
30 (if (file-exists-p "/usr/share/doc/hyperspec/HyperSpec")
31 "file:///usr/share/doc/hyperspec/HyperSpec/"
32 "http://www.lispworks.com/reference/HyperSpec/"))
33
34
35
36 1.1 app-emacs/slime/files/2.0_p20070816/set-swank-wire-protocol-version.patch
37
38 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/set-swank-wire-protocol-version.patch?rev=1.1&view=markup
39 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/set-swank-wire-protocol-version.patch?rev=1.1&content-type=text/plain
40
41 Index: set-swank-wire-protocol-version.patch
42 ===================================================================
43 diff -Naur slime.old/swank.lisp slime/swank.lisp
44 --- slime.old/swank.lisp 2007-06-06 08:46:20.000000000 +0200
45 +++ slime/swank.lisp 2007-06-28 18:06:14.000000000 +0200
46 @@ -1282,7 +1282,8 @@
47 value-or-values))
48 (values))
49
50 -(defvar *swank-wire-protocol-version* nil
51 +(defvar *swank-wire-protocol-version*
52 + "@SWANK-WIRE-PROTOCOL-VERSION@"
53 "The version of the swank/slime communication protocol.")
54
55 (defslimefun connection-info ()
56
57
58
59 1.1 app-emacs/slime/files/2.0_p20070816/save-restriction-if-possible.patch
60
61 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/save-restriction-if-possible.patch?rev=1.1&view=markup
62 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/save-restriction-if-possible.patch?rev=1.1&content-type=text/plain
63
64 Index: save-restriction-if-possible.patch
65 ===================================================================
66 --- slime-2.0_p20070816-orig/slime.el 2007-08-16 10:26:33.000000000 +0200
67 +++ slime-2.0_p20070816/slime.el 2007-09-08 19:32:09.000000000 +0200
68 @@ -5341,6 +5341,39 @@
69 (set-buffer buffer)
70 (goto-char (point-min))))))
71
72 +(defmacro save-restriction-if-possible (&rest body)
73 + "Very similiarly to `save-restriction'. The only difference is
74 +that it's not enforcing the restriction as strictly: It's only
75 +enforced if `point' was not moved outside of the restriction
76 +after executing BODY.
77 +
78 +Example:
79 +
80 + (progn (goto-line 1000)
81 + (narrow-to-page)
82 + (save-restriction-if-possible (widen) (goto-line 999)))
83 +
84 + In this case, the buffer is narrowed to the current page, and
85 + point is on line 999.
86 +
87 + (progn (goto-char 1000)
88 + (narrow-to-page)
89 + (save-restriction-if-possible (widen) (goto-line 1)))
90 +
91 + Whereas in this case, the buffer is widened and point is on
92 + line 1."
93 + (let ((gcfg (gensym "NARROWING-CFG+"))
94 + (gbeg (gensym "OLDBEG+"))
95 + (gend (gensym "OLDEND+")))
96 + `(let ((,gcfg (current-slime-narrowing-configuration)))
97 + (unwind-protect (progn ,@body)
98 + (let ((,gbeg (slime-narrowing-configuration.beg ,gcfg))
99 + (,gend (slime-narrowing-configuration.end ,gcfg)))
100 + (when (and (>= (point) ,gbeg) (<= (point) ,gend))
101 + (set-slime-narrowing-configuration ,gcfg)))))))
102 +
103 +(put 'save-restriction-if-possible 'lisp-indent-function 0)
104 +
105 (defun slime-goto-location-position (position)
106 (save-restriction-if-possible ; try to keep restriction if possible.
107 (widen)
108 @@ -11128,39 +11161,6 @@
109 (total (buffer-size)))
110 (or (/= beg 1) (/= end (1+ total))))))
111
112 -(defmacro save-restriction-if-possible (&rest body)
113 - "Very similiarly to `save-restriction'. The only difference is
114 -that it's not enforcing the restriction as strictly: It's only
115 -enforced if `point' was not moved outside of the restriction
116 -after executing BODY.
117 -
118 -Example:
119 -
120 - (progn (goto-line 1000)
121 - (narrow-to-page)
122 - (save-restriction-if-possible (widen) (goto-line 999)))
123 -
124 - In this case, the buffer is narrowed to the current page, and
125 - point is on line 999.
126 -
127 - (progn (goto-char 1000)
128 - (narrow-to-page)
129 - (save-restriction-if-possible (widen) (goto-line 1)))
130 -
131 - Whereas in this case, the buffer is widened and point is on
132 - line 1."
133 - (let ((gcfg (gensym "NARROWING-CFG+"))
134 - (gbeg (gensym "OLDBEG+"))
135 - (gend (gensym "OLDEND+")))
136 - `(let ((,gcfg (current-slime-narrowing-configuration)))
137 - (unwind-protect (progn ,@body)
138 - (let ((,gbeg (slime-narrowing-configuration.beg ,gcfg))
139 - (,gbeg (slime-narrowing-configuration.end ,gcfg)))
140 - (when (and (>= (point) ,gbeg) (<= (point) ,gend))
141 - (set-slime-current-narrowing-configuration ,gcfg)))))))
142 -
143 -(put 'save-restriction-if-possible 'lisp-indent-function 0)
144 -
145 ;;;;; Common Lisp-style package-qualified symbols
146
147 (defun slime-cl-symbol-name (symbol)
148
149
150
151 1.1 app-emacs/slime/files/2.0_p20070816/swank.asd
152
153 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/swank.asd?rev=1.1&view=markup
154 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/swank.asd?rev=1.1&content-type=text/plain
155
156 Index: swank.asd
157 ===================================================================
158 ;;; -*- mode: lisp; syntax: common-lisp; package: common-lisp -*-
159
160 (defpackage #:swank-system
161 (:use #:common-lisp #:asdf))
162
163 (defpackage #:swank-loader
164 (:use #:common-lisp)
165 (:export #:*source-directory*))
166
167 (in-package #:swank-system)
168
169 (defun load-user-init-file ()
170 "Load the user init file, return NIL if it does not exist."
171 (load (merge-pathnames (user-homedir-pathname)
172 (make-pathname :name ".swank" :type "lisp"))
173 :if-does-not-exist nil))
174
175 (defun load-site-init-file ()
176 (load (make-pathname :name "site-init" :type "lisp"
177 :defaults *load-truename*)
178 :if-does-not-exist nil))
179
180 (defmacro define-swank-system (sysdep-files)
181 `(defsystem swank
182 :name "Swank is the Common Lips back-end to SLIME"
183 :serial t
184 :components ((:file "swank-backend")
185 (:file "nregex")
186 ,@(mapcar #'(lambda (component)
187 (if (atom component)
188 (list :file component)
189 component))
190 sysdep-files)
191 (:file "swank"))
192 :depends-on (#+sbcl sb-bsd-sockets)
193 :perform (load-op :after (op swank)
194 (load-site-init-file)
195 (load-user-init-file))))
196
197 #+(or cmu scl sbcl openmcl lispworks allegro clisp armedbear cormanlisp ecl)
198 (define-swank-system
199 #+cmu (swank-source-path-parser swank-source-file-cache swank-cmucl)
200 #+scl (swank-source-path-parser swank-source-file-cache swank-scl)
201 #+sbcl (swank-source-path-parser swank-source-file-cache swank-sbcl swank-gray)
202 #+openmcl (metering swank-openmcl swank-gray)
203 #+lispworks (swank-lispworks swank-gray)
204 #+allegro (swank-allegro swank-gray)
205 #+clisp (xref metering swank-clisp swank-gray)
206 #+armedbear (swank-abcl)
207 #+cormanlisp (swank-corman swank-gray)
208 #+ecl (swank-source-path-parser swank-source-file-cache swank-ecl swank-gray))
209
210 #-(or cmu scl sbcl openmcl lispworks allegro clisp armedbear cormanlisp ecl)
211 (error "Your CL implementation is not supported !")
212
213 (in-package #:swank-loader)
214
215 (defparameter *source-directory*
216 (asdf:component-pathname (asdf:find-system :swank)))
217
218 ;; (funcall (intern (string :warn-unimplemented-interfaces) :swank-backend))
219
220 ;; swank.asd ends here
221
222
223
224 1.1 app-emacs/slime/files/2.0_p20070816/changelog-date.patch
225
226 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/changelog-date.patch?rev=1.1&view=markup
227 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/slime/files/2.0_p20070816/changelog-date.patch?rev=1.1&content-type=text/plain
228
229 Index: changelog-date.patch
230 ===================================================================
231 --- slime-2.0_p20070816-old/slime.el 2008-07-30 10:37:28.000000000 +0200
232 +++ slime-2.0_p20070816/slime.el 2008-07-30 10:39:53.000000000 +0200
233 @@ -113,13 +113,7 @@
234 (defun slime-changelog-date ()
235 "Return the datestring of the latest entry in the ChangeLog file.
236 Return nil if the ChangeLog file cannot be found."
237 - (let ((changelog (concat slime-path "ChangeLog")))
238 - (if (file-exists-p changelog)
239 - (with-temp-buffer
240 - (insert-file-contents changelog nil 0 100)
241 - (goto-char (point-min))
242 - (symbol-name (read (current-buffer))))
243 - nil))))
244 + "@SLIME-CHANGELOG-DATE@"))
245
246 (defvar slime-protocol-version nil)
247 (setq slime-protocol-version