]> git.eshelyaron.com Git - emacs.git/commitdiff
(url): Define end-op property again. Wrap end-op
authorRichard M. Stallman <rms@gnu.org>
Wed, 9 Jul 1997 00:04:00 +0000 (00:04 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 9 Jul 1997 00:04:00 +0000 (00:04 +0000)
and beginning-op lambdas with `function', not quote.

lisp/thingatpt.el

index 4ea50c5dd235879d2964ac10f8851c5bf2fdbcc5..88a2807538bb37a6d99667eb3d52fe4e77c4bb53 100644 (file)
@@ -299,16 +299,18 @@ point."
        (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