2 ;;; $Id: tl-str.el,v 1.7 1994/09/25 21:33:52 morioka Exp $
7 (defun fill-cited-region (beg end)
16 (narrow-to-region beg end)
17 (goto-char (point-min))
19 (and (re-search-forward "^[^ \t>]*[>|]+[ \t#]*" nil t)
20 (re-search-forward "^[^ \t>]*[>|]+[ \t#]*" nil t)
21 (buffer-substring (match-beginning 0)
24 (pat (concat "\n" fill-prefix))
26 (goto-char (point-min))
27 (while (search-forward pat nil t)
30 (goto-char (point-min))
31 (fill-region (point-min) (point-max))
34 (defun replace-top-string (&optional old new)
37 (setq old (read-string "old string is ? "))
40 (setq new (read-string "new string is ? "))
42 (while (re-search-forward (concat "^" (regexp-quote old)) nil t)
46 (defun replace-as-filename (str)
48 (i 0)(len (length str))
51 (setq chr (elt str i))
52 (if (or (and (<= ?+ chr)(<= chr ?.))
53 (and (<= ?0 chr)(<= chr ?:))
55 (and (<= ?@ chr)(<= chr ?\[))
56 (and (<= ?\] chr)(<= chr ?_))
57 (and (<= ?a chr)(<= chr ?{))
58 (and (<= ?} chr)(<= chr ?~))
60 (setq dest (concat dest
61 (char-to-string chr)))
67 (defun symbol-concat (a b)
80 (defun top-string-match (pat str)
82 (concat "^" (regexp-quote pat))
84 (list pat (substring str (match-end 0)))
87 (defun middle-string-match (pat str)
90 (if (string-match (regexp-quote pat) str)
91 (let ((b (match-beginning 0))
93 (list (if (not (= b 0))
97 (if (> (length str) e)