tm 7.100.
[elisp/sinfo.git] / sinfo.el
index 333d023..e970b67 100644 (file)
--- a/sinfo.el
+++ b/sinfo.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1996 MORIOKA Tomohiko
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: sinfo.el,v 3.4 1996/12/23 20:11:18 morioka Exp $
+;; Version: $Id: sinfo.el,v 3.6 1996/12/25 18:24:28 morioka Exp $
 ;; Keywords: SGML, Texinfo
 
 ;; This file is part of sinfo (SGML based info system).
@@ -19,8 +19,8 @@
 ;; General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Comment:
                   (if (string= file "()")
                       word
                     (concat file word)
-                    ) "})"))
+                    ) "})") 'fixed-case)
          ))
       (goto-char (point-min))
       (while (re-search-forward
           (if (string= node "()")
               (concat "(" url ")")
             (concat "(@ref{" node "})")
-            ))
+            ) 'fixed-case)
          ))
       (sinfo-filter-for-standard)
       (goto-char (point-min))
        (replace-match "@ref{")
        )
       (goto-char (point-min))
-      (while (search-forward "@ref{}" nil t)
-       (replace-match "")
-       )
-      (goto-char (point-min))
-      (while (search-forward "@cindex{}" nil t)
-       (replace-match "")
-       )
+      (while (re-search-forward "@cindex{\\([^}]*\\)}" nil t)
+       (let ((str (buffer-substring (match-beginning 1)(match-end 1))))
+         (replace-match "")
+         (if (string= str "")
+             ""
+           (save-excursion
+             (if (re-search-backward
+                  "@\\(chapter\\|\\(sub\\)*section\\)[ \t][^\n]*\n" nil t)
+                 (progn
+                   (goto-char (match-end 0))
+                   (insert
+                    (concat "@cindex "
+                            (mapconcat (function (lambda (chr)
+                                                   (if (eq chr ?\n)
+                                                       " "
+                                                     (char-to-string chr)
+                                                     )))
+                                       str "")
+                            "\n"))
+                   ))))))
       (goto-char (point-min))
       (while (re-search-forward "{@refill}" nil t)
        (replace-match "")
            )
          (fill-paragraph nil)
          ))
+      (goto-char (point-min))
+      (while (re-search-forward "@ref{\\([^}]*\\)}" nil t)
+       (let ((str (buffer-substring (match-beginning 1)(match-end 1))))
+         (replace-match
+          (if (string= str "")
+              ""
+            (concat "@ref{"
+                    (mapconcat (function (lambda (chr)
+                                           (if (eq chr ?\n)
+                                               " "
+                                             (char-to-string chr)
+                                             )))
+                               str "")
+                    "}")) 'fixed-case)
+         ))
+      (goto-char (point-min))
+      (while (re-search-forward "@strong{\\([^}]*\\)}" nil t)
+       (let ((str (buffer-substring (match-beginning 1)(match-end 1))))
+         (replace-match
+          (if (string= str "")
+              ""
+            (concat "@strong{"
+                    (mapconcat (function (lambda (chr)
+                                           (if (eq chr ?\n)
+                                               " "
+                                             (char-to-string chr)
+                                             )))
+                               str "")
+                    "}")
+            ))))
       (texinfo-every-node-update)
       (texinfo-all-menus-update)
       (texinfo-all-menu-titles-update)