[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Sat Oct 24 09:47:46 UTC 2009


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv16472

Modified Files:
	slime.el ChangeLog 
Log Message:
	* slime.el (slime-search-property): Add parameter to get value at
	point propery changed.
	(slime-find-next-note): Use it.
	(slime-find-previous-note): Ditto.


--- /project/slime/cvsroot/slime/slime.el	2009/10/24 09:33:16	1.1234
+++ /project/slime/cvsroot/slime/slime.el	2009/10/24 09:47:46	1.1235
@@ -3671,12 +3671,12 @@
 (defun slime-find-next-note ()
   "Go to the next position with the `slime-note' text property.
 Retuns the note overlay if such a position is found, otherwise nil."
-  (slime-search-property 'slime-note))
+  (slime-search-property 'slime-note nil #'slime-note-at-point))
 
 (defun slime-find-previous-note ()
   "Go to the next position with the `slime-note' text property.
 Retuns the note overlay if such a position is found, otherwise nil."
-  (slime-search-property 'slime-note t))
+  (slime-search-property 'slime-note t #'slime-note-at-point))
 
 
 ;;;; Arglist Display
@@ -5054,18 +5054,22 @@
   "Goto the previous cross-reference location."
   (slime-goto-next-xref t))
 
-(defun slime-search-property (prop &optional backward)
+(defun slime-search-property (prop &optional backward prop-value-fn)
   "Search the next text range where PROP is non-nil.
-If found, return the value of the property; otherwise return nil.
+If found, call PROP-VALUE-FN if given, or return the value of the
+property; otherwise return nil.
 If BACKWARD is non-nil, search backward."
   (let ((next-candidate (if backward 
                             #'previous-single-char-property-change
                             #'next-single-char-property-change))
+        (prop-value-fn  (or prop-value-fn
+                            #'(lambda ()
+                                (get-text-property (point) prop))))
         (start (point))
         (prop-value))
     (while (progn 
              (goto-char (funcall next-candidate (point) prop))
-             (not (or (setq prop-value (get-text-property (point) prop)) 
+             (not (or (setq prop-value (funcall prop-value-fn)) 
                       (eobp) 
                       (bobp)))))
     (if prop-value
--- /project/slime/cvsroot/slime/ChangeLog	2009/10/24 09:33:16	1.1884
+++ /project/slime/cvsroot/slime/ChangeLog	2009/10/24 09:47:46	1.1885
@@ -1,5 +1,12 @@
 2009-10-24  Tobias C. Rittweiler <tcr at freebits.de>
 
+	* slime.el (slime-search-property): Add parameter to get value at
+	point propery changed.
+	(slime-find-next-note): Use it.
+	(slime-find-previous-note): Ditto.
+
+2009-10-24  Tobias C. Rittweiler <tcr at freebits.de>
+
 	New command C-M-, to go to previous xref location.
 
 	[Old command C-M-. to go to next xref location.]





More information about the slime-cvs mailing list