X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=sinfo.el;fp=sinfo.el;h=e970b67ed3dca910e5b448c6ebb0c33989bd165f;hb=d6540c34270f441b2340fa72376325fdf4f20a75;hp=333d023e44b1b7df85eec26ec48cdeea47e82f12;hpb=d25efbdf9ac58586848d410c6b46754f02cc3683;p=elisp%2Fsinfo.git diff --git a/sinfo.el b/sinfo.el index 333d023..e970b67 100644 --- a/sinfo.el +++ b/sinfo.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko -;; 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: @@ -186,7 +186,7 @@ (if (string= file "()") word (concat file word) - ) "})")) + ) "})") 'fixed-case) )) (goto-char (point-min)) (while (re-search-forward @@ -201,7 +201,7 @@ (if (string= node "()") (concat "(" url ")") (concat "(@ref{" node "})") - )) + ) 'fixed-case) )) (sinfo-filter-for-standard) (goto-char (point-min)) @@ -219,13 +219,26 @@ (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 "") @@ -237,6 +250,36 @@ ) (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)