Subject: rev 34 - trunk trunk/lisp

From: [email-masked]
Date: Fri, 1 Nov 2002 01:35:08 -0600

Author: loredana
Date: 2002-11-01 01:34:52 -0600 (Fri, 01 Nov 2002)
New Revision: 34

Modified:
   trunk/BUGS
   trunk/lisp/gene-clipboard.el
   trunk/lisp/gene-dialog.el
   trunk/lisp/gene-io.el
   trunk/lisp/gene-mode-tools.el
   trunk/lisp/gene-phylo.el
   trunk/lisp/gene-selection.el
   trunk/lisp/gene-seq-mode.el
   trunk/lisp/gene-undo.el
Log:
  * lisp/gene-io.el: All occurrences of `buffer-substring' become 
    `buffer-substring-no-properties'.
    [This is necessary because `buffer-substring' starting with 
    Emacs Lisp 21 copies the text properties of that part of the 
    buffer into the result string.]

  * lisp/gene-seq-mode.el: Same as lisp/gene-io.el. 

  * lisp/gene-mode-tools.el: Same.

  * lisp/gene-selection.el: Same.

  * lisp/gene-phylo.el: Same.

  * lisp/gene-dialog.el: Same.

  * lisp/gene-clipboard.el: Same.

  * BUGS: Add date of bug fix.

Modified: trunk/BUGS
==============================================================================
--- trunk/BUGS	(original)
+++ trunk/BUGS	Fri Nov  1 01:35:01 2002
@@ -1,6 +1,6 @@
   Oh Most Grandiose and Majestic Emacs, please be in -*- outline -*- mode!
 
-* [BUG] Phylogenetic browsing appears to be broken.
+* [BUG] Phylogenetic browsing appears to be broken. Fixed: 2002-10-27.
 
    Do 'ale demo-data/demo.gb demo-data/demo.phylo', then try to browse
    the tree.  See how nothing works.  For example, Mouse-1 on any

Modified: trunk/lisp/gene-undo.el
==============================================================================
--- trunk/lisp/gene-undo.el	(original)
+++ trunk/lisp/gene-undo.el	Fri Nov  1 01:35:01 2002
@@ -481,7 +481,7 @@
                                    ;; There are gaps which aren't the
                                    ;; default gap in the run, so we
                                    ;; just record it as a string.
-                                   (buffer-substring opoint (point))
+                                   (buffer-substring-no-properties opoint (point))
                                  ;; Else it's all default gaps, so
                                  ;; just record how many
                                  ocount))

Modified: trunk/lisp/gene-io.el
==============================================================================
--- trunk/lisp/gene-io.el	(original)
+++ trunk/lisp/gene-io.el	Fri Nov  1 01:35:01 2002
@@ -1934,7 +1934,7 @@
                             (text-property-any
                              id-end (point-max) 'gene-ident here-sym)))
              (organism-sym (if already-here nil here-sym))
-             (organism-name (buffer-substring id-start id-end))
+             (organism-name (buffer-substring-no-properties id-start id-end))
              (here-source (or
                            source
                            (if here-sym

Modified: trunk/lisp/gene-seq-mode.el
==============================================================================
--- trunk/lisp/gene-seq-mode.el	(original)
+++ trunk/lisp/gene-seq-mode.el	Fri Nov  1 01:35:03 2002
@@ -1,4 +1,4 @@
-;; gene-seq-mode.el (part of ale).
+bbbb;; gene-seq-mode.el (part of ale).
 ;; Copyright (C) 1993, 1994  Karl Fogel <[email-masked]>
 ;;
 ;; This software is copyrighted under the terms of the GNU General
@@ -66,14 +66,14 @@
         (backward-sexp)
         (forward-char 1)
         (let ((key-str
-               (buffer-substring
+               (buffer-substring-no-properties
                 (point)
                 (1- (re-search-forward "]\\|\""))))
               (binding-str
                ;; We don't need to include the multi-line
                ;; lambda bindings that belong to the mouse...
                (if (search-forward "'" (gene-eol-point) t)
-                   (buffer-substring
+                   (buffer-substring-no-properties
                     (progn
                       ;; Don't include the "gene-seq-" prefix:
                       (forward-word 2)
@@ -444,7 +444,7 @@
   (let* ((posn  (get sym 'gene-seq-posn))
          (start (car posn))
          (end   (car (cdr posn))))
-  (buffer-substring start end)))
+  (buffer-substring-no-properties start end)))

 
@@ -1061,7 +1061,7 @@
   (catch 'match
     (gene-seq-do-column-op
      (lambda (line)
-       (if (string-match re (buffer-substring (point) (1+ (point))))
+       (if (string-match re (buffer-substring-no-properties (point) (1+ (point))))
            (throw 'match (point))))
      (gene-current-column)
      (gene-current-line)
@@ -1077,7 +1077,7 @@
   (if (<= parg 0)
       nil
     (let* ((max-lisp-eval-depth gene-really-high-number)
-           (char-here (buffer-substring (point) (1+ (point))))
+           (char-here (buffer-substring-no-properties (point) (1+ (point))))
            (base-here (if (string-match gene-base-regexp char-here)
                           char-here))
            (re (concat "[^" gene-skip-gaps-regexp base-here "]"))
@@ -1098,7 +1098,7 @@
   (interactive "p")
   (if (<= parg 0)
       nil
-    (let* ((char-here (buffer-substring (point) (1+ (point))))
+    (let* ((char-here (buffer-substring-no-properties (point) (1+ (point))))
            (base-here (if (string-match gene-base-regexp char-here)
                           char-here))
            (re (concat "[^" gene-skip-gaps-regexp base-here "]"))

Modified: trunk/lisp/gene-mode-tools.el
==============================================================================
--- trunk/lisp/gene-mode-tools.el	(original)
+++ trunk/lisp/gene-mode-tools.el	Fri Nov  1 01:35:04 2002
@@ -1054,7 +1054,7 @@
          (end   (nth 1 posn)))
     (save-excursion
       (set-buffer gene-seq-buffer)
-      (buffer-substring start end))))
+      (buffer-substring-no-properties start end))))

 (defun gene-organism-seq-data-unpadded (organism)
@@ -1070,7 +1070,7 @@
           ""
         (goto-char end)
         (skip-chars-backward gene-skip-gaps-regexp start)
-        (buffer-substring start (point))))))
+        (buffer-substring-no-properties start (point))))))

 (defsubst gene-organism-name (&optional organism)

Modified: trunk/lisp/gene-selection.el
==============================================================================
--- trunk/lisp/gene-selection.el	(original)
+++ trunk/lisp/gene-selection.el	Fri Nov  1 01:35:05 2002
@@ -413,7 +413,7 @@
           (gene-sel-map-over-selection
            selection
            (lambda (start end)
-             (if (string-match gene-base-regexp (buffer-substring start end))
+             (if (string-match gene-base-regexp (buffer-substring-no-properties start end))
                  (or
                   (gene-locking-sequence-state-p
                    (gene-get-here-sym start) gene-locking-unlocked-state)
@@ -1963,7 +1963,7 @@
          ;; This will no longer work when disjoint selections are legal:
          (or no-pad (setq cols (cons (gene-current-column) cols)))
          (setq segment-strings
-               (cons (buffer-substring start end) segment-strings)
+               (cons (buffer-substring-no-properties start end) segment-strings)
                segment-strings
                (cons "\n" segment-strings))))

Modified: trunk/lisp/gene-phylo.el
==============================================================================
--- trunk/lisp/gene-phylo.el	(original)
+++ trunk/lisp/gene-phylo.el	Fri Nov  1 01:35:06 2002
@@ -308,10 +308,11 @@
      ((looking-at " *\\([^ ]+\\) +\\(\\([^ ].*\\) +\\)?\\(\\.\\.\\.\\|>>>\\)$")
       (list 'interior
 	    ;; name
-	    (format "%s" (buffer-substring (match-beginning 1) (match-end 1)))
+	    (format "%s" (buffer-substring-no-properties (match-beginning 1) 
+                            (match-end 1)))
 	    ;; description
 	    (if (match-beginning 3)
-		(buffer-substring (match-beginning 3) (match-end 3)))
+		(buffer-substring-no-properties (match-beginning 3) (match-end 3)))
 	    ;; selected
 	    (not (null (get-text-property (match-beginning 1) 'face)))
 	    ;; open
@@ -319,9 +320,10 @@
      ((looking-at " *\\([^ ]+\\) +\\(.*\\)$")
       (list 'leaf
 	    ;; name
-	    (format "%s" (buffer-substring (match-beginning 1) (match-end 1)))
+	    (format "%s" (buffer-substring-no-properties (match-beginning 1) 
+                           (match-end 1)))
 	    ;; description
-	    (buffer-substring (match-beginning 2) (match-end 2))
+	    (buffer-substring-no-properties (match-beginning 2) (match-end 2))
 	    ;; selected
 	    (not (null (get-text-property (match-beginning 1) 'face)))))
      (t

Modified: trunk/lisp/gene-clipboard.el
==============================================================================
--- trunk/lisp/gene-clipboard.el	(original)
+++ trunk/lisp/gene-clipboard.el	Fri Nov  1 01:35:07 2002
@@ -201,7 +201,7 @@
                     start (point-max) 'gene-cb-sequence-delimiter nil))
         (goto-char start)
         (let* ((sym  (get-text-property (point) 'gene-cb-sequence-delimiter))
-               (name (buffer-substring (point) (progn (end-of-line) (point))))
+               (name (buffer-substring-no-properties (point) (progn (end-of-line) (point))))
                (cell (cons name sym)))
           (setq lst (cons cell lst)))
         (setq start (point)))
@@ -541,9 +541,9 @@
        (insert "\n"))
      sequences)
     (x-set-selection
-     ;; todo: replace `buffer-substring' with `cons' when the Emacs
+     ;; todo: replace `buffer-substring-no-properties' with `cons' when the Emacs
      ;; bug is fixed...
-     nil (buffer-substring (point-min-marker) (point-max-marker)))
+     nil (buffer-substring-no-properties (point-min-marker) (point-max-marker)))
     (erase-buffer)))

Modified: trunk/lisp/gene-dialog.el
==============================================================================
--- trunk/lisp/gene-dialog.el	(original)
+++ trunk/lisp/gene-dialog.el	Fri Nov  1 01:35:07 2002
@@ -407,7 +407,7 @@
                ;; We depend on the intangible property skipping us to
                ;; the right place automatically.
                (goto-char (gene-dialog-beginning-of-field))
-               (let ((str (buffer-substring
+               (let ((str (buffer-substring-no-properties
                            (point) (gene-dialog-text-field-text-end))))
                  (concat " " (, option) str))))))
     (gene-dialog-insert-label label opt-func 'gene-dialog-label-face)