# HG changeset patch # User Richard M. Stallman # Date 868406640 0 # Node ID 28f77aef27b2602413e3d3068391522d6a45ae6d # Parent a30375801ad7232abb2edf30d37be8a4df43b537 (url): Define end-op property again. Wrap end-op and beginning-op lambdas with `function', not quote. diff -r a30375801ad7 -r 28f77aef27b2 lisp/thingatpt.el --- 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