diff lisp/hyperbole/kotl/klink.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents c53a95d3c46d
children 4be1180a9e89
line wrap: on
line diff
--- a/lisp/hyperbole/kotl/klink.el	Mon Aug 13 09:00:04 2007 +0200
+++ b/lisp/hyperbole/kotl/klink.el	Mon Aug 13 09:02:59 2007 +0200
@@ -8,7 +8,7 @@
 ;; AUTHOR:       Bob Weiner & Kellie Clark
 ;;
 ;; ORIG-DATE:    15-Nov-93 at 12:15:16
-;; LAST-MOD:      6-Mar-97 at 01:19:19 by Bob Weiner
+;; LAST-MOD:      1-Nov-95 at 23:07:37 by Bob Weiner
 ;;
 ;; DESCRIPTION:  
 ;;
@@ -65,7 +65,7 @@
 (defun klink:create (reference)
   "Insert at point an implicit link to REFERENCE.
 REFERENCE should be a cell-ref or a string containing \"filename, cell-ref\".
-See documentation for `kcell:ref-to-id' for valid cell-ref formats."
+See documentation for 'kcell:ref-to-id' for valid cell-ref formats."
   (interactive
    ;; Don't change the name or delete default-dir used here.  It is referenced
    ;; in "hargs.el" for argument getting.
@@ -98,12 +98,12 @@
 	   (if cell-ref (insert ", " cell-ref))
 	   (insert ">"))
 	  (cell-ref (insert "<@ " cell-ref ">"))
-	  (t  (error "(klink:create) Invalid reference, `%s'" reference)))))
+	  (t  (error "(klink:create) Invalid reference, '%s'" reference)))))
 
 (defun klink:at-p ()
   "Return non-nil iff point is within a klink.
-See documentation for the `actypes::link-to-kotl' function for valid klink
-formats.  Value returned is a list of: link-label, link-start-position, and
+See documentation for the `link-to-kotl' function for valid klink formats.
+Value returned is a list of: link-label, link-start-position, and
 link-end-position, (including delimiters)."
   (let (bol klink referent)
     (if (and
@@ -127,17 +127,7 @@
 	 (setq klink (hbut:label-p t "<" ">" t))
 	 (stringp (setq referent (car klink)))
 	 ;; Eliminate matches to e-mail address like, <user@domain>.
-	 (not (string-match "[^<> \t\n][!&@]" referent))
-	 ;; Eliminate matches to URLs
-	 (not (string-match "\\`[a-zA-Z]+:" referent))
-	 ;; Don't match to <HTML> and </SGML> tags.
-	 (not (and (memq major-mode
-			 (if (boundp 'id-select-markup-modes)
-			     id-select-markup-modes
-			   '(html-mode sgml-mode)))
-		   ;; Assume , followed by a number is a klink.
-		   (not (string-match ",\\s *[0-9]" referent))
-		   (string-match "\\`[a-zA-Z!/]" referent))))
+	 (not (string-match "[^<> \t\n][!&@]" referent)))
 	klink)))
 
 ;;; ************************************************************************
@@ -161,7 +151,7 @@
   < [-!&] pathname >
   < @ cell-ref >
 
-See documentation for `kcell:ref-to-id' for valid cell-ref formats."
+See documentation for 'kcell:ref-to-id' for valid cell-ref formats."
 
   (interactive "sKotl link specifier: ")
   (or (stringp link) (error "(link-to-kotl): Non-string link argument, %s"
@@ -216,7 +206,7 @@
   |viewspec
   :augment-viewspec (ignored for now)
 
-See documentation for `kcell:ref-to-id' for valid cell-ref formats."
+See documentation for 'kcell:ref-to-id' for valid cell-ref formats."
 
   (or (stringp reference)
       (error "(klink:parse): Non-string reference argument, %s"