changeset 18682:28f77aef27b2

(url): Define end-op property again. Wrap end-op and beginning-op lambdas with `function', not quote.
author Richard M. Stallman <rms@gnu.org>
date Wed, 09 Jul 1997 00:04:00 +0000
parents a30375801ad7
children ec9c20bede0c
files lisp/thingatpt.el
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/thingatpt.el	Tue Jul 08 23:57:43 1997 +0000
+++ b/lisp/thingatpt.el	Wed Jul 09 00:04:00 1997 +0000
@@ -299,16 +299,18 @@
 	(goto-char match)
 	(looking-at regexp)))))
 
-;; Can't do it sensibly?
-;(put 'url 'end-op    
-;     '(lambda () (skip-chars-forward (concat ":" thing-at-point-url-chars))
-;	(skip-chars-backward ".,:")))
+(put 'url 'end-op
+     (function (lambda ()
+		 (let ((bounds (thing-at-point-bounds-of-url-at-point)))
+		   (if bounds
+		       (goto-char (cdr bounds))
+		     (error "No URL here"))))))
 (put 'url 'beginning-op
-     '(lambda ()
-	(let ((bounds (thing-at-point-bounds-of-url-at-point)))
-	  (if bounds
-	      (goto-char (car bounds))
-	    (error "No URL here")))))
+     (function (lambda ()
+		 (let ((bounds (thing-at-point-bounds-of-url-at-point)))
+		   (if bounds
+		       (goto-char (car bounds))
+		     (error "No URL here"))))))
 
 ;;  Whitespace