Mercurial > emacs
annotate lisp/textmodes/texinfmt.el @ 28923:dcafe3c9cd6c
(sh-while-getopts) <sh>: Handle case that
user-specified option string is empty.
| author | Gerd Moellmann <gerd@gnu.org> |
|---|---|
| date | Mon, 15 May 2000 20:14:39 +0000 |
| parents | 14cc47ddd47a |
| children | 6619db0066d9 |
| rev | line source |
|---|---|
| 13337 | 1 ;;; texinfmt.el --- format Texinfo files into Info files. |
| 2 | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3 ;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4 ;; 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. |
| 841 | 5 |
| 25278 | 6 ;; Maintainer: Robert J. Chassell <bug-texinfo@gnu.org> |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
7 ;; Keywords: maint, tex, docs |
| 189 | 8 |
| 13337 | 9 ;; This file is part of GNU Emacs. |
| 189 | 10 |
| 11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
| 12 ;; it under the terms of the GNU General Public License as published by | |
|
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
657
diff
changeset
|
13 ;; the Free Software Foundation; either version 2, or (at your option) |
| 189 | 14 ;; any later version. |
| 15 | |
| 16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
| 17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 ;; GNU General Public License for more details. | |
| 20 | |
| 21 ;; You should have received a copy of the GNU General Public License | |
| 14169 | 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
| 23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| 24 ;; Boston, MA 02111-1307, USA. | |
| 189 | 25 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
26 ;;; Code: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
27 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
28 ;;; Emacs lisp functions to convert Texinfo files to Info files. |
|
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
657
diff
changeset
|
29 |
|
19630
95743e18a01c
(defgroup, defcustom): Add Emacs 19 compatibility definitions.
Richard M. Stallman <rms@gnu.org>
parents:
18908
diff
changeset
|
30 (or (fboundp 'defgroup) |
|
95743e18a01c
(defgroup, defcustom): Add Emacs 19 compatibility definitions.
Richard M. Stallman <rms@gnu.org>
parents:
18908
diff
changeset
|
31 (defmacro defgroup (&rest ignore) nil)) |
|
95743e18a01c
(defgroup, defcustom): Add Emacs 19 compatibility definitions.
Richard M. Stallman <rms@gnu.org>
parents:
18908
diff
changeset
|
32 |
|
95743e18a01c
(defgroup, defcustom): Add Emacs 19 compatibility definitions.
Richard M. Stallman <rms@gnu.org>
parents:
18908
diff
changeset
|
33 (or (fboundp 'defcustom) |
|
95743e18a01c
(defgroup, defcustom): Add Emacs 19 compatibility definitions.
Richard M. Stallman <rms@gnu.org>
parents:
18908
diff
changeset
|
34 (defmacro defcustom (var value doc &rest ignore) |
|
95743e18a01c
(defgroup, defcustom): Add Emacs 19 compatibility definitions.
Richard M. Stallman <rms@gnu.org>
parents:
18908
diff
changeset
|
35 `(defvar ,var ,value ,doc))) |
|
95743e18a01c
(defgroup, defcustom): Add Emacs 19 compatibility definitions.
Richard M. Stallman <rms@gnu.org>
parents:
18908
diff
changeset
|
36 |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
37 (defvar texinfmt-version "2.38 of 3 July 1998") |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
38 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
39 (defun texinfmt-version (&optional here) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
40 "Show the version of texinfmt.el in the minibuffer. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
41 If optional argument HERE is non-nil, insert info at point." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
42 (interactive "P") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
43 (let ((version-string |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
44 (format "Version of \`texinfmt.el\': %s" texinfmt-version))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
45 (if here |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
46 (insert version-string) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
47 (if (interactive-p) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
48 (message "%s" version-string) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
49 version-string)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
50 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
51 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
52 ;;; Variable definitions |
| 189 | 53 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
54 (require 'texinfo) ; So `texinfo-footnote-style' is defined. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
55 (require 'texnfo-upd) ; So `texinfo-section-types-regexp' is defined. |
|
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
657
diff
changeset
|
56 |
| 189 | 57 (defvar texinfo-format-syntax-table nil) |
| 58 | |
| 59 (defvar texinfo-vindex) | |
| 60 (defvar texinfo-findex) | |
| 61 (defvar texinfo-cindex) | |
| 62 (defvar texinfo-pindex) | |
| 63 (defvar texinfo-tindex) | |
| 64 (defvar texinfo-kindex) | |
| 65 (defvar texinfo-last-node) | |
| 66 (defvar texinfo-node-names) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
67 (defvar texinfo-enclosure-list) |
|
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
68 (defvar texinfo-alias-list) |
|
24314
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
69 (defvar texinfo-fold-nodename-case nil) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
70 |
|
4868
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
71 (defvar texinfo-command-start) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
72 (defvar texinfo-command-end) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
73 (defvar texinfo-command-name) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
74 (defvar texinfo-defun-type) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
75 (defvar texinfo-last-node-pos) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
76 (defvar texinfo-stack) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
77 (defvar texinfo-short-index-cmds-alist) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
78 (defvar texinfo-short-index-format-cmds-alist) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
79 (defvar texinfo-format-filename) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
80 (defvar texinfo-footnote-number) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
81 (defvar texinfo-start-of-header) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
82 (defvar texinfo-end-of-header) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
83 (defvar texinfo-raisesections-alist) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
84 (defvar texinfo-lowersections-alist) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
85 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
86 ;;; Syntax table |
| 189 | 87 |
| 88 (if texinfo-format-syntax-table | |
| 89 nil | |
| 90 (setq texinfo-format-syntax-table (make-syntax-table)) | |
| 91 (modify-syntax-entry ?\" " " texinfo-format-syntax-table) | |
| 92 (modify-syntax-entry ?\\ " " texinfo-format-syntax-table) | |
| 93 (modify-syntax-entry ?@ "\\" texinfo-format-syntax-table) | |
| 94 (modify-syntax-entry ?\^q "\\" texinfo-format-syntax-table) | |
| 95 (modify-syntax-entry ?\[ "." texinfo-format-syntax-table) | |
| 96 (modify-syntax-entry ?\] "." texinfo-format-syntax-table) | |
| 97 (modify-syntax-entry ?\( "." texinfo-format-syntax-table) | |
| 98 (modify-syntax-entry ?\) "." texinfo-format-syntax-table) | |
| 99 (modify-syntax-entry ?{ "(}" texinfo-format-syntax-table) | |
| 100 (modify-syntax-entry ?} "){" texinfo-format-syntax-table) | |
| 101 (modify-syntax-entry ?\' "." texinfo-format-syntax-table)) | |
| 102 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
103 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
104 ;;; Top level buffer and region formatting functions |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
105 |
|
4769
d1b5ca8f5493
(texinfo-format-region texinfo-format-buffer): Add ###autoload cookies.
Brian Fox <bfox@gnu.org>
parents:
4396
diff
changeset
|
106 ;;;###autoload |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
107 (defun texinfo-format-buffer (&optional nosplit) |
| 189 | 108 "Process the current buffer as texinfo code, into an Info file. |
| 109 The Info file output is generated in a buffer visiting the Info file | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
110 name specified in the @setfilename command. |
| 189 | 111 |
| 112 Non-nil argument (prefix, if interactive) means don't make tag table | |
| 113 and don't split the file if large. You can use Info-tagify and | |
| 114 Info-split to do these manually." | |
| 115 (interactive "P") | |
|
24621
54ef2ebc8494
(texinfo-format-buffer): Bind coding-system-for-write, to avoid hanging when
Karl Heuer <kwzh@gnu.org>
parents:
24453
diff
changeset
|
116 (let ((lastmessage "Formatting Info file...") |
|
54ef2ebc8494
(texinfo-format-buffer): Bind coding-system-for-write, to avoid hanging when
Karl Heuer <kwzh@gnu.org>
parents:
24453
diff
changeset
|
117 (coding-system-for-write buffer-file-coding-system)) |
| 189 | 118 (message lastmessage) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
119 (widen) |
| 189 | 120 (texinfo-format-buffer-1) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
121 (Info-tagify) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
122 (if nosplit |
| 189 | 123 nil |
| 124 (if (> (buffer-size) 100000) | |
| 125 (progn | |
| 126 (message (setq lastmessage "Splitting Info file...")) | |
| 127 (Info-split)))) | |
| 128 (message (concat lastmessage | |
| 129 (if (interactive-p) "done. Now save it." "done."))))) | |
| 130 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
131 (defvar texinfo-region-buffer-name "*Info Region*" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
132 "*Name of the temporary buffer used by \\[texinfo-format-region].") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
133 |
|
4769
d1b5ca8f5493
(texinfo-format-region texinfo-format-buffer): Add ###autoload cookies.
Brian Fox <bfox@gnu.org>
parents:
4396
diff
changeset
|
134 ;;;###autoload |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
135 (defun texinfo-format-region (region-beginning region-end) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
136 "Convert the current region of the Texinfo file to Info format. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
137 This lets you see what that part of the file will look like in Info. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
138 The command is bound to \\[texinfo-format-region]. The text that is |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
139 converted to Info is stored in a temporary buffer." |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
140 (interactive "r") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
141 (message "Converting region to Info format...") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
142 (let (texinfo-command-start |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
143 texinfo-command-end |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
144 texinfo-command-name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
145 texinfo-vindex |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
146 texinfo-findex |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
147 texinfo-cindex |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
148 texinfo-pindex |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
149 texinfo-tindex |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
150 texinfo-kindex |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
151 texinfo-stack |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
152 (texinfo-format-filename "") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
153 texinfo-example-start |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
154 texinfo-last-node-pos |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
155 texinfo-last-node |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
156 texinfo-node-names |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
157 (texinfo-footnote-number 0) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
158 last-input-buffer |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
159 (fill-column-for-info fill-column) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
160 (input-buffer (current-buffer)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
161 (input-directory default-directory) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
162 (header-text "") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
163 (header-beginning 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
164 (header-end 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
165 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
166 ;;; Copy lines between beginning and end of header lines, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
167 ;;; if any, or else copy the `@setfilename' line, if any. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
168 (save-excursion |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
169 (save-restriction |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
170 (widen) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
171 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
172 (let ((search-end (save-excursion (forward-line 100) (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
173 (if (or |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
174 ;; Either copy header text. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
175 (and |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
176 (prog1 |
|
4982
36b78ccd6285
(texinfo-format-region): Change `texinfo-[start
Richard M. Stallman <rms@gnu.org>
parents:
4868
diff
changeset
|
177 (search-forward tex-start-of-header search-end t) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
178 (forward-line 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
179 ;; Mark beginning of header. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
180 (setq header-beginning (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
181 (prog1 |
|
4982
36b78ccd6285
(texinfo-format-region): Change `texinfo-[start
Richard M. Stallman <rms@gnu.org>
parents:
4868
diff
changeset
|
182 (search-forward tex-end-of-header nil t) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
183 (beginning-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
184 ;; Mark end of header |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
185 (setq header-end (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
186 ;; Or copy @filename line. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
187 (prog2 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
188 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
189 (search-forward "@setfilename" search-end t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
190 (beginning-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
191 (setq header-beginning (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
192 (forward-line 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
193 (setq header-end (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
194 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
195 ;; Copy header |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
196 (setq header-text |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
197 (buffer-substring |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
198 (min header-beginning region-beginning) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
199 header-end)))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
200 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
201 ;;; Find a buffer to use. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
202 (switch-to-buffer (get-buffer-create texinfo-region-buffer-name)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
203 (erase-buffer) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
204 ;; Insert the header into the buffer. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
205 (insert header-text) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
206 ;; Insert the region into the buffer. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
207 (insert-buffer-substring |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
208 input-buffer |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
209 (max region-beginning header-end) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
210 region-end) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
211 ;; Make sure region ends in a newline. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
212 (or (= (preceding-char) ?\n) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
213 (insert "\n")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
214 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
215 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
216 (texinfo-mode) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
217 (message "Converting region to Info format...") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
218 (setq fill-column fill-column-for-info) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
219 ;; Install a syntax table useful for scanning command operands. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
220 (set-syntax-table texinfo-format-syntax-table) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
221 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
222 ;; Insert @include files so `texinfo-raise-lower-sections' can |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
223 ;; work on them without losing track of multiple |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
224 ;; @raise/@lowersections commands. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
225 (while (re-search-forward "^@include" nil t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
226 (setq texinfo-command-end (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
227 (let ((filename (concat input-directory |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
228 (texinfo-parse-line-arg)))) |
|
9178
0facf5c89fff
(texinfo-format-region, texinfo-format-buffer-1):
Richard M. Stallman <rms@gnu.org>
parents:
6309
diff
changeset
|
229 (re-search-backward "^@include") |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
230 (delete-region (point) (save-excursion (forward-line 1) (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
231 (message "Reading included file: %s" filename) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
232 (save-excursion |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
233 (save-restriction |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
234 (narrow-to-region |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
235 (point) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
236 (+ (point) (car (cdr (insert-file-contents filename))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
237 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
238 ;; Remove `@setfilename' line from included file, if any, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
239 ;; so @setfilename command not duplicated. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
240 (if (re-search-forward |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
241 "^@setfilename" (save-excursion (forward-line 100) (point)) t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
242 (progn |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
243 (beginning-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
244 (delete-region |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
245 (point) (save-excursion (forward-line 1) (point))))))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
246 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
247 ;; Raise or lower level of each section, if necessary. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
248 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
249 (texinfo-raise-lower-sections) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
250 ;; Append @refill to appropriate paragraphs for filling. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
251 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
252 (texinfo-append-refill) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
253 ;; If the region includes the effective end of the data, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
254 ;; discard everything after that. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
255 (goto-char (point-max)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
256 (if (re-search-backward "^@bye" nil t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
257 (delete-region (point) (point-max))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
258 ;; Make sure buffer ends in a newline. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
259 (or (= (preceding-char) ?\n) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
260 (insert "\n")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
261 ;; Don't use a previous value of texinfo-enclosure-list. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
262 (setq texinfo-enclosure-list nil) |
|
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
263 (setq texinfo-alias-list nil) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
264 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
265 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
266 (if (looking-at "\\\\input[ \t]+texinfo") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
267 (delete-region (point) (save-excursion (forward-line 1) (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
268 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
269 ;; Insert Info region title text. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
270 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
271 (if (search-forward |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
272 "@setfilename" (save-excursion (forward-line 100) (point)) t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
273 (progn |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
274 (setq texinfo-command-end (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
275 (beginning-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
276 (setq texinfo-command-start (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
277 (let ((arg (texinfo-parse-arg-discard))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
278 (insert " " |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
279 texinfo-region-buffer-name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
280 " buffer for: `") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
281 (insert (file-name-nondirectory (expand-file-name arg))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
282 (insert "', -*-Text-*-\n"))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
283 ;; Else no `@setfilename' line |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
284 (insert " " |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
285 texinfo-region-buffer-name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
286 " buffer -*-Text-*-\n")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
287 (insert "produced by `texinfo-format-region'\n" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
288 "from a region in: " |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
289 (if (buffer-file-name input-buffer) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
290 (concat "`" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
291 (file-name-sans-versions |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
292 (file-name-nondirectory |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
293 (buffer-file-name input-buffer))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
294 "'") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
295 (concat "buffer `" (buffer-name input-buffer) "'")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
296 "\nusing `texinfmt.el' version " |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
297 texinfmt-version |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
298 ".\n\n") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
299 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
300 ;; Now convert for real. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
301 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
302 (texinfo-format-scan) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
303 (goto-char (point-min)) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
304 (Info-tagify input-buffer) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
305 (goto-char (point-min)) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
306 (message "Done."))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
307 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
308 ;;;###autoload |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
309 (defun texi2info (&optional nosplit) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
310 "Convert the current buffer (written in Texinfo code) into an Info file. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
311 The Info file output is generated in a buffer visiting the Info file |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
312 names specified in the @setfilename command. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
313 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
314 This function automatically updates all node pointers and menus, and |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
315 creates a master menu. This work is done on a temporary buffer that |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
316 is automatically removed when the Info file is created. The original |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
317 Texinfo source buffer is not changed. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
318 |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
319 Non-nil argument (prefix, if interactive) means don't split the file |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
320 if large. You can use Info-split to do this manually." |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
321 (interactive "P") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
322 (let ((temp-buffer (concat "*--" (buffer-name) "--temporary-buffer*" ))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
323 (message "First updating nodes and menus, then creating Info file.") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
324 ;; (sit-for 2) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
325 (copy-to-buffer temp-buffer (point-min) (point-max)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
326 (switch-to-buffer temp-buffer) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
327 (texinfo-master-menu t) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
328 (message "Now creating Info file.") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
329 (sit-for 2) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
330 (texinfo-format-buffer nosplit) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
331 (save-buffer) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
332 (kill-buffer temp-buffer))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
333 |
| 189 | 334 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
335 ;;; Primary internal formatting function for the whole buffer. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
336 |
| 189 | 337 (defun texinfo-format-buffer-1 () |
| 338 (let (texinfo-format-filename | |
| 339 texinfo-example-start | |
| 340 texinfo-command-start | |
| 341 texinfo-command-end | |
| 342 texinfo-command-name | |
| 343 texinfo-last-node | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
344 texinfo-last-node-pos |
| 189 | 345 texinfo-vindex |
| 346 texinfo-findex | |
| 347 texinfo-cindex | |
| 348 texinfo-pindex | |
| 349 texinfo-tindex | |
| 350 texinfo-kindex | |
| 351 texinfo-stack | |
| 352 texinfo-node-names | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
353 (texinfo-footnote-number 0) |
| 189 | 354 last-input-buffer |
| 355 outfile | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
356 (fill-column-for-info fill-column) |
| 189 | 357 (input-buffer (current-buffer)) |
| 358 (input-directory default-directory)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
359 (setq texinfo-enclosure-list nil) |
|
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
360 (setq texinfo-alias-list nil) |
| 189 | 361 (save-excursion |
| 362 (goto-char (point-min)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
363 (or (search-forward "@setfilename" nil t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
364 (error "Texinfo file needs an `@setfilename FILENAME' line.")) |
| 189 | 365 (setq texinfo-command-end (point)) |
| 366 (setq outfile (texinfo-parse-line-arg))) | |
|
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
367 |
| 189 | 368 (find-file outfile) |
| 369 (texinfo-mode) | |
|
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
370 (erase-buffer) |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
371 |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
372 (message "Formatting Info file: %s" outfile) |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
373 (setq texinfo-format-filename |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
374 (file-name-nondirectory (expand-file-name outfile))) |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
375 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
376 (setq fill-column fill-column-for-info) |
| 189 | 377 (set-syntax-table texinfo-format-syntax-table) |
|
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
378 |
| 189 | 379 (insert-buffer-substring input-buffer) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
380 (message "Converting %s to Info format..." (buffer-name input-buffer)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
381 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
382 ;; Insert @include files so `texinfo-raise-lower-sections' can |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
383 ;; work on them without losing track of multiple |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
384 ;; @raise/@lowersections commands. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
385 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
386 (while (re-search-forward "^@include" nil t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
387 (setq texinfo-command-end (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
388 (let ((filename (concat input-directory |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
389 (texinfo-parse-line-arg)))) |
|
9178
0facf5c89fff
(texinfo-format-region, texinfo-format-buffer-1):
Richard M. Stallman <rms@gnu.org>
parents:
6309
diff
changeset
|
390 (re-search-backward "^@include") |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
391 (delete-region (point) (save-excursion (forward-line 1) (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
392 (message "Reading included file: %s" filename) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
393 (save-excursion |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
394 (save-restriction |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
395 (narrow-to-region |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
396 (point) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
397 (+ (point) (car (cdr (insert-file-contents filename))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
398 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
399 ;; Remove `@setfilename' line from included file, if any, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
400 ;; so @setfilename command not duplicated. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
401 (if (re-search-forward |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
402 "^@setfilename" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
403 (save-excursion (forward-line 100) (point)) t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
404 (progn |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
405 (beginning-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
406 (delete-region |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
407 (point) (save-excursion (forward-line 1) (point))))))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
408 ;; Raise or lower level of each section, if necessary. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
409 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
410 (texinfo-raise-lower-sections) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
411 ;; Append @refill to appropriate paragraphs |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
412 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
413 (texinfo-append-refill) |
| 189 | 414 (goto-char (point-min)) |
| 415 (search-forward "@setfilename") | |
| 416 (beginning-of-line) | |
| 417 (delete-region (point-min) (point)) | |
| 418 ;; Remove @bye at end of file, if it is there. | |
| 419 (goto-char (point-max)) | |
| 420 (if (search-backward "@bye" nil t) | |
| 421 (delete-region (point) (point-max))) | |
| 422 ;; Make sure buffer ends in a newline. | |
| 423 (or (= (preceding-char) ?\n) | |
| 424 (insert "\n")) | |
| 425 ;; Scan the whole buffer, converting to Info format. | |
| 426 (texinfo-format-scan) | |
|
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
427 (goto-char (point-min)) |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
428 ;; Insert info about how this file was made. |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
429 (insert "Info file: " |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
430 texinfo-format-filename ", -*-Text-*-\n" |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
431 "produced by `texinfo-format-buffer'\n" |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
432 ;; Date string removed so that regression testing is easier. |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
433 ;; "on " |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
434 ;; (insert (format-time-string "%e %b %Y")) " " |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
435 "from file" |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
436 (if (buffer-file-name input-buffer) |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
437 (concat " `" |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
438 (file-name-sans-versions |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
439 (file-name-nondirectory |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
440 (buffer-file-name input-buffer))) |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
441 "'") |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
442 (concat "buffer `" (buffer-name input-buffer) "'")) |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
443 "\nusing `texinfmt.el' version " |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
444 texinfmt-version |
|
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
445 ".\n\n") |
| 189 | 446 ;; Return data for indices. |
| 447 (list outfile | |
| 448 texinfo-vindex texinfo-findex texinfo-cindex | |
| 449 texinfo-pindex texinfo-tindex texinfo-kindex))) | |
| 450 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
451 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
452 ;;; Perform non-@-command file conversions: quotes and hyphens |
| 189 | 453 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
454 (defun texinfo-format-convert (min max) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
455 ;; Convert left and right quotes to typewriter font quotes. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
456 (goto-char min) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
457 (while (search-forward "``" max t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
458 (replace-match "\"")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
459 (goto-char min) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
460 (while (search-forward "''" max t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
461 (replace-match "\"")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
462 ;; Convert three hyphens in a row to two. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
463 (goto-char min) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
464 (while (re-search-forward "\\( \\|\\w\\)\\(---\\)\\( \\|\\w\\)" max t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
465 (delete-region (1+ (match-beginning 2)) (+ 2 (match-beginning |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
466 2))))) |
| 189 | 467 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
468 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
469 ;;; Handle paragraph filling |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
470 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
471 ;; Keep as concatinated lists for ease of maintenance |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
472 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
473 (defvar texinfo-no-refill-regexp |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
474 (concat |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
475 "^@" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
476 "\\(" |
|
18884
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
477 "direntry\\|" |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
478 "lisp\\|" |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
479 "smalllisp\\|" |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
480 "example\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
481 "smallexample\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
482 "display\\|" |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
483 "smalldisplay\\|" |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
484 "format\\|" |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
485 "smallformat\\|" |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
486 "flushleft\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
487 "flushright\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
488 "menu\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
489 "multitable\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
490 "titlepage\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
491 "iftex\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
492 "ifhtml\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
493 "tex\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
494 "html" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
495 "\\)") |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
496 "Regexp specifying environments in which paragraphs are not filled.") |
| 189 | 497 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
498 (defvar texinfo-accent-commands |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
499 (concat |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
500 "@^\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
501 "@`\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
502 "@'\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
503 "@\"\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
504 "@,\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
505 "@=\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
506 "@~\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
507 "@OE{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
508 "@oe{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
509 "@AA{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
510 "@aa{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
511 "@AE{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
512 "@ae{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
513 "@ss{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
514 "@questiondown{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
515 "@exclamdown{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
516 "@L{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
517 "@l{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
518 "@O{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
519 "@o{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
520 "@dotaccent{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
521 "@ubaraccent{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
522 "@d{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
523 "@H{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
524 "@ringaccent{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
525 "@tieaccent{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
526 "@u{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
527 "@v{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
528 "@dotless{" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
529 )) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
530 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
531 (defvar texinfo-part-of-para-regexp |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
532 (concat |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
533 "^@" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
534 "\\(" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
535 "b{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
536 "bullet{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
537 "cite{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
538 "code{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
539 "email{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
540 "emph{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
541 "equiv{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
542 "error{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
543 "expansion{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
544 "file{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
545 "i{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
546 "inforef{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
547 "kbd{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
548 "key{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
549 "lisp{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
550 "minus{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
551 "point{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
552 "print{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
553 "pxref{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
554 "r{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
555 "ref{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
556 "result{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
557 "samp{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
558 "sc{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
559 "t{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
560 "TeX{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
561 "today{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
562 "url{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
563 "var{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
564 "w{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
565 "xref{\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
566 "@-\\|" ; @- is a descretionary hyphen (not an accent) (a noop). |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
567 texinfo-accent-commands |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
568 "\\)" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
569 ) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
570 "Regexp specifying @-commands found within paragraphs.") |
| 189 | 571 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
572 (defun texinfo-append-refill () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
573 "Append @refill at end of each paragraph that should be filled. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
574 Do not append @refill to paragraphs within @example and similar environments. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
575 Do not append @refill to paragraphs containing @w{TEXT} or @*." |
| 189 | 576 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
577 ;; It is necessary to append @refill before other processing because |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
578 ;; the other processing removes information that tells Texinfo |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
579 ;; whether the text should or should not be filled. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
580 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
581 (while (< (point) (point-max)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
582 (let ((refill-blank-lines "^[ \t\n]*$") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
583 (case-fold-search nil)) ; Don't confuse @TeX and @tex.... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
584 (beginning-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
585 ;; 1. Skip over blank lines; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
586 ;; skip over lines beginning with @-commands, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
587 ;; but do not skip over lines |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
588 ;; that are no-refill environments such as @example or |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
589 ;; that begin with within-paragraph @-commands such as @code. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
590 (while (and (looking-at (concat "^@\\|^\\\\\\|" refill-blank-lines)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
591 (not (looking-at |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
592 (concat |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
593 "\\(" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
594 texinfo-no-refill-regexp |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
595 "\\|" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
596 texinfo-part-of-para-regexp |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
597 "\\)"))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
598 (< (point) (point-max))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
599 (forward-line 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
600 ;; 2. Skip over @example and similar no-refill environments. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
601 (if (looking-at texinfo-no-refill-regexp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
602 (let ((environment |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
603 (buffer-substring (match-beginning 1) (match-end 1)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
604 (progn (re-search-forward (concat "^@end " environment) nil t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
605 (forward-line 1))) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
606 ;; Else |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
607 ;; 3. Do not refill a paragraph containing @w or @*, or ending |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
608 ;; with @<newline> followed by a newline. |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
609 (if (or |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
610 (>= (point) (point-max)) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
611 (re-search-forward |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
612 "@w{\\|@\\*\\|@\n\n" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
613 (save-excursion |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
614 (forward-paragraph) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
615 (forward-line 1) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
616 (point)) t)) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
617 ;; Go to end of paragraph and do nothing. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
618 (forward-paragraph) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
619 ;; 4. Else go to end of paragraph and insert @refill |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
620 (forward-paragraph) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
621 (forward-line -1) |
| 23658 | 622 (let ((line-beg (point))) |
| 623 (end-of-line) | |
| 624 (delete-region | |
| 625 (point) | |
| 626 (save-excursion (skip-chars-backward " \t") (point))) | |
|
24453
3b8991c22dcd
(texinfo-append-refill): Check @c correctly.
Kenichi Handa <handa@m17n.org>
parents:
24314
diff
changeset
|
627 (forward-char 1) |
|
3b8991c22dcd
(texinfo-append-refill): Check @c correctly.
Kenichi Handa <handa@m17n.org>
parents:
24314
diff
changeset
|
628 (unless (re-search-backward "@c[ \t\n]\\|@comment[ \t\n]" line-beg t) |
|
3b8991c22dcd
(texinfo-append-refill): Check @c correctly.
Kenichi Handa <handa@m17n.org>
parents:
24314
diff
changeset
|
629 (forward-char -1)) |
| 23658 | 630 (unless (re-search-backward "@refill\\|@bye" line-beg t) |
| 631 (insert "@refill"))) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
632 (forward-line 1)))))) |
| 189 | 633 |
| 634 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
635 ;;; Handle `@raisesections' and `@lowersections' commands |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
636 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
637 ;; These commands change the hierarchical level of chapter structuring |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
638 ;; commands. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
639 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
640 ;; @raisesections changes @subsection to @section, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
641 ;; @section to @chapter, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
642 ;; etc. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
643 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
644 ;; @lowersections changes @chapter to @section |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
645 ;; @subsection to @subsubsection, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
646 ;; etc. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
647 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
648 ;; An @raisesections/@lowersections command changes only those |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
649 ;; structuring commands that follow the @raisesections/@lowersections |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
650 ;; command. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
651 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
652 ;; Repeated @raisesections/@lowersections continue to raise or lower |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
653 ;; the heading level. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
654 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
655 ;; An @lowersections command cancels an @raisesections command, and |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
656 ;; vice versa. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
657 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
658 ;; You cannot raise or lower "beyond" chapters or subsubsections, but |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
659 ;; trying to do so does not elicit an error---you just get more |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
660 ;; headings that mean the same thing as you keep raising or lowering |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
661 ;; (for example, after a single @raisesections, both @chapter and |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
662 ;; @section produce chapter headings). |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
663 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
664 (defun texinfo-raise-lower-sections () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
665 "Raise or lower the hierarchical level of chapters, sections, etc. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
666 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
667 This function acts according to `@raisesections' and `@lowersections' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
668 commands in the Texinfo file. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
669 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
670 For example, an `@lowersections' command is useful if you wish to |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
671 include what is written as an outer or standalone Texinfo file in |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
672 another Texinfo file as an inner, included file. The `@lowersections' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
673 command changes chapters to sections, sections to subsections and so |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
674 on. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
675 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
676 @raisesections changes @subsection to @section, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
677 @section to @chapter, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
678 @heading to @chapheading, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
679 etc. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
680 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
681 @lowersections changes @chapter to @section, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
682 @subsection to @subsubsection, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
683 @heading to @subheading, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
684 etc. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
685 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
686 An `@raisesections' or `@lowersections' command changes only those |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
687 structuring commands that follow the `@raisesections' or |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
688 `@lowersections' command. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
689 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
690 An `@lowersections' command cancels an `@raisesections' command, and |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
691 vice versa. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
692 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
693 Repeated use of the commands continue to raise or lower the hierarchical |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
694 level a step at a time. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
695 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
696 An attempt to raise above `chapters' reproduces chapter commands; an |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
697 attempt to lower below subsubsections reproduces subsubsection |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
698 commands." |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
699 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
700 ;; `texinfo-section-types-regexp' is defined in `texnfo-upd.el'; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
701 ;; it is a regexp matching chapter, section, other headings |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
702 ;; (but not the top node). |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
703 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
704 (let (type (level 0)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
705 (while |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
706 (re-search-forward |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
707 (concat |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
708 "\\(\\(^@\\(raise\\|lower\\)sections\\)\\|\\(" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
709 texinfo-section-types-regexp |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
710 "\\)\\)") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
711 nil t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
712 (beginning-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
713 (save-excursion (setq type (read (current-buffer)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
714 (cond |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
715 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
716 ;; 1. Increment level |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
717 ((eq type '@raisesections) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
718 (setq level (1+ level)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
719 (delete-region |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
720 (point) (save-excursion (forward-line 1) (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
721 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
722 ;; 2. Decrement level |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
723 ((eq type '@lowersections) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
724 (setq level (1- level)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
725 (delete-region |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
726 (point) (save-excursion (forward-line 1) (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
727 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
728 ;; Now handle structuring commands |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
729 ((cond |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
730 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
731 ;; 3. Raise level when positive |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
732 ((> level 0) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
733 (let ((count level) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
734 (new-level type)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
735 (while (> count 0) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
736 (setq new-level |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
737 (cdr (assq new-level texinfo-raisesections-alist))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
738 (setq count (1- count))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
739 (kill-word 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
740 (insert (symbol-name new-level)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
741 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
742 ;; 4. Do nothing except move point when level is zero |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
743 ((= level 0) (forward-line 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
744 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
745 ;; 5. Lower level when positive |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
746 ((< level 0) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
747 (let ((count level) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
748 (new-level type)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
749 (while (< count 0) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
750 (setq new-level |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
751 (cdr (assq new-level texinfo-lowersections-alist))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
752 (setq count (1+ count))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
753 (kill-word 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
754 (insert (symbol-name new-level)))))))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
755 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
756 (defvar texinfo-raisesections-alist |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
757 '((@chapter . @chapter) ; Cannot go higher |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
758 (@unnumbered . @unnumbered) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
759 (@centerchap . @unnumbered) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
760 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
761 (@majorheading . @majorheading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
762 (@chapheading . @chapheading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
763 (@appendix . @appendix) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
764 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
765 (@section . @chapter) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
766 (@unnumberedsec . @unnumbered) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
767 (@heading . @chapheading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
768 (@appendixsec . @appendix) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
769 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
770 (@subsection . @section) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
771 (@unnumberedsubsec . @unnumberedsec) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
772 (@subheading . @heading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
773 (@appendixsubsec . @appendixsec) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
774 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
775 (@subsubsection . @subsection) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
776 (@unnumberedsubsubsec . @unnumberedsubsec) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
777 (@subsubheading . @subheading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
778 (@appendixsubsubsec . @appendixsubsec)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
779 "*An alist of next higher levels for chapters, sections. etc. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
780 For example, section to chapter, subsection to section. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
781 Used by `texinfo-raise-lower-sections'. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
782 The keys specify types of section; the values correspond to the next |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
783 higher types.") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
784 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
785 (defvar texinfo-lowersections-alist |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
786 '((@chapter . @section) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
787 (@unnumbered . @unnumberedsec) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
788 (@centerchap . @unnumberedsec) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
789 (@majorheading . @heading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
790 (@chapheading . @heading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
791 (@appendix . @appendixsec) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
792 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
793 (@section . @subsection) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
794 (@unnumberedsec . @unnumberedsubsec) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
795 (@heading . @subheading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
796 (@appendixsec . @appendixsubsec) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
797 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
798 (@subsection . @subsubsection) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
799 (@unnumberedsubsec . @unnumberedsubsubsec) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
800 (@subheading . @subsubheading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
801 (@appendixsubsec . @appendixsubsubsec) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
802 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
803 (@subsubsection . @subsubsection) ; Cannot go lower. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
804 (@unnumberedsubsubsec . @unnumberedsubsubsec) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
805 (@subsubheading . @subsubheading) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
806 (@appendixsubsubsec . @appendixsubsubsec)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
807 "*An alist of next lower levels for chapters, sections. etc. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
808 For example, chapter to section, section to subsection. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
809 Used by `texinfo-raise-lower-sections'. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
810 The keys specify types of section; the values correspond to the next |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
811 lower types.") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
812 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
813 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
814 ;;; Perform those texinfo-to-info conversions that apply to the whole input |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
815 ;;; uniformly. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
816 |
| 189 | 817 (defun texinfo-format-scan () |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
818 (texinfo-format-convert (point-min) (point-max)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
819 ;; Scan for @-commands. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
820 (goto-char (point-min)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
821 (while (search-forward "@" nil t) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
822 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
823 ;; These are the single-character accent commands: @^ @` @' @" @= @~ |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
824 ;; In Info, they are simply quoted and the @ deleted. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
825 ;; Other single-character commands: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
826 ;; @* forces a line break, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
827 ;; @- is a discretionary hyphenation point; does nothing in Info. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
828 ;; @<space>, @<tab>, @<newline> each produce a single space, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
829 ;; unless followed by a newline. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
830 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
831 ;; Old version 2.34 expression: (looking-at "[@{}^'` *\"?!]") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
832 (if (looking-at "[@{}^'`\"=~ \t\n*?!-]") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
833 ;; @*, causes a line break. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
834 (cond |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
835 ;; @*, a line break |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
836 ((= (following-char) ?*) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
837 ;; remove command |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
838 (delete-region (1- (point)) (1+ (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
839 ;; insert return if not at end of line; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
840 ;; else line is already broken. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
841 (if (not (= (following-char) ?\n)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
842 (insert ?\n))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
843 ;; @-, deleted |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
844 ((= (following-char) ?-) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
845 (delete-region (1- (point)) (1+ (point)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
846 ;; @<space>, @<tab>, @<newline>: produce a single space, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
847 ;; unless followed by a newline. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
848 ((= (following-char) ? ) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
849 (delete-region (1- (point)) (1+ (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
850 ;; insert single space if not at end of line; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
851 ;; else line is already broken. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
852 (if (not (= (following-char) ?\n)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
853 (insert ? ))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
854 ((= (following-char) ?\t) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
855 (delete-region (1- (point)) (1+ (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
856 ;; insert single space if not at end of line; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
857 ;; else line is already broken. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
858 (if (not (= (following-char) ?\n)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
859 (insert ? ))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
860 ;; following char is a carriage return |
|
27254
650eddd41858
(texinfo-format-scan): Use ?\n instead
Gerd Moellmann <gerd@gnu.org>
parents:
25278
diff
changeset
|
861 ((= (following-char) ?\n) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
862 ;; remove command |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
863 (delete-region (1- (point)) (1+ (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
864 ;; insert single space if not at end of line; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
865 ;; else line is already broken. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
866 (if (not (= (following-char) ?\n)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
867 (insert ? ))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
868 ;; Otherwise: the other characters are simply quoted. Delete the @. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
869 (t |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
870 (delete-char -1) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
871 (forward-char 1))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
872 ;; @ is followed by a command-word; find the end of the word. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
873 (setq texinfo-command-start (1- (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
874 (if (= (char-syntax (following-char)) ?w) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
875 (forward-word 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
876 (forward-char 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
877 (setq texinfo-command-end (point)) |
| 23658 | 878 ;; Detect the case of two @-commands in a row; |
| 879 ;; process just the first one. | |
| 880 (goto-char (1+ texinfo-command-start)) | |
| 881 (skip-chars-forward "^@" texinfo-command-end) | |
| 882 (setq texinfo-command-end (point)) | |
|
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
883 ;; Handle let aliasing |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
884 (setq texinfo-command-name |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
885 (let (trial |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
886 (cmdname |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
887 (buffer-substring |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
888 (1+ texinfo-command-start) texinfo-command-end))) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
889 (while (setq trial (assoc cmdname texinfo-alias-list)) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
890 (setq cmdname (cdr trial))) |
|
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
891 (intern cmdname))) |
|
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
892 ;; Call the handler for this command. |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
893 (let ((enclosure-type |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
894 (assoc |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
895 (symbol-name texinfo-command-name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
896 texinfo-enclosure-list))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
897 (if enclosure-type |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
898 (progn |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
899 (insert |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
900 (car (car (cdr enclosure-type))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
901 (texinfo-parse-arg-discard) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
902 (car (cdr (car (cdr enclosure-type))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
903 (goto-char texinfo-command-start)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
904 (let ((cmd (get texinfo-command-name 'texinfo-format))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
905 (if cmd (funcall cmd) (texinfo-unsupported))))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
906 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
907 (cond (texinfo-stack |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
908 (goto-char (nth 2 (car texinfo-stack))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
909 (error "Unterminated @%s" (car (car texinfo-stack)))))) |
| 189 | 910 |
| 911 (put 'begin 'texinfo-format 'texinfo-format-begin) | |
| 912 (defun texinfo-format-begin () | |
| 913 (texinfo-format-begin-end 'texinfo-format)) | |
| 914 | |
| 915 (put 'end 'texinfo-format 'texinfo-format-end) | |
| 916 (defun texinfo-format-end () | |
| 917 (texinfo-format-begin-end 'texinfo-end)) | |
| 918 | |
| 919 (defun texinfo-format-begin-end (prop) | |
| 920 (setq texinfo-command-name (intern (texinfo-parse-line-arg))) | |
|
4868
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
921 (let ((cmd (get texinfo-command-name prop))) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
922 (if cmd (funcall cmd) |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
923 (texinfo-unsupported)))) |
| 189 | 924 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
925 ;;; Parsing functions |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
926 |
| 189 | 927 (defun texinfo-parse-line-arg () |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
928 "Return argument of @-command as string. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
929 Argument is separated from command either by a space or by a brace. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
930 If a space, return rest of line, with beginning and ending white |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
931 space removed. If a brace, return string between braces. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
932 Leave point after argument." |
| 189 | 933 (goto-char texinfo-command-end) |
| 934 (let ((start (point))) | |
| 935 (cond ((looking-at " ") | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
936 (skip-chars-forward " ") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
937 (setq start (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
938 (end-of-line) |
| 189 | 939 (skip-chars-backward " ") |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
940 (delete-region (point) (progn (end-of-line) (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
941 (setq texinfo-command-end (1+ (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
942 ((looking-at "{") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
943 (setq start (1+ (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
944 (forward-list 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
945 (setq texinfo-command-end (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
946 (forward-char -1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
947 (t |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
948 (error "Invalid texinfo command arg format"))) |
| 189 | 949 (prog1 (buffer-substring start (point)) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
950 (if (eolp) (forward-char 1))))) |
| 189 | 951 |
| 952 (defun texinfo-parse-expanded-arg () | |
| 953 (goto-char texinfo-command-end) | |
| 954 (let ((start (point)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
955 marker) |
| 189 | 956 (cond ((looking-at " ") |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
957 (skip-chars-forward " ") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
958 (setq start (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
959 (end-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
960 (setq texinfo-command-end (1+ (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
961 ((looking-at "{") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
962 (setq start (1+ (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
963 (forward-list 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
964 (setq texinfo-command-end (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
965 (forward-char -1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
966 (t |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
967 (error "Invalid texinfo command arg format"))) |
| 189 | 968 (setq marker (move-marker (make-marker) texinfo-command-end)) |
| 969 (texinfo-format-expand-region start (point)) | |
| 970 (setq texinfo-command-end (marker-position marker)) | |
| 971 (move-marker marker nil) | |
| 972 (prog1 (buffer-substring start (point)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
973 (if (eolp) (forward-char 1))))) |
| 189 | 974 |
| 975 (defun texinfo-format-expand-region (start end) | |
| 976 (save-restriction | |
| 977 (narrow-to-region start end) | |
| 978 (let (texinfo-command-start | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
979 texinfo-command-end |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
980 texinfo-command-name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
981 texinfo-stack) |
| 189 | 982 (texinfo-format-scan)) |
| 983 (goto-char (point-max)))) | |
| 984 | |
| 985 (defun texinfo-parse-arg-discard () | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
986 "Delete command and argument; return argument of command." |
| 189 | 987 (prog1 (texinfo-parse-line-arg) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
988 (texinfo-discard-command))) |
| 189 | 989 |
| 990 (defun texinfo-discard-command () | |
| 991 (delete-region texinfo-command-start texinfo-command-end)) | |
| 992 | |
| 993 (defun texinfo-optional-braces-discard () | |
| 994 "Discard braces following command, if any." | |
| 995 (goto-char texinfo-command-end) | |
| 996 (let ((start (point))) | |
| 997 (cond ((looking-at "[ \t]*\n")) ; do nothing | |
| 998 ((looking-at "{") ; remove braces, if any | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
999 (forward-list 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1000 (setq texinfo-command-end (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1001 (t |
| 189 | 1002 (error |
| 1003 "Invalid `texinfo-optional-braces-discard' format \(need braces?\)"))) | |
| 1004 (delete-region texinfo-command-start texinfo-command-end))) | |
| 1005 | |
| 1006 (defun texinfo-format-parse-line-args () | |
| 1007 (let ((start (1- (point))) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1008 next beg end |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1009 args) |
| 189 | 1010 (skip-chars-forward " ") |
| 1011 (while (not (eolp)) | |
| 1012 (setq beg (point)) | |
| 1013 (re-search-forward "[\n,]") | |
| 1014 (setq next (point)) | |
| 1015 (if (bolp) (setq next (1- next))) | |
| 1016 (forward-char -1) | |
| 1017 (skip-chars-backward " ") | |
| 1018 (setq end (point)) | |
| 1019 (setq args (cons (if (> end beg) (buffer-substring beg end)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1020 args)) |
| 189 | 1021 (goto-char next) |
| 1022 (skip-chars-forward " ")) | |
| 1023 (if (eolp) (forward-char 1)) | |
| 1024 (setq texinfo-command-end (point)) | |
| 1025 (nreverse args))) | |
| 1026 | |
| 1027 (defun texinfo-format-parse-args () | |
| 1028 (let ((start (1- (point))) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1029 next beg end |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1030 args) |
| 189 | 1031 (search-forward "{") |
| 1032 (save-excursion | |
| 1033 (texinfo-format-expand-region | |
| 1034 (point) | |
| 1035 (save-excursion (up-list 1) (1- (point))))) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1036 ;; The following does not handle cross references of the form: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1037 ;; `@xref{bullet, , @code{@@bullet}@{@}}.' because the |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1038 ;; re-search-forward finds the first right brace after the second |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1039 ;; comma. |
| 189 | 1040 (while (/= (preceding-char) ?\}) |
| 1041 (skip-chars-forward " \t\n") | |
| 1042 (setq beg (point)) | |
| 1043 (re-search-forward "[},]") | |
| 1044 (setq next (point)) | |
| 1045 (forward-char -1) | |
| 1046 (skip-chars-backward " \t\n") | |
| 1047 (setq end (point)) | |
| 1048 (cond ((< beg end) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1049 (goto-char beg) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1050 (while (search-forward "\n" end t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1051 (replace-match " ")))) |
| 189 | 1052 (setq args (cons (if (> end beg) (buffer-substring beg end)) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1053 args)) |
| 189 | 1054 (goto-char next)) |
| 1055 (if (eolp) (forward-char 1)) | |
| 1056 (setq texinfo-command-end (point)) | |
| 1057 (nreverse args))) | |
| 1058 | |
| 1059 (defun texinfo-format-parse-defun-args () | |
| 1060 (goto-char texinfo-command-end) | |
| 1061 (let ((start (point))) | |
| 1062 (end-of-line) | |
| 1063 (setq texinfo-command-end (1+ (point))) | |
| 1064 (let ((marker (move-marker (make-marker) texinfo-command-end))) | |
| 1065 (texinfo-format-expand-region start (point)) | |
| 1066 (setq texinfo-command-end (marker-position marker)) | |
| 1067 (move-marker marker nil)) | |
| 1068 (goto-char start) | |
| 1069 (let ((args '()) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1070 beg end) |
| 189 | 1071 (skip-chars-forward " ") |
| 1072 (while (not (eolp)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1073 (cond ((looking-at "{") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1074 (setq beg (1+ (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1075 (forward-list 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1076 (setq end (1- (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1077 (t |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1078 (setq beg (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1079 (re-search-forward "[\n ]") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1080 (forward-char -1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1081 (setq end (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1082 (setq args (cons (buffer-substring beg end) args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1083 (skip-chars-forward " ")) |
| 189 | 1084 (forward-char 1) |
| 1085 (nreverse args)))) | |
| 1086 | |
| 1087 (defun texinfo-discard-line () | |
| 1088 (goto-char texinfo-command-end) | |
| 1089 (skip-chars-forward " \t") | |
| 1090 (or (eolp) | |
| 1091 (error "Extraneous text at end of command line.")) | |
| 1092 (goto-char texinfo-command-start) | |
| 1093 (or (bolp) | |
| 1094 (error "Extraneous text at beginning of command line.")) | |
| 1095 (delete-region (point) (progn (forward-line 1) (point)))) | |
| 1096 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1097 (defun texinfo-discard-line-with-args () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1098 (goto-char texinfo-command-start) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1099 (delete-region (point) (progn (forward-line 1) (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1100 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1101 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1102 ;;; @setfilename |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1103 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1104 ;; Only `texinfo-format-buffer' handles @setfilename with this |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1105 ;; definition; `texinfo-format-region' handles @setfilename, if any, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1106 ;; specially. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1107 (put 'setfilename 'texinfo-format 'texinfo-format-setfilename) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1108 (defun texinfo-format-setfilename () |
|
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
1109 (texinfo-parse-arg-discard)) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1110 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1111 ;;; @node, @menu, @detailmenu |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1112 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1113 (put 'node 'texinfo-format 'texinfo-format-node) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1114 (put 'nwnode 'texinfo-format 'texinfo-format-node) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1115 (defun texinfo-format-node () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1116 (let* ((args (texinfo-format-parse-line-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1117 (name (nth 0 args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1118 (next (nth 1 args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1119 (prev (nth 2 args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1120 (up (nth 3 args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1121 (texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1122 (setq texinfo-last-node name) |
|
24314
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
1123 (let ((tem (if texinfo-fold-nodename-case (downcase name) name))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1124 (if (assoc tem texinfo-node-names) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1125 (error "Duplicate node name: %s" name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1126 (setq texinfo-node-names (cons (list tem) texinfo-node-names)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1127 (setq texinfo-footnote-number 0) |
|
9896
a70b99926339
(texinfo-format-node): Insert the node delimiter
Richard M. Stallman <rms@gnu.org>
parents:
9759
diff
changeset
|
1128 ;; insert "\n\^_" unconditionally since this is what info is looking for |
|
a70b99926339
(texinfo-format-node): Insert the node delimiter
Richard M. Stallman <rms@gnu.org>
parents:
9759
diff
changeset
|
1129 (insert "\n\^_\nFile: " texinfo-format-filename |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1130 ", Node: " name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1131 (if next |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1132 (insert ", Next: " next)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1133 (if prev |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1134 (insert ", Prev: " prev)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1135 (if up |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1136 (insert ", Up: " up)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1137 (insert ?\n) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1138 (setq texinfo-last-node-pos (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1139 |
|
22661
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1140 (put 'anchor 'texinfo-format 'texinfo-anchor) |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1141 (defun texinfo-anchor () |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1142 (let (anchor-string |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1143 (here (- (point) 7)) ; save location of beginning of `@anchor' |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1144 (arg (texinfo-parse-arg-discard))) |
|
24745
aa8417416f03
(texinfo-anchor): Don't delete a non-speace after the @anchor command.
Richard M. Stallman <rms@gnu.org>
parents:
24621
diff
changeset
|
1145 (if (looking-at " ") ; since a space may be left after -discard |
|
aa8417416f03
(texinfo-anchor): Don't delete a non-speace after the @anchor command.
Richard M. Stallman <rms@gnu.org>
parents:
24621
diff
changeset
|
1146 (delete-char 1)) |
|
22661
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1147 (forward-paragraph) |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1148 (let ((end (point))) |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1149 (if (save-excursion |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1150 (backward-word 1) |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1151 (search-forward "@refill" end t)) |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1152 (setq anchor-string "@anchor-yes-refill") |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1153 (setq anchor-string "@anchor-no-refill"))) |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1154 (goto-char here) |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1155 (insert anchor-string "{" arg "}"))) |
|
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1156 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1157 (put 'menu 'texinfo-format 'texinfo-format-menu) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1158 (defun texinfo-format-menu () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1159 (texinfo-discard-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1160 (insert "* Menu:\n\n")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1161 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1162 (put 'menu 'texinfo-end 'texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1163 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1164 ;; The @detailmenu should be removed eventually. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1165 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1166 ;; According to Karl Berry, 31 August 1996: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1167 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1168 ;; You don't like, I don't like it. I agree, it would be better just to |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1169 ;; fix the bug [in `makeinfo']. .. At this point, since inserting those |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1170 ;; two commands in the Elisp fn is trivial, I don't especially want to |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1171 ;; expend more effort... |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1172 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1173 ;; I added a couple sentences of documentation to the manual (putting the |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1174 ;; blame on makeinfo where it belongs :-(). |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1175 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1176 (put 'detailmenu 'texinfo-format 'texinfo-discard-line) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1177 (put 'detailmenu 'texinfo-end 'texinfo-discard-command) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1178 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1179 ;; (Also see `texnfo-upd.el') |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1180 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1181 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1182 ;;; Cross references |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1183 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1184 ;; @xref {NODE, FNAME, NAME, FILE, DOCUMENT} |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1185 ;; -> *Note FNAME: (FILE)NODE |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1186 ;; If FILE is missing, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1187 ;; *Note FNAME: NODE |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1188 ;; If FNAME is empty and NAME is present |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1189 ;; *Note NAME: Node |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1190 ;; If both NAME and FNAME are missing |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1191 ;; *Note NODE:: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1192 ;; texinfo ignores the DOCUMENT argument. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1193 ;; -> See section <xref to NODE> [NAME, else NODE], page <xref to NODE> |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1194 ;; If FILE is specified, (FILE)NODE is used for xrefs. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1195 ;; If fifth argument DOCUMENT is specified, produces |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1196 ;; See section <xref to NODE> [NAME, else NODE], page <xref to NODE> |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1197 ;; of DOCUMENT |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1198 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1199 ;; @ref a reference that does not put `See' or `see' in |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1200 ;; the hardcopy and is the same as @xref in Info |
| 189 | 1201 (put 'ref 'texinfo-format 'texinfo-format-xref) |
| 1202 | |
| 1203 (put 'xref 'texinfo-format 'texinfo-format-xref) | |
| 1204 (defun texinfo-format-xref () | |
| 1205 (let ((args (texinfo-format-parse-args))) | |
| 1206 (texinfo-discard-command) | |
| 1207 (insert "*Note ") | |
| 1208 (let ((fname (or (nth 1 args) (nth 2 args)))) | |
| 1209 (if (null (or fname (nth 3 args))) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1210 (insert (car args) "::") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1211 (insert (or fname (car args)) ": ") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1212 (if (nth 3 args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1213 (insert "(" (nth 3 args) ")")) |
|
28740
14cc47ddd47a
(texinfo-format-xref): Don't try to insert nil.
Gerd Moellmann <gerd@gnu.org>
parents:
27254
diff
changeset
|
1214 (and (car args) (insert (car args))))))) |
| 189 | 1215 |
| 1216 (put 'pxref 'texinfo-format 'texinfo-format-pxref) | |
| 1217 (defun texinfo-format-pxref () | |
| 1218 (texinfo-format-xref) | |
| 1219 (or (save-excursion | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1220 (forward-char -2) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1221 (looking-at "::")) |
| 189 | 1222 (insert "."))) |
| 1223 | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1224 ;; @inforef{NODE, FNAME, FILE} |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1225 ;; Like @xref{NODE, FNAME,,FILE} in texinfo. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1226 ;; In Tex, generates "See Info file FILE, node NODE" |
| 189 | 1227 (put 'inforef 'texinfo-format 'texinfo-format-inforef) |
| 1228 (defun texinfo-format-inforef () | |
| 1229 (let ((args (texinfo-format-parse-args))) | |
| 1230 (texinfo-discard-command) | |
| 1231 (if (nth 1 args) | |
| 1232 (insert "*Note " (nth 1 args) ": (" (nth 2 args) ")" (car args)) | |
| 1233 (insert "*Note " "(" (nth 2 args) ")" (car args) "::")))) | |
| 1234 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1235 |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1236 ;;; URL Reference: @uref |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1237 |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1238 ;; @uref produces a reference to a uniform resource locator (URL). |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1239 ;; It takes one mandatory argument, the URL, and one optional argument, |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1240 ;; the text to display (the default is the URL itself). |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1241 |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1242 (put 'uref 'texinfo-format 'texinfo-format-uref) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1243 (defun texinfo-format-uref () |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1244 "Format URL and optional URL-TITLE. |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1245 Insert ` ... ' around URL if no URL-TITLE argument; |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1246 otherwise, insert URL-TITLE followed by URL in parentheses." |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1247 (let ((args (texinfo-format-parse-args))) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1248 (texinfo-discard-command) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1249 ;; if url-title |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1250 (if (nth 1 args) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1251 (insert (nth 1 args) " (" (nth 0 args) ")") |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1252 (insert "`" (nth 0 args) "'")) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1253 (goto-char texinfo-command-start))) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1254 |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1255 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1256 ;;; Section headings |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1257 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1258 (put 'majorheading 'texinfo-format 'texinfo-format-chapter) |
| 189 | 1259 (put 'chapheading 'texinfo-format 'texinfo-format-chapter) |
| 1260 (put 'ichapter 'texinfo-format 'texinfo-format-chapter) | |
| 1261 (put 'chapter 'texinfo-format 'texinfo-format-chapter) | |
| 1262 (put 'iappendix 'texinfo-format 'texinfo-format-chapter) | |
| 1263 (put 'appendix 'texinfo-format 'texinfo-format-chapter) | |
| 1264 (put 'iunnumbered 'texinfo-format 'texinfo-format-chapter) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1265 (put 'top 'texinfo-format 'texinfo-format-chapter) |
| 189 | 1266 (put 'unnumbered 'texinfo-format 'texinfo-format-chapter) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1267 (put 'centerchap 'texinfo-format 'texinfo-format-chapter) |
| 189 | 1268 (defun texinfo-format-chapter () |
| 1269 (texinfo-format-chapter-1 ?*)) | |
| 1270 | |
| 1271 (put 'heading 'texinfo-format 'texinfo-format-section) | |
| 1272 (put 'isection 'texinfo-format 'texinfo-format-section) | |
| 1273 (put 'section 'texinfo-format 'texinfo-format-section) | |
| 1274 (put 'iappendixsection 'texinfo-format 'texinfo-format-section) | |
| 1275 (put 'appendixsection 'texinfo-format 'texinfo-format-section) | |
| 1276 (put 'iappendixsec 'texinfo-format 'texinfo-format-section) | |
| 1277 (put 'appendixsec 'texinfo-format 'texinfo-format-section) | |
| 1278 (put 'iunnumberedsec 'texinfo-format 'texinfo-format-section) | |
| 1279 (put 'unnumberedsec 'texinfo-format 'texinfo-format-section) | |
| 1280 (defun texinfo-format-section () | |
| 1281 (texinfo-format-chapter-1 ?=)) | |
| 1282 | |
| 1283 (put 'subheading 'texinfo-format 'texinfo-format-subsection) | |
| 1284 (put 'isubsection 'texinfo-format 'texinfo-format-subsection) | |
| 1285 (put 'subsection 'texinfo-format 'texinfo-format-subsection) | |
| 1286 (put 'iappendixsubsec 'texinfo-format 'texinfo-format-subsection) | |
| 1287 (put 'appendixsubsec 'texinfo-format 'texinfo-format-subsection) | |
| 1288 (put 'iunnumberedsubsec 'texinfo-format 'texinfo-format-subsection) | |
| 1289 (put 'unnumberedsubsec 'texinfo-format 'texinfo-format-subsection) | |
| 1290 (defun texinfo-format-subsection () | |
| 1291 (texinfo-format-chapter-1 ?-)) | |
| 1292 | |
| 1293 (put 'subsubheading 'texinfo-format 'texinfo-format-subsubsection) | |
| 1294 (put 'isubsubsection 'texinfo-format 'texinfo-format-subsubsection) | |
| 1295 (put 'subsubsection 'texinfo-format 'texinfo-format-subsubsection) | |
| 1296 (put 'iappendixsubsubsec 'texinfo-format 'texinfo-format-subsubsection) | |
| 1297 (put 'appendixsubsubsec 'texinfo-format 'texinfo-format-subsubsection) | |
| 1298 (put 'iunnumberedsubsubsec 'texinfo-format 'texinfo-format-subsubsection) | |
| 1299 (put 'unnumberedsubsubsec 'texinfo-format 'texinfo-format-subsubsection) | |
| 1300 (defun texinfo-format-subsubsection () | |
| 1301 (texinfo-format-chapter-1 ?.)) | |
| 1302 | |
| 1303 (defun texinfo-format-chapter-1 (belowchar) | |
| 1304 (let ((arg (texinfo-parse-arg-discard))) | |
| 1305 (message "Formatting: %s ... " arg) ; So we can see where we are. | |
| 1306 (insert ?\n arg ?\n "@SectionPAD " belowchar ?\n) | |
| 1307 (forward-line -2))) | |
| 1308 | |
| 1309 (put 'SectionPAD 'texinfo-format 'texinfo-format-sectionpad) | |
| 1310 (defun texinfo-format-sectionpad () | |
| 1311 (let ((str (texinfo-parse-arg-discard))) | |
| 1312 (forward-char -1) | |
| 1313 (let ((column (current-column))) | |
| 1314 (forward-char 1) | |
| 1315 (while (> column 0) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1316 (insert str) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1317 (setq column (1- column)))) |
| 189 | 1318 (insert ?\n))) |
| 1319 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1320 |
|
9754
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1321 ;;; Space controlling commands: @. and @:, and the soft hyphen. |
|
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1322 |
| 189 | 1323 (put '\. 'texinfo-format 'texinfo-format-\.) |
| 1324 (defun texinfo-format-\. () | |
| 1325 (texinfo-discard-command) | |
| 1326 (insert ".")) | |
| 1327 | |
| 1328 (put '\: 'texinfo-format 'texinfo-format-\:) | |
| 1329 (defun texinfo-format-\: () | |
| 1330 (texinfo-discard-command)) | |
| 1331 | |
|
9754
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1332 (put '\- 'texinfo-format 'texinfo-format-soft-hyphen) |
|
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1333 (defun texinfo-format-soft-hyphen () |
|
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1334 (texinfo-discard-command)) |
|
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1335 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1336 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1337 ;;; @center, @sp, and @br |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1338 |
| 189 | 1339 (put 'center 'texinfo-format 'texinfo-format-center) |
| 1340 (defun texinfo-format-center () | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1341 (let ((arg (texinfo-parse-expanded-arg))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1342 (texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1343 (insert arg) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1344 (insert ?\n) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1345 (save-restriction |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1346 (goto-char (1- (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1347 (let ((indent-tabs-mode nil)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1348 (center-line))))) |
| 189 | 1349 |
| 1350 (put 'sp 'texinfo-format 'texinfo-format-sp) | |
| 1351 (defun texinfo-format-sp () | |
| 1352 (let* ((arg (texinfo-parse-arg-discard)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1353 (num (read arg))) |
| 189 | 1354 (insert-char ?\n num))) |
| 1355 | |
| 1356 (put 'br 'texinfo-format 'texinfo-format-paragraph-break) | |
| 1357 (defun texinfo-format-paragraph-break () | |
| 1358 "Force a paragraph break. | |
| 1359 If used within a line, follow `@br' with braces." | |
| 1360 (texinfo-optional-braces-discard) | |
| 1361 ;; insert one return if at end of line; | |
| 1362 ;; else insert two returns, to generate a blank line. | |
| 1363 (if (= (following-char) ?\n) | |
| 1364 (insert ?\n) | |
| 1365 (insert-char ?\n 2))) | |
| 1366 | |
| 1367 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1368 ;;; @footnote and @footnotestyle |
| 189 | 1369 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1370 ;; In Texinfo, footnotes are created with the `@footnote' command. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1371 ;; This command is followed immediately by a left brace, then by the text of |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1372 ;; the footnote, and then by a terminating right brace. The |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1373 ;; template for a footnote is: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1374 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1375 ;; @footnote{TEXT} |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1376 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1377 ;; Info has two footnote styles: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1378 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1379 ;; * In the End of node style, all the footnotes for a single node |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1380 ;; are placed at the end of that node. The footnotes are |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1381 ;; separated from the rest of the node by a line of dashes with |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1382 ;; the word `Footnotes' within it. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1383 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1384 ;; * In the Separate node style, all the footnotes for a single node |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1385 ;; are placed in an automatically constructed node of their own. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1386 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1387 ;; Footnote style is specified by the @footnotestyle command, either |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1388 ;; @footnotestyle separate |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1389 ;; or |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1390 ;; @footnotestyle end |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1391 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1392 ;; The default is separate |
| 189 | 1393 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1394 (defvar texinfo-footnote-style "separate" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1395 "Footnote style, either separate or end.") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1396 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1397 (put 'footnotestyle 'texinfo-format 'texinfo-footnotestyle) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1398 (defun texinfo-footnotestyle () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1399 "Specify whether footnotes are at end of node or in separate nodes. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1400 Argument is either end or separate." |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1401 (setq texinfo-footnote-style (texinfo-parse-arg-discard))) |
| 189 | 1402 |
| 1403 (defvar texinfo-footnote-number) | |
| 1404 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1405 (put 'footnote 'texinfo-format 'texinfo-format-footnote) |
| 189 | 1406 (defun texinfo-format-footnote () |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1407 "Format a footnote in either end of node or separate node style. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1408 The texinfo-footnote-style variable controls which style is used." |
| 189 | 1409 (setq texinfo-footnote-number (1+ texinfo-footnote-number)) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1410 (cond ((string= texinfo-footnote-style "end") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1411 (texinfo-format-end-node)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1412 ((string= texinfo-footnote-style "separate") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1413 (texinfo-format-separate-node)))) |
| 189 | 1414 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1415 (defun texinfo-format-separate-node () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1416 "Format footnote in Separate node style, with notes in own node. |
| 189 | 1417 The node is constructed automatically." |
| 1418 (let* (start | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1419 (arg (texinfo-parse-line-arg)) |
| 189 | 1420 (node-name-beginning |
| 1421 (save-excursion | |
| 1422 (re-search-backward | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1423 "^File: \\w+\\(\\w\\|\\s_\\|\\.\\|,\\)*[ \t]+Node:") |
| 189 | 1424 (match-end 0))) |
| 1425 (node-name | |
| 1426 (save-excursion | |
| 1427 (buffer-substring | |
| 1428 (progn (goto-char node-name-beginning) ; skip over node command | |
| 1429 (skip-chars-forward " \t") ; and over spaces | |
| 1430 (point)) | |
| 1431 (if (search-forward | |
| 1432 "," | |
| 1433 (save-excursion (end-of-line) (point)) t) ; bound search | |
| 1434 (1- (point)) | |
| 1435 (end-of-line) (point)))))) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1436 (texinfo-discard-command) ; remove or insert whitespace, as needed |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1437 (delete-region (save-excursion (skip-chars-backward " \t\n") (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1438 (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1439 (insert (format " (%d) (*Note %s-Footnotes::)" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1440 texinfo-footnote-number node-name)) |
| 189 | 1441 (fill-paragraph nil) |
| 1442 (save-excursion | |
| 1443 (if (re-search-forward "^@node" nil 'move) | |
| 1444 (forward-line -1)) | |
| 1445 | |
| 1446 ;; two cases: for the first footnote, we must insert a node header; | |
| 1447 ;; for the second and subsequent footnotes, we need only insert | |
| 1448 ;; the text of the footnote. | |
| 1449 | |
| 1450 (if (save-excursion | |
| 1451 (re-search-backward | |
| 1452 (concat node-name "-Footnotes, Up: ") | |
| 1453 node-name-beginning | |
| 1454 t)) | |
| 1455 (progn ; already at least one footnote | |
| 1456 (setq start (point)) | |
| 1457 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg)) | |
| 1458 (fill-region start (point))) | |
| 1459 ;; else not yet a footnote | |
| 1460 (insert "\n\^_\nFile: " texinfo-format-filename | |
| 1461 " Node: " node-name "-Footnotes, Up: " node-name "\n") | |
| 1462 (setq start (point)) | |
| 1463 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg)) | |
| 1464 (fill-region start (point)))))) | |
| 1465 | |
| 1466 (defun texinfo-format-end-node () | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1467 "Format footnote in the End of node style, with notes at end of node." |
| 189 | 1468 (let (start |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1469 (arg (texinfo-parse-line-arg))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1470 (texinfo-discard-command) ; remove or insert whitespace, as needed |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1471 (delete-region (save-excursion (skip-chars-backward " \t\n") (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1472 (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1473 (insert (format " (%d) " texinfo-footnote-number)) |
| 189 | 1474 (fill-paragraph nil) |
| 1475 (save-excursion | |
| 1476 (if (search-forward "\n--------- Footnotes ---------\n" nil t) | |
| 1477 (progn ; already have footnote, put new one before end of node | |
| 1478 (if (re-search-forward "^@node" nil 'move) | |
| 1479 (forward-line -1)) | |
| 1480 (setq start (point)) | |
| 1481 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg)) | |
| 1482 (fill-region start (point))) | |
| 1483 ;; else no prior footnote | |
| 1484 (if (re-search-forward "^@node" nil 'move) | |
| 1485 (forward-line -1)) | |
| 1486 (insert "\n--------- Footnotes ---------\n") | |
| 1487 (setq start (point)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1488 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg)))))) |
| 189 | 1489 |
| 1490 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1491 ;;; @itemize, @enumerate, and similar commands |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1492 |
| 189 | 1493 ;; @itemize pushes (itemize "COMMANDS" STARTPOS) on texinfo-stack. |
| 1494 ;; @enumerate pushes (enumerate 0 STARTPOS). | |
| 1495 ;; @item dispatches to the texinfo-item prop of the first elt of the list. | |
| 1496 ;; For itemize, this puts in and rescans the COMMANDS. | |
| 1497 ;; For enumerate, this increments the number and puts it in. | |
| 1498 ;; In either case, it puts a Backspace at the front of the line | |
| 1499 ;; which marks it not to be indented later. | |
| 1500 ;; All other lines get indented by 5 when the @end is reached. | |
| 1501 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1502 (defvar texinfo-stack-depth 0 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1503 "Count of number of unpopped texinfo-push-stack calls. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1504 Used by @refill indenting command to avoid indenting within lists, etc.") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1505 |
| 189 | 1506 (defun texinfo-push-stack (check arg) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1507 (setq texinfo-stack-depth (1+ texinfo-stack-depth)) |
| 189 | 1508 (setq texinfo-stack |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1509 (cons (list check arg texinfo-command-start) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1510 texinfo-stack))) |
| 189 | 1511 |
| 1512 (defun texinfo-pop-stack (check) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1513 (setq texinfo-stack-depth (1- texinfo-stack-depth)) |
| 189 | 1514 (if (null texinfo-stack) |
| 1515 (error "Unmatched @end %s" check)) | |
| 1516 (if (not (eq (car (car texinfo-stack)) check)) | |
| 1517 (error "@end %s matches @%s" | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1518 check (car (car texinfo-stack)))) |
| 189 | 1519 (prog1 (cdr (car texinfo-stack)) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1520 (setq texinfo-stack (cdr texinfo-stack)))) |
| 189 | 1521 |
| 1522 (put 'itemize 'texinfo-format 'texinfo-itemize) | |
| 1523 (defun texinfo-itemize () | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1524 (texinfo-push-stack |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1525 'itemize |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1526 (progn (skip-chars-forward " \t") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1527 (if (eolp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1528 "@bullet" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1529 (texinfo-parse-line-arg)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1530 (texinfo-discard-line-with-args) |
| 189 | 1531 (setq fill-column (- fill-column 5))) |
| 1532 | |
| 1533 (put 'itemize 'texinfo-end 'texinfo-end-itemize) | |
| 1534 (defun texinfo-end-itemize () | |
| 1535 (setq fill-column (+ fill-column 5)) | |
| 1536 (texinfo-discard-command) | |
| 1537 (let ((stacktop | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1538 (texinfo-pop-stack 'itemize))) |
| 189 | 1539 (texinfo-do-itemize (nth 1 stacktop)))) |
| 1540 | |
| 1541 (put 'enumerate 'texinfo-format 'texinfo-enumerate) | |
| 1542 (defun texinfo-enumerate () | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1543 (texinfo-push-stack |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1544 'enumerate |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1545 (progn (skip-chars-forward " \t") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1546 (if (eolp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1547 1 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1548 (read (current-buffer))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1549 (if (and (symbolp (car (cdr (car texinfo-stack)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1550 (> 1 (length (symbol-name (car (cdr (car texinfo-stack))))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1551 (error |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1552 "@enumerate: Use a number or letter, eg: 1, A, a, 3, B, or d." )) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1553 (texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1554 (setq fill-column (- fill-column 5))) |
| 189 | 1555 |
| 1556 (put 'enumerate 'texinfo-end 'texinfo-end-enumerate) | |
| 1557 (defun texinfo-end-enumerate () | |
| 1558 (setq fill-column (+ fill-column 5)) | |
| 1559 (texinfo-discard-command) | |
| 1560 (let ((stacktop | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1561 (texinfo-pop-stack 'enumerate))) |
| 189 | 1562 (texinfo-do-itemize (nth 1 stacktop)))) |
| 1563 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1564 ;; @alphaenumerate never became a standard part of Texinfo |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1565 (put 'alphaenumerate 'texinfo-format 'texinfo-alphaenumerate) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1566 (defun texinfo-alphaenumerate () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1567 (texinfo-push-stack 'alphaenumerate (1- ?a)) |
| 189 | 1568 (setq fill-column (- fill-column 5)) |
| 1569 (texinfo-discard-line)) | |
| 1570 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1571 (put 'alphaenumerate 'texinfo-end 'texinfo-end-alphaenumerate) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1572 (defun texinfo-end-alphaenumerate () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1573 (setq fill-column (+ fill-column 5)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1574 (texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1575 (let ((stacktop |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1576 (texinfo-pop-stack 'alphaenumerate))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1577 (texinfo-do-itemize (nth 1 stacktop)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1578 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1579 ;; @capsenumerate never became a standard part of Texinfo |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1580 (put 'capsenumerate 'texinfo-format 'texinfo-capsenumerate) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1581 (defun texinfo-capsenumerate () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1582 (texinfo-push-stack 'capsenumerate (1- ?A)) |
| 189 | 1583 (setq fill-column (- fill-column 5)) |
| 1584 (texinfo-discard-line)) | |
| 1585 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1586 (put 'capsenumerate 'texinfo-end 'texinfo-end-capsenumerate) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1587 (defun texinfo-end-capsenumerate () |
| 189 | 1588 (setq fill-column (+ fill-column 5)) |
| 1589 (texinfo-discard-command) | |
| 1590 (let ((stacktop | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1591 (texinfo-pop-stack 'capsenumerate))) |
| 189 | 1592 (texinfo-do-itemize (nth 1 stacktop)))) |
| 1593 | |
| 1594 ;; At the @end, indent all the lines within the construct | |
| 1595 ;; except those marked with backspace. FROM says where | |
| 1596 ;; construct started. | |
| 1597 (defun texinfo-do-itemize (from) | |
| 1598 (save-excursion | |
| 1599 (while (progn (forward-line -1) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1600 (>= (point) from)) |
| 189 | 1601 (if (= (following-char) ?\b) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1602 (save-excursion |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1603 (delete-char 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1604 (end-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1605 (delete-char 6)) |
| 189 | 1606 (if (not (looking-at "[ \t]*$")) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1607 (save-excursion (insert " "))))))) |
| 189 | 1608 |
| 1609 (put 'item 'texinfo-format 'texinfo-item) | |
| 1610 (put 'itemx 'texinfo-format 'texinfo-item) | |
| 1611 (defun texinfo-item () | |
| 1612 (funcall (get (car (car texinfo-stack)) 'texinfo-item))) | |
| 1613 | |
| 1614 (put 'itemize 'texinfo-item 'texinfo-itemize-item) | |
| 1615 (defun texinfo-itemize-item () | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1616 ;; (texinfo-discard-line) ; Did not handle text on same line as @item. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1617 (delete-region (1+ (point)) (save-excursion (beginning-of-line) (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1618 (if (looking-at "[ \t]*[^ \t\n]+") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1619 ;; Text on same line as @item command. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1620 (insert "\b " (nth 1 (car texinfo-stack)) " \n") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1621 ;; Else text on next line. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1622 (insert "\b " (nth 1 (car texinfo-stack)) " ")) |
| 189 | 1623 (forward-line -1)) |
| 1624 | |
| 1625 (put 'enumerate 'texinfo-item 'texinfo-enumerate-item) | |
| 1626 (defun texinfo-enumerate-item () | |
| 1627 (texinfo-discard-line) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1628 (let (enumerating-symbol) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1629 (cond ((integerp (car (cdr (car texinfo-stack)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1630 (setq enumerating-symbol (car (cdr (car texinfo-stack)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1631 (insert ?\b (format "%3d. " enumerating-symbol) ?\n) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1632 (setcar (cdr (car texinfo-stack)) (1+ enumerating-symbol))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1633 ((symbolp (car (cdr (car texinfo-stack)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1634 (setq enumerating-symbol |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1635 (symbol-name (car (cdr (car texinfo-stack))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1636 (if (or (equal ?\[ (string-to-char enumerating-symbol)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1637 (equal ?\{ (string-to-char enumerating-symbol))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1638 (error |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1639 "Too many items in enumerated list; alphabet ends at Z.")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1640 (insert ?\b (format "%3s. " enumerating-symbol) ?\n) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1641 (setcar (cdr (car texinfo-stack)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1642 (make-symbol |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1643 (char-to-string |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1644 (1+ |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1645 (string-to-char enumerating-symbol)))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1646 (t |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1647 (error |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1648 "@enumerate: Use a number or letter, eg: 1, A, a, 3, B or d." ))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1649 (forward-line -1))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1650 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1651 (put 'alphaenumerate 'texinfo-item 'texinfo-alphaenumerate-item) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1652 (defun texinfo-alphaenumerate-item () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1653 (texinfo-discard-line) |
| 189 | 1654 (let ((next (1+ (car (cdr (car texinfo-stack)))))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1655 (if (> next ?z) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1656 (error "More than 26 items in @alphaenumerate; get a bigger alphabet.")) |
| 189 | 1657 (setcar (cdr (car texinfo-stack)) next) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1658 (insert "\b " next ". \n")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1659 (forward-line -1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1660 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1661 (put 'capsenumerate 'texinfo-item 'texinfo-capsenumerate-item) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1662 (defun texinfo-capsenumerate-item () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1663 (texinfo-discard-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1664 (let ((next (1+ (car (cdr (car texinfo-stack)))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1665 (if (> next ?Z) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1666 (error "More than 26 items in @capsenumerate; get a bigger alphabet.")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1667 (setcar (cdr (car texinfo-stack)) next) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1668 (insert "\b " next ". \n")) |
| 189 | 1669 (forward-line -1)) |
| 1670 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1671 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1672 ;;; @table |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1673 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1674 ;; The `@table' command produces two-column tables. |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1675 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1676 (put 'table 'texinfo-format 'texinfo-table) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1677 (defun texinfo-table () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1678 (texinfo-push-stack |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1679 'table |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1680 (progn (skip-chars-forward " \t") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1681 (if (eolp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1682 "@asis" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1683 (texinfo-parse-line-arg)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1684 (texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1685 (setq fill-column (- fill-column 5))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1686 |
| 189 | 1687 (put 'table 'texinfo-item 'texinfo-table-item) |
| 1688 (defun texinfo-table-item () | |
| 1689 (let ((arg (texinfo-parse-arg-discard)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1690 (itemfont (car (cdr (car texinfo-stack))))) |
| 189 | 1691 (insert ?\b itemfont ?\{ arg "}\n \n")) |
| 1692 (forward-line -2)) | |
| 1693 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1694 (put 'table 'texinfo-end 'texinfo-end-table) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1695 (defun texinfo-end-table () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1696 (setq fill-column (+ fill-column 5)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1697 (texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1698 (let ((stacktop |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1699 (texinfo-pop-stack 'table))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1700 (texinfo-do-itemize (nth 1 stacktop)))) |
| 189 | 1701 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1702 ;; @description appears to be an undocumented variant on @table that |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1703 ;; does not require an arg. It fails in texinfo.tex 2.58 and is not |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1704 ;; part of makeinfo.c The command appears to be a relic of the past. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1705 (put 'description 'texinfo-end 'texinfo-end-table) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1706 (put 'description 'texinfo-format 'texinfo-description) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1707 (defun texinfo-description () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1708 (texinfo-push-stack 'table "@asis") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1709 (setq fill-column (- fill-column 5)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1710 (texinfo-discard-line)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1711 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1712 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1713 ;;; @ftable, @vtable |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1714 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1715 ;; The `@ftable' and `@vtable' commands are like the `@table' command |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1716 ;; but they also insert each entry in the first column of the table |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1717 ;; into the function or variable index. |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1718 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1719 ;; Handle the @ftable and @vtable commands: |
| 189 | 1720 |
| 1721 (put 'ftable 'texinfo-format 'texinfo-ftable) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1722 (put 'vtable 'texinfo-format 'texinfo-vtable) |
| 189 | 1723 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1724 (defun texinfo-ftable () (texinfo-indextable 'ftable)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1725 (defun texinfo-vtable () (texinfo-indextable 'vtable)) |
| 189 | 1726 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1727 (defun texinfo-indextable (table-type) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1728 (texinfo-push-stack table-type (texinfo-parse-arg-discard)) |
| 189 | 1729 (setq fill-column (- fill-column 5))) |
| 1730 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1731 ;; Handle the @item commands within ftable and vtable: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1732 |
| 189 | 1733 (put 'ftable 'texinfo-item 'texinfo-ftable-item) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1734 (put 'vtable 'texinfo-item 'texinfo-vtable-item) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1735 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1736 (defun texinfo-ftable-item () (texinfo-indextable-item 'texinfo-findex)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1737 (defun texinfo-vtable-item () (texinfo-indextable-item 'texinfo-vindex)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1738 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1739 (defun texinfo-indextable-item (index-type) |
| 189 | 1740 (let ((item (texinfo-parse-arg-discard)) |
| 1741 (itemfont (car (cdr (car texinfo-stack)))) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1742 (indexvar index-type)) |
| 189 | 1743 (insert ?\b itemfont ?\{ item "}\n \n") |
| 1744 (set indexvar | |
| 1745 (cons | |
| 1746 (list item texinfo-last-node) | |
| 1747 (symbol-value indexvar))) | |
| 1748 (forward-line -2))) | |
| 1749 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1750 ;; Handle @end ftable, @end vtable |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1751 |
| 189 | 1752 (put 'ftable 'texinfo-end 'texinfo-end-ftable) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1753 (put 'vtable 'texinfo-end 'texinfo-end-vtable) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1754 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1755 (defun texinfo-end-ftable () (texinfo-end-indextable 'ftable)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1756 (defun texinfo-end-vtable () (texinfo-end-indextable 'vtable)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1757 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1758 (defun texinfo-end-indextable (table-type) |
| 189 | 1759 (setq fill-column (+ fill-column 5)) |
| 1760 (texinfo-discard-command) | |
| 1761 (let ((stacktop | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1762 (texinfo-pop-stack table-type))) |
| 189 | 1763 (texinfo-do-itemize (nth 1 stacktop)))) |
| 1764 | |
| 1765 | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1766 ;;; @multitable ... @end multitable |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1767 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1768 ;; Produce a multi-column table, with as many columns as desired. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1769 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1770 ;; A multi-column table has this template: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1771 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1772 ;; @multitable {A1} {A2} {A3} |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1773 ;; @item A1 @tab A2 @tab A3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1774 ;; @item B1 @tab B2 @tab B3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1775 ;; @item C1 @tab C2 @tab C3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1776 ;; @end multitable |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1777 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1778 ;; where the width of the text in brackets specifies the width of the |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1779 ;; respective column. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1780 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1781 ;; Or else: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1782 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1783 ;; @multitable @columnfractions .25 .3 .45 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1784 ;; @item A1 @tab A2 @tab A3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1785 ;; @item B1 @tab B2 @tab B3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1786 ;; @end multitable |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1787 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1788 ;; where the fractions specify the width of each column as a percent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1789 ;; of the current width of the text (i.e., of the fill-column). |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1790 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1791 ;; Long lines of text are filled within columns. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1792 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1793 ;; Using the Emacs Lisp formatter, texinfmt.el, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1794 ;; the whitespace between columns can be increased by setting |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1795 ;; `texinfo-extra-inter-column-width' to a value greater than 0. By default, |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1796 ;; there is at least one blank space between columns. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1797 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1798 ;; The Emacs Lisp formatter, texinfmt.el, ignores the following four |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1799 ;; commands that are defined in texinfo.tex for printed output. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1800 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1801 ;; @multitableparskip, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1802 ;; @multitableparindent, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1803 ;; @multitablecolmargin, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1804 ;; @multitablelinespace. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1805 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1806 ;; How @multitable works. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1807 ;; ===================== |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1808 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1809 ;; `texinfo-multitable' reads the @multitable line and determines from it |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1810 ;; how wide each column should be. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1811 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1812 ;; Also, it pushes this information, along with an identifying symbol, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1813 ;; onto the `texinfo-stack'. At the @end multitable command, the stack |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1814 ;; is checked for its matching @multitable command, and then popped, or |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1815 ;; else an error is signaled. Also, this command pushes the location of |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1816 ;; the start of the table onto the stack. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1817 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1818 ;; `texinfo-end-multitable' checks the `texinfo-stack' that the @end |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1819 ;; multitable truly is ending a corresponding beginning, and if it is, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1820 ;; pops the stack. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1821 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1822 ;; `texinfo-multitable-widths' is called by `texinfo-multitable'. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1823 ;; The function returns a list of the widths of each column in a |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1824 ;; multi-column table, based on the information supplied by the arguments |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1825 ;; to the @multitable command (by arguments, I mean the text on the rest |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1826 ;; of the @multitable line, not the remainder of the multi-column table |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1827 ;; environment). |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1828 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1829 ;; `texinfo-multitable-item' formats a row within a multicolumn table. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1830 ;; This command is executed when texinfmt sees @item inside @multitable. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1831 ;; Cells in row are separated by `@tab's. Widths of cells are specified |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1832 ;; by the arguments in the @multitable line. Cells are filled. All cells |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1833 ;; are made to be the same height by padding their bottoms, as needed, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1834 ;; with blanks. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1835 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1836 ;; `texinfo-multitable-extract-row' is called by `texinfo-multitable-item'. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1837 ;; This function returns the text in a multitable row, as a string. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1838 ;; The start of a row is marked by an @item and the end of row is the |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1839 ;; beginning of next @item or beginning of the @end multitable line. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1840 ;; Cells within a row are separated by @tab. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1841 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1842 ;; Note that @tab, the cell separators, are not treated as independent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1843 ;; Texinfo commands. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1844 |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1845 (defvar texinfo-extra-inter-column-width 0 |
|
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1846 "*Number of extra spaces between entries (columns) in @multitable.") |
|
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1847 |
|
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1848 (defvar texinfo-multitable-buffer-name "*multitable-temporary-buffer*") |
|
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1849 (defvar texinfo-multitable-rectangle-name "texinfo-multitable-temp-") |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1850 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1851 ;; These commands are defined in texinfo.tex for printed output. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1852 (put 'multitableparskip 'texinfo-format 'texinfo-discard-line-with-args) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1853 (put 'multitableparindent 'texinfo-format 'texinfo-discard-line-with-args) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1854 (put 'multitablecolmargin 'texinfo-format 'texinfo-discard-line-with-args) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1855 (put 'multitablelinespace 'texinfo-format 'texinfo-discard-line-with-args) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1856 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1857 (put 'multitable 'texinfo-format 'texinfo-multitable) |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1858 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1859 (defun texinfo-multitable () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1860 "Produce multi-column tables. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1861 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1862 A multi-column table has this template: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1863 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1864 @multitable {A1} {A2} {A3} |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1865 @item A1 @tab A2 @tab A3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1866 @item B1 @tab B2 @tab B3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1867 @item C1 @tab C2 @tab C3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1868 @end multitable |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1869 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1870 where the width of the text in brackets specifies the width of the |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1871 respective column. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1872 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1873 Or else: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1874 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1875 @multitable @columnfractions .25 .3 .45 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1876 @item A1 @tab A2 @tab A3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1877 @item B1 @tab B2 @tab B3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1878 @end multitable |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1879 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1880 where the fractions specify the width of each column as a percent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1881 of the current width of the text (i.e., of the fill-column). |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1882 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1883 Long lines of text are filled within columns. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1884 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1885 Using the Emacs Lisp formatter, texinfmt.el, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1886 the whitespace between columns can be increased by setting |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1887 `texinfo-extra-inter-column-width' to a value greater than 0. By default, |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1888 there is at least one blank space between columns. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1889 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1890 The Emacs Lisp formatter, texinfmt.el, ignores the following four |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1891 commands that are defined in texinfo.tex for printed output. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1892 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1893 @multitableparskip, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1894 @multitableparindent, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1895 @multitablecolmargin, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1896 @multitablelinespace." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1897 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1898 ;; This function pushes information onto the `texinfo-stack'. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1899 ;; A stack element consists of: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1900 ;; - type-of-command, i.e., multitable |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1901 ;; - the information about column widths, and |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1902 ;; - the position of texinfo-command-start. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1903 ;; e.g., ('multitable (1 2 3 4) 123) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1904 ;; The command line is then deleted. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1905 (texinfo-push-stack |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1906 'multitable |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1907 ;; push width information on stack |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1908 (texinfo-multitable-widths)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1909 (texinfo-discard-line-with-args)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1910 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1911 (put 'multitable 'texinfo-end 'texinfo-end-multitable) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1912 (defun texinfo-end-multitable () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1913 "Discard the @end multitable line and pop the stack of multitable." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1914 (texinfo-discard-command) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1915 (texinfo-pop-stack 'multitable)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1916 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1917 (defun texinfo-multitable-widths () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1918 "Return list of widths of each column in a multi-column table." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1919 (let (texinfo-multitable-width-list) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1920 ;; Fractions format: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1921 ;; @multitable @columnfractions .25 .3 .45 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1922 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1923 ;; Template format: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1924 ;; @multitable {Column 1 template} {Column 2} {Column 3 example} |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1925 ;; Place point before first argument |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1926 (skip-chars-forward " \t") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1927 (cond |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1928 ;; Check for common misspelling |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1929 ((looking-at "@columnfraction ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1930 (error "In @multitable, @columnfractions misspelled")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1931 ;; Case 1: @columnfractions .25 .3 .45 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1932 ((looking-at "@columnfractions") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1933 (forward-word 1) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1934 (while (not (eolp)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1935 (setq texinfo-multitable-width-list |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1936 (cons |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1937 (truncate |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1938 (1- |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1939 (* fill-column (read (get-buffer (current-buffer)))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1940 texinfo-multitable-width-list)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1941 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1942 ;; Case 2: {Column 1 template} {Column 2} {Column 3 example} |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1943 ((looking-at "{") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1944 (let ((start-of-templates (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1945 (while (not (eolp)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1946 (skip-chars-forward " \t") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1947 (let* ((start-of-template (1+ (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1948 (end-of-template |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1949 ;; forward-sexp works with braces in Texinfo mode |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1950 (progn (forward-sexp 1) (1- (point))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1951 (setq texinfo-multitable-width-list |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1952 (cons (- end-of-template start-of-template) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1953 texinfo-multitable-width-list)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1954 ;; Remove carriage return from within a template, if any. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1955 ;; This helps those those who want to use more than |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1956 ;; one line's worth of words in @multitable line. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1957 (narrow-to-region start-of-template end-of-template) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1958 (goto-char (point-min)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1959 (while (search-forward " |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1960 " nil t) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1961 (delete-char -1)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1962 (goto-char (point-max)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1963 (widen) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1964 (forward-char 1))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1965 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1966 ;; Case 3: Trouble |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1967 (t |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1968 (error |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1969 "You probably need to specify column widths for @multitable correctly."))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1970 ;; Check whether columns fit on page. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1971 (let ((desired-columns |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1972 (+ |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1973 ;; between column spaces |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1974 (length texinfo-multitable-width-list) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1975 ;; additional between column spaces, if any |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1976 texinfo-extra-inter-column-width |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1977 ;; sum of spaces for each entry |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1978 (apply '+ texinfo-multitable-width-list)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1979 (if (> desired-columns fill-column) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1980 (error |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1981 (format |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1982 "Multi-column table width, %d chars, is greater than page width, %d chars." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1983 desired-columns fill-column)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1984 texinfo-multitable-width-list)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1985 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1986 ;; @item A1 @tab A2 @tab A3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1987 (defun texinfo-multitable-extract-row () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1988 "Return multitable row, as a string. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1989 End of row is beginning of next @item or beginning of @end. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1990 Cells within rows are separated by @tab." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1991 (skip-chars-forward " \t") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1992 (let* ((start (point)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1993 (end (progn |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1994 (re-search-forward "@item\\|@end") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1995 (match-beginning 0))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1996 (row (progn (goto-char end) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1997 (skip-chars-backward " ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1998 ;; remove whitespace at end of argument |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1999 (delete-region (point) end) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2000 (buffer-substring start (point))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2001 (delete-region texinfo-command-start end) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2002 row)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2003 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2004 (put 'multitable 'texinfo-item 'texinfo-multitable-item) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2005 (defun texinfo-multitable-item () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2006 "Format a row within a multicolumn table. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2007 Cells in row are separated by @tab. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2008 Widths of cells are specified by the arguments in the @multitable line. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2009 All cells are made to be the same height. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2010 This command is executed when texinfmt sees @item inside @multitable." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2011 (let ((original-buffer (current-buffer)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2012 (table-widths (reverse (car (cdr (car texinfo-stack))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2013 (existing-fill-column fill-column) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2014 start |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2015 end |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2016 (table-column 0) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2017 (table-entry-height 0) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2018 ;; unformatted row looks like: A1 @tab A2 @tab A3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2019 ;; extract-row command deletes the source line in the table. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2020 (unformated-row (texinfo-multitable-extract-row))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2021 ;; Use a temporary buffer |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2022 (set-buffer (get-buffer-create texinfo-multitable-buffer-name)) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2023 (delete-region (point-min) (point-max)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2024 (insert unformated-row) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2025 (goto-char (point-min)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2026 ;; 1. Check for correct number of @tab in line. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2027 (let ((tab-number 1)) ; one @tab between two columns |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2028 (while (search-forward "@tab" nil t) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2029 (setq tab-number (1+ tab-number))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2030 (if (/= tab-number (length table-widths)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2031 (error "Wrong number of @tab's in a @multitable row."))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2032 (goto-char (point-min)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2033 ;; 2. Format each cell, and copy to a rectangle |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2034 ;; buffer looks like this: A1 @tab A2 @tab A3 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2035 ;; Cell #1: format up to @tab |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2036 ;; Cell #2: format up to @tab |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2037 ;; Cell #3: format up to eob |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2038 (while (not (eobp)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2039 (setq start (point)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2040 (setq end (save-excursion |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2041 (if (search-forward "@tab" nil 'move) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2042 ;; Delete the @tab command, including the @-sign |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2043 (delete-region |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2044 (point) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2045 (progn (forward-word -1) (1- (point))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2046 (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2047 ;; Set fill-column *wider* than needed to produce inter-column space |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2048 (setq fill-column (+ 1 |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2049 texinfo-extra-inter-column-width |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2050 (nth table-column table-widths))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2051 (narrow-to-region start end) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2052 ;; Remove whitespace before and after entry. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2053 (skip-chars-forward " ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2054 (delete-region (point) (save-excursion (beginning-of-line) (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2055 (goto-char (point-max)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2056 (skip-chars-backward " ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2057 (delete-region (point) (save-excursion (end-of-line) (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2058 ;; Temorarily set texinfo-stack to nil so texinfo-format-scan |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2059 ;; does not see an unterminated @multitable. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2060 (let (texinfo-stack) ; nil |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2061 (texinfo-format-scan)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2062 (let (fill-prefix) ; no fill prefix |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2063 (fill-region (point-min) (point-max))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2064 (setq table-entry-height |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2065 (max table-entry-height (count-lines (point-min) (point-max)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2066 ;; 3. Move point to end of bottom line, and pad that line to fill column. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2067 (goto-char (point-min)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2068 (forward-line (1- table-entry-height)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2069 (let* ((beg (point)) ; beginning of line |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2070 ;; add one more space for inter-column spacing |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2071 (needed-whitespace |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2072 (1+ |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2073 (- fill-column |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2074 (- |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2075 (progn (end-of-line) (point)) ; end of existing line |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2076 beg))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2077 (insert (make-string |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2078 (if (> needed-whitespace 0) needed-whitespace 1) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2079 ? ))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2080 ;; now, put formatted cell into a rectangle |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2081 (set (intern (concat texinfo-multitable-rectangle-name |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2082 (int-to-string table-column))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2083 (extract-rectangle (point-min) (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2084 (delete-region (point-min) (point)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2085 (goto-char (point-max)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2086 (setq table-column (1+ table-column)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2087 (widen)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2088 ;; 4. Add extra lines to rectangles so all are of same height |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2089 (let ((total-number-of-columns table-column) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2090 (column-number 0) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2091 here) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2092 (while (> table-column 0) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2093 (let ((this-rectangle (int-to-string table-column))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2094 (while (< (length this-rectangle) table-entry-height) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2095 (setq this-rectangle (append this-rectangle '(""))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2096 (setq table-column (1- table-column))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2097 ;; 5. Insert formatted rectangles in original buffer |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2098 (switch-to-buffer original-buffer) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2099 (open-line table-entry-height) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2100 (while (< column-number total-number-of-columns) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2101 (setq here (point)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2102 (insert-rectangle |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2103 (eval (intern |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2104 (concat texinfo-multitable-rectangle-name |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2105 (int-to-string column-number))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2106 (goto-char here) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2107 (end-of-line) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2108 (setq column-number (1+ column-number)))) |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2109 (kill-buffer texinfo-multitable-buffer-name) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2110 (setq fill-column existing-fill-column))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2111 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2112 |
| 25274 | 2113 ;;; @ifinfo, @iftex, @tex, @ifhtml, @html, @ifnottex |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2114 |
| 189 | 2115 (put 'ifinfo 'texinfo-format 'texinfo-discard-line) |
| 2116 (put 'ifinfo 'texinfo-end 'texinfo-discard-command) | |
| 2117 | |
| 2118 (put 'iftex 'texinfo-format 'texinfo-format-iftex) | |
| 2119 (defun texinfo-format-iftex () | |
| 2120 (delete-region texinfo-command-start | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2121 (progn (re-search-forward "@end iftex[ \t]*\n") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2122 (point)))) |
| 189 | 2123 |
|
9549
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2124 (put 'ifhtml 'texinfo-format 'texinfo-format-ifhtml) |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2125 (defun texinfo-format-ifhtml () |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2126 (delete-region texinfo-command-start |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2127 (progn (re-search-forward "@end ifhtml[ \t]*\n") |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2128 (point)))) |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2129 |
| 189 | 2130 (put 'tex 'texinfo-format 'texinfo-format-tex) |
| 2131 (defun texinfo-format-tex () | |
| 2132 (delete-region texinfo-command-start | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2133 (progn (re-search-forward "@end tex[ \t]*\n") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2134 (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2135 |
|
9549
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2136 (put 'html 'texinfo-format 'texinfo-format-html) |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2137 (defun texinfo-format-html () |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2138 (delete-region texinfo-command-start |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2139 (progn (re-search-forward "@end html[ \t]*\n") |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2140 (point)))) |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2141 |
| 25274 | 2142 (put 'ifnottex 'texinfo-format 'texinfo-discard-line) |
| 2143 (put 'ifnottex 'texinfo-end 'texinfo-discard-command) | |
| 2144 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2145 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2146 ;;; @titlepage |
| 189 | 2147 |
| 2148 (put 'titlepage 'texinfo-format 'texinfo-format-titlepage) | |
| 2149 (defun texinfo-format-titlepage () | |
| 2150 (delete-region texinfo-command-start | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2151 (progn (re-search-forward "@end titlepage[ \t]*\n") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2152 (point)))) |
| 189 | 2153 |
| 2154 (put 'endtitlepage 'texinfo-format 'texinfo-discard-line) | |
| 2155 | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2156 ;; @titlespec an alternative titling command; ignored by Info |
| 189 | 2157 |
| 2158 (put 'titlespec 'texinfo-format 'texinfo-format-titlespec) | |
| 2159 (defun texinfo-format-titlespec () | |
| 2160 (delete-region texinfo-command-start | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2161 (progn (re-search-forward "@end titlespec[ \t]*\n") |
| 189 | 2162 (point)))) |
| 2163 | |
| 2164 (put 'endtitlespec 'texinfo-format 'texinfo-discard-line) | |
| 2165 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2166 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2167 ;;; @today |
| 189 | 2168 |
| 2169 (put 'today 'texinfo-format 'texinfo-format-today) | |
| 2170 | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2171 ;; Produces Day Month Year style of output. eg `1 Jan 1900' |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2172 ;; The `@today{}' command requires a pair of braces, like `@dots{}'. |
| 189 | 2173 (defun texinfo-format-today () |
| 2174 (texinfo-parse-arg-discard) | |
|
15680
0f1c12e35879
(texinfo-format-today): Avoid race condition by getting current time only once.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
2175 (insert (format-time-string "%e %b %Y"))) |
| 189 | 2176 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2177 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2178 ;;; @timestamp{} |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2179 ;; Produce `Day Month Year Hour:Min' style of output. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2180 ;; eg `1 Jan 1900 13:52' |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2181 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2182 (put 'timestamp 'texinfo-format 'texinfo-format-timestamp) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2183 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2184 ;; The `@timestamp{}' command requires a pair of braces, like `@dots{}'. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2185 (defun texinfo-format-timestamp () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2186 "Insert the current local time and date." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2187 (texinfo-parse-arg-discard) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2188 ;; For seconds and time zone, replace format string with "%e %b %Y %T %Z" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2189 (insert (format-time-string "%e %b %Y %R"))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2190 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2191 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2192 ;;; @ignore |
| 189 | 2193 |
| 2194 (put 'ignore 'texinfo-format 'texinfo-format-ignore) | |
| 2195 (defun texinfo-format-ignore () | |
| 2196 (delete-region texinfo-command-start | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2197 (progn (re-search-forward "@end ignore[ \t]*\n") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2198 (point)))) |
| 189 | 2199 |
| 2200 (put 'endignore 'texinfo-format 'texinfo-discard-line) | |
| 2201 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2202 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2203 ;;; Define the Info enclosure command: @definfoenclose |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2204 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2205 ;; A `@definfoenclose' command may be used to define a highlighting |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2206 ;; command for Info, but not for TeX. A command defined using |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2207 ;; `@definfoenclose' marks text by enclosing it in strings that precede |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2208 ;; and follow the text. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2209 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2210 ;; Presumably, if you define a command with `@definfoenclose` for Info, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2211 ;; you will also define the same command in the TeX definitions file, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2212 ;; `texinfo.tex' in a manner appropriate for typesetting. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2213 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2214 ;; Write a `@definfoenclose' command on a line and follow it with three |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2215 ;; arguments separated by commas (commas are used as separators in an |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2216 ;; `@node' line in the same way). The first argument to |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2217 ;; `@definfoenclose' is the @-command name \(without the `@'\); the |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2218 ;; second argument is the Info start delimiter string; and the third |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2219 ;; argument is the Info end delimiter string. The latter two arguments |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2220 ;; enclose the highlighted text in the Info file. A delimiter string |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2221 ;; may contain spaces. Neither the start nor end delimiter is |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2222 ;; required. However, if you do not provide a start delimiter, you |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2223 ;; must follow the command name with two commas in a row; otherwise, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2224 ;; the Info formatting commands will misinterpret the end delimiter |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2225 ;; string as a start delimiter string. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2226 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2227 ;; If you do a @definfoenclose{} on the name of a pre-defined macro (such |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2228 ;; as @emph{}, @strong{}, @tt{}, or @i{}) the enclosure definition will |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2229 ;; override the built-in definition. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2230 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2231 ;; An enclosure command defined this way takes one argument in braces. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2232 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2233 ;; For example, you can write: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2234 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2235 ;; @ifinfo |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2236 ;; @definfoenclose phoo, //, \\ |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2237 ;; @end ifinfo |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2238 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2239 ;; near the beginning of a Texinfo file at the beginning of the lines |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2240 ;; to define `@phoo' as an Info formatting command that inserts `//' |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2241 ;; before and `\\' after the argument to `@phoo'. You can then write |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2242 ;; `@phoo{bar}' wherever you want `//bar\\' highlighted in Info. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2243 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2244 ;; Also, for TeX formatting, you could write |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2245 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2246 ;; @iftex |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2247 ;; @global@let@phoo=@i |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2248 ;; @end iftex |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2249 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2250 ;; to define `@phoo' as a command that causes TeX to typeset |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2251 ;; the argument to `@phoo' in italics. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2252 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2253 ;; Note that each definition applies to its own formatter: one for TeX, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2254 ;; the other for texinfo-format-buffer or texinfo-format-region. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2255 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2256 ;; Here is another example: write |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2257 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2258 ;; @definfoenclose headword, , : |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2259 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2260 ;; near the beginning of the file, to define `@headword' as an Info |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2261 ;; formatting command that inserts nothing before and a colon after the |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2262 ;; argument to `@headword'. |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2263 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2264 (put 'definfoenclose 'texinfo-format 'texinfo-define-info-enclosure) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2265 (defun texinfo-define-info-enclosure () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2266 (let* ((args (texinfo-format-parse-line-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2267 (command-name (nth 0 args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2268 (beginning-delimiter (or (nth 1 args) "")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2269 (end-delimiter (or (nth 2 args) ""))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2270 (texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2271 (setq texinfo-enclosure-list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2272 (cons |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2273 (list command-name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2274 (list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2275 beginning-delimiter |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2276 end-delimiter)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2277 texinfo-enclosure-list)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2278 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2279 |
|
24314
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2280 ;;; @alias |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2281 |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2282 (put 'alias 'texinfo-format 'texinfo-alias) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2283 (defun texinfo-alias () |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2284 (let ((start (1- (point))) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2285 args) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2286 (skip-chars-forward " ") |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2287 (save-excursion (end-of-line) (setq texinfo-command-end (point))) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2288 (if (not (looking-at "\\([^=]+\\)=\\(.*\\)")) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2289 (error "Invalid alias command") |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2290 (setq texinfo-alias-list |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2291 (cons |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2292 (cons |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2293 (buffer-substring (match-beginning 1) (match-end 1)) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2294 (buffer-substring (match-beginning 2) (match-end 2))) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2295 texinfo-alias-list)) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2296 (texinfo-discard-command)) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2297 ) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2298 ) |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2299 |
|
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2300 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2301 ;;; @var, @code and the like |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2302 |
| 189 | 2303 (put 'var 'texinfo-format 'texinfo-format-var) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2304 ;; @sc a small caps font for TeX; formatted as `var' in Info |
| 189 | 2305 (put 'sc 'texinfo-format 'texinfo-format-var) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2306 ;; @acronym for abbreviations in all caps, such as `NASA'. |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2307 ;; Convert all letters to uppercase if they are not already. |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2308 (put 'acronym 'texinfo-format 'texinfo-format-var) |
| 189 | 2309 (defun texinfo-format-var () |
|
24750
ea9b449cc742
(texinfo-format-var): Handle other nested constructs, using
Richard M. Stallman <rms@gnu.org>
parents:
24745
diff
changeset
|
2310 (let ((arg (texinfo-parse-expanded-arg))) |
|
ea9b449cc742
(texinfo-format-var): Handle other nested constructs, using
Richard M. Stallman <rms@gnu.org>
parents:
24745
diff
changeset
|
2311 (texinfo-discard-command) |
|
ea9b449cc742
(texinfo-format-var): Handle other nested constructs, using
Richard M. Stallman <rms@gnu.org>
parents:
24745
diff
changeset
|
2312 (insert (upcase arg)))) |
| 189 | 2313 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2314 (put 'cite 'texinfo-format 'texinfo-format-code) |
| 189 | 2315 (put 'code 'texinfo-format 'texinfo-format-code) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2316 ;; @command (for command names) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2317 (put 'command 'texinfo-format 'texinfo-format-code) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2318 ;; @env (for environment variables) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2319 (put 'env 'texinfo-format 'texinfo-format-code) |
| 189 | 2320 (put 'file 'texinfo-format 'texinfo-format-code) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2321 (put 'samp 'texinfo-format 'texinfo-format-code) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2322 (put 'url 'texinfo-format 'texinfo-format-code) |
| 189 | 2323 (defun texinfo-format-code () |
| 2324 (insert "`" (texinfo-parse-arg-discard) "'") | |
| 2325 (goto-char texinfo-command-start)) | |
| 2326 | |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2327 ;; @option (for command-line options) must be different from @code |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2328 ;; because of its special formatting in @table; namely that it does |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2329 ;; not lead to inserted ` ... ' in a table, but does elsewhere. |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2330 (put 'option 'texinfo-format 'texinfo-format-option) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2331 (defun texinfo-format-option () |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2332 "Insert ` ... ' around arg unless inside a table; in that case, no quotes." |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2333 ;; `looking-at-backward' not available in v. 18.57, 20.2 |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2334 (if (not (search-backward "" ; searched-for character is a control-H |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2335 (save-excursion (beginning-of-line) (point)) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2336 t)) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2337 (insert "`" (texinfo-parse-arg-discard) "'") |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2338 (insert (texinfo-parse-arg-discard))) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2339 (goto-char texinfo-command-start)) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2340 |
| 189 | 2341 (put 'emph 'texinfo-format 'texinfo-format-emph) |
| 2342 (put 'strong 'texinfo-format 'texinfo-format-emph) | |
| 2343 (defun texinfo-format-emph () | |
| 2344 (insert "*" (texinfo-parse-arg-discard) "*") | |
| 2345 (goto-char texinfo-command-start)) | |
| 2346 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2347 (put 'dfn 'texinfo-format 'texinfo-format-defn) |
| 189 | 2348 (put 'defn 'texinfo-format 'texinfo-format-defn) |
| 2349 (defun texinfo-format-defn () | |
| 2350 (insert "\"" (texinfo-parse-arg-discard) "\"") | |
| 2351 (goto-char texinfo-command-start)) | |
| 2352 | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2353 (put 'email 'texinfo-format 'texinfo-format-key) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2354 (put 'key 'texinfo-format 'texinfo-format-key) |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2355 ;; I've decided not want to have angle brackets around these -- rms. |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2356 (defun texinfo-format-key () |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2357 (insert (texinfo-parse-arg-discard)) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2358 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2359 |
| 189 | 2360 (put 'bullet 'texinfo-format 'texinfo-format-bullet) |
| 2361 (defun texinfo-format-bullet () | |
| 2362 "Insert an asterisk. | |
| 2363 If used within a line, follow `@bullet' with braces." | |
| 2364 (texinfo-optional-braces-discard) | |
| 2365 (insert "*")) | |
| 2366 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2367 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2368 ;;; @kbd |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2369 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2370 ;; Inside of @example ... @end example and similar environments, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2371 ;; @kbd does nothing; but outside of such environments, it places |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2372 ;; single quotation markes around its argument. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2373 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2374 (defvar texinfo-format-kbd-regexp |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2375 (concat |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2376 "^@" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2377 "\\(" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2378 "example\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2379 "smallexample\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2380 "lisp\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2381 "smalllisp" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2382 "\\)") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2383 "Regexp specifying environments in which @kbd does not put `...' |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2384 around argument.") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2385 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2386 (defvar texinfo-format-kbd-end-regexp |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2387 (concat |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2388 "^@end " |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2389 "\\(" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2390 "example\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2391 "smallexample\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2392 "lisp\\|" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2393 "smalllisp" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2394 "\\)") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2395 "Regexp specifying end of environments in which @kbd does not put `...' |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2396 around argument. (See `texinfo-format-kbd-regexp')") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2397 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2398 (put 'kbd 'texinfo-format 'texinfo-format-kbd) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2399 (defun texinfo-format-kbd () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2400 "Place single quote marks around arg, except in @example and similar." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2401 ;; Search forward for @end example closer than an @example. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2402 ;; Can stop search at nearest @node or texinfo-section-types-regexp |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2403 (let* ((stop |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2404 (save-excursion |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2405 (re-search-forward |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2406 (concat "^@node\\|\\(" texinfo-section-types-regexp "\\)") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2407 nil |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2408 'move-to-end) ; if necessary, return point at end of buffer |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2409 (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2410 (example-location |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2411 (save-excursion |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2412 (re-search-forward texinfo-format-kbd-regexp stop 'move-to-end) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2413 (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2414 (end-example-location |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2415 (save-excursion |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2416 (re-search-forward texinfo-format-kbd-end-regexp stop 'move-to-end) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2417 (point)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2418 ;; If inside @example, @end example will be closer than @example |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2419 ;; or end of search i.e., end-example-location less than example-location |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2420 (if (>= end-example-location example-location) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2421 ;; outside an @example or equivalent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2422 (insert "`" (texinfo-parse-arg-discard) "'") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2423 ;; else, in @example; do not surround with `...' |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2424 (insert (texinfo-parse-arg-discard))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2425 (goto-char texinfo-command-start))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2426 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2427 |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2428 ;;; @example, @lisp, @quotation, @display, @smalllisp, @smallexample, |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2429 ;; @smalldisplay |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2430 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2431 (put 'display 'texinfo-format 'texinfo-format-example) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2432 (put 'smalldisplay 'texinfo-format 'texinfo-format-example) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2433 (put 'example 'texinfo-format 'texinfo-format-example) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2434 (put 'lisp 'texinfo-format 'texinfo-format-example) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2435 (put 'quotation 'texinfo-format 'texinfo-format-example) |
| 189 | 2436 (put 'smallexample 'texinfo-format 'texinfo-format-example) |
| 2437 (put 'smalllisp 'texinfo-format 'texinfo-format-example) | |
| 2438 (defun texinfo-format-example () | |
| 2439 (texinfo-push-stack 'example nil) | |
| 2440 (setq fill-column (- fill-column 5)) | |
| 2441 (texinfo-discard-line)) | |
| 2442 | |
| 2443 (put 'example 'texinfo-end 'texinfo-end-example) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2444 (put 'display 'texinfo-end 'texinfo-end-example) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2445 (put 'smalldisplay 'texinfo-end 'texinfo-end-example) |
| 189 | 2446 (put 'lisp 'texinfo-end 'texinfo-end-example) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2447 (put 'quotation 'texinfo-end 'texinfo-end-example) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2448 (put 'smallexample 'texinfo-end 'texinfo-end-example) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2449 (put 'smalllisp 'texinfo-end 'texinfo-end-example) |
| 189 | 2450 (defun texinfo-end-example () |
| 2451 (setq fill-column (+ fill-column 5)) | |
| 2452 (texinfo-discard-command) | |
| 2453 (let ((stacktop | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2454 (texinfo-pop-stack 'example))) |
| 189 | 2455 (texinfo-do-itemize (nth 1 stacktop)))) |
| 2456 | |
| 2457 (put 'exdent 'texinfo-format 'texinfo-format-exdent) | |
| 2458 (defun texinfo-format-exdent () | |
| 2459 (texinfo-discard-command) | |
| 2460 (delete-region (point) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2461 (progn |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2462 (skip-chars-forward " ") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2463 (point))) |
| 189 | 2464 (insert ?\b) |
| 2465 ;; Cancel out the deletion that texinfo-do-itemize | |
| 2466 ;; is going to do at the end of this line. | |
| 2467 (save-excursion | |
| 2468 (end-of-line) | |
| 2469 (insert "\n "))) | |
| 2470 | |
| 2471 | |
|
18884
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2472 ;; @direntry and @dircategory |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2473 |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2474 (put 'direntry 'texinfo-format 'texinfo-format-direntry) |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2475 (defun texinfo-format-direntry () |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2476 (texinfo-push-stack 'direntry nil) |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2477 (texinfo-discard-line) |
|
24792
c4e546aa9dd5
(texinfo-format-direntry): Avoid blank line.
Karl Heuer <kwzh@gnu.org>
parents:
24750
diff
changeset
|
2478 (insert "START-INFO-DIR-ENTRY\n")) |
|
18884
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2479 |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2480 (put 'direntry 'texinfo-end 'texinfo-end-direntry) |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2481 (defun texinfo-end-direntry () |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2482 (texinfo-discard-command) |
|
18908
a5e6856e865e
(dircategory): Delete obsolete mistaken `put'.
Richard M. Stallman <rms@gnu.org>
parents:
18884
diff
changeset
|
2483 (insert "END-INFO-DIR-ENTRY\n\n") |
|
18884
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2484 (texinfo-pop-stack 'direntry)) |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2485 |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2486 (put 'dircategory 'texinfo-format 'texinfo-format-dircategory) |
|
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2487 (defun texinfo-format-dircategory () |
|
18908
a5e6856e865e
(dircategory): Delete obsolete mistaken `put'.
Richard M. Stallman <rms@gnu.org>
parents:
18884
diff
changeset
|
2488 (let ((str (texinfo-parse-arg-discard))) |
|
a5e6856e865e
(dircategory): Delete obsolete mistaken `put'.
Richard M. Stallman <rms@gnu.org>
parents:
18884
diff
changeset
|
2489 (delete-region (point) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2490 (progn |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2491 (skip-chars-forward " ") |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2492 (point))) |
|
18908
a5e6856e865e
(dircategory): Delete obsolete mistaken `put'.
Richard M. Stallman <rms@gnu.org>
parents:
18884
diff
changeset
|
2493 (insert "INFO-DIR-SECTION " str "\n"))) |
|
18884
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2494 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2495 ;;; @cartouche |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2496 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2497 ;; The @cartouche command is a noop in Info; in a printed manual, |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2498 ;; it makes a box with rounded corners. |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2499 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2500 (put 'cartouche 'texinfo-format 'texinfo-discard-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2501 (put 'cartouche 'texinfo-end 'texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2502 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2503 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2504 ;;; @flushleft and @format |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2505 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2506 ;; The @flushleft command left justifies every line but leaves the |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2507 ;; right end ragged. As far as Info is concerned, @flushleft is a |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2508 ;; `do-nothing' command |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2509 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2510 ;; The @format command is similar to @example except that it does not |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2511 ;; indent; this means that in Info, @format is similar to @flushleft. |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2512 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2513 (put 'format 'texinfo-format 'texinfo-format-flushleft) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2514 (put 'smallformat 'texinfo-format 'texinfo-format-flushleft) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2515 (put 'flushleft 'texinfo-format 'texinfo-format-flushleft) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2516 (defun texinfo-format-flushleft () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2517 (texinfo-discard-line)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2518 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2519 (put 'format 'texinfo-end 'texinfo-end-flushleft) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2520 (put 'smallformat 'texinfo-end 'texinfo-end-flushleft) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2521 (put 'flushleft 'texinfo-end 'texinfo-end-flushleft) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2522 (defun texinfo-end-flushleft () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2523 (texinfo-discard-command)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2524 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2525 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2526 ;;; @flushright |
| 189 | 2527 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2528 ;; The @flushright command right justifies every line but leaves the |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2529 ;; left end ragged. Spaces and tabs at the right ends of lines are |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2530 ;; removed so that visible text lines up on the right side. |
| 189 | 2531 |
| 2532 (put 'flushright 'texinfo-format 'texinfo-format-flushright) | |
| 2533 (defun texinfo-format-flushright () | |
| 2534 (texinfo-push-stack 'flushright nil) | |
| 2535 (texinfo-discard-line)) | |
| 2536 | |
| 2537 (put 'flushright 'texinfo-end 'texinfo-end-flushright) | |
| 2538 (defun texinfo-end-flushright () | |
| 2539 (texinfo-discard-command) | |
| 2540 | |
| 2541 (let ((stacktop | |
| 2542 (texinfo-pop-stack 'flushright))) | |
| 2543 | |
| 2544 (texinfo-do-flushright (nth 1 stacktop)))) | |
| 2545 | |
| 2546 (defun texinfo-do-flushright (from) | |
| 2547 (save-excursion | |
| 2548 (while (progn (forward-line -1) | |
| 2549 (>= (point) from)) | |
| 2550 | |
| 2551 (beginning-of-line) | |
| 2552 (insert | |
| 2553 (make-string | |
| 2554 (- fill-column | |
| 2555 (save-excursion | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2556 (end-of-line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2557 (skip-chars-backward " \t") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2558 (delete-region (point) (progn (end-of-line) (point))) |
| 189 | 2559 (current-column))) |
| 2560 ? ))))) | |
| 2561 | |
| 2562 | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2563 ;;; @ctrl, @TeX, @copyright, @minus, @dots, @enddots, @pounds |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2564 |
| 189 | 2565 (put 'ctrl 'texinfo-format 'texinfo-format-ctrl) |
| 2566 (defun texinfo-format-ctrl () | |
| 2567 (let ((str (texinfo-parse-arg-discard))) | |
| 2568 (insert (logand 31 (aref str 0))))) | |
| 2569 | |
| 2570 (put 'TeX 'texinfo-format 'texinfo-format-TeX) | |
| 2571 (defun texinfo-format-TeX () | |
| 2572 (texinfo-parse-arg-discard) | |
| 2573 (insert "TeX")) | |
| 2574 | |
| 2575 (put 'copyright 'texinfo-format 'texinfo-format-copyright) | |
| 2576 (defun texinfo-format-copyright () | |
| 2577 (texinfo-parse-arg-discard) | |
| 2578 (insert "(C)")) | |
| 2579 | |
| 2580 (put 'minus 'texinfo-format 'texinfo-format-minus) | |
| 2581 (defun texinfo-format-minus () | |
| 2582 "Insert a minus sign. | |
| 2583 If used within a line, follow `@minus' with braces." | |
| 2584 (texinfo-optional-braces-discard) | |
| 2585 (insert "-")) | |
| 2586 | |
| 2587 (put 'dots 'texinfo-format 'texinfo-format-dots) | |
| 2588 (defun texinfo-format-dots () | |
| 2589 (texinfo-parse-arg-discard) | |
| 2590 (insert "...")) | |
| 2591 | |
|
9549
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2592 (put 'enddots 'texinfo-format 'texinfo-format-enddots) |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2593 (defun texinfo-format-enddots () |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2594 (texinfo-parse-arg-discard) |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2595 (insert "....")) |
|
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2596 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2597 (put 'pounds 'texinfo-format 'texinfo-format-pounds) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2598 (defun texinfo-format-pounds () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2599 (texinfo-parse-arg-discard) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2600 (insert "#")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2601 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2602 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2603 ;;; Refilling and indenting: @refill, @paragraphindent, @noindent |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2604 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2605 ;;; Indent only those paragraphs that are refilled as a result of an |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2606 ;;; @refill command. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2607 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2608 ;; * If the value is `asis', do not change the existing indentation at |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2609 ;; the starts of paragraphs. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2610 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2611 ;; * If the value zero, delete any existing indentation. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2612 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2613 ;; * If the value is greater than zero, indent each paragraph by that |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2614 ;; number of spaces. |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2615 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2616 ;;; But do not refill paragraphs with an @refill command that are |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2617 ;;; preceded by @noindent or are part of a table, list, or deffn. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2618 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2619 (defvar texinfo-paragraph-indent "asis" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2620 "Number of spaces for @refill to indent a paragraph; else to leave as is.") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2621 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2622 (put 'paragraphindent 'texinfo-format 'texinfo-paragraphindent) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2623 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2624 (defun texinfo-paragraphindent () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2625 "Specify the number of spaces for @refill to indent a paragraph. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2626 Default is to leave the number of spaces as is." |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2627 (let ((arg (texinfo-parse-arg-discard))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2628 (if (string= "asis" arg) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2629 (setq texinfo-paragraph-indent "asis") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2630 (setq texinfo-paragraph-indent (string-to-int arg))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2631 |
| 189 | 2632 (put 'refill 'texinfo-format 'texinfo-format-refill) |
| 2633 (defun texinfo-format-refill () | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2634 "Refill paragraph. Also, indent first line as set by @paragraphindent. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2635 Default is to leave paragraph indentation as is." |
| 189 | 2636 (texinfo-discard-command) |
| 23658 | 2637 (let ((position (point-marker))) |
| 2638 (forward-paragraph -1) | |
| 2639 (if (looking-at "[ \t\n]*$") (forward-line 1)) | |
| 2640 ;; Do not indent if an entry in a list, table, or deffn, | |
| 2641 ;; or if paragraph is preceded by @noindent. | |
| 2642 ;; Otherwise, indent | |
| 2643 (cond | |
| 2644 ;; delete a @noindent line and do not indent paragraph | |
| 2645 ((save-excursion (forward-line -1) | |
| 2646 (looking-at "^@noindent")) | |
| 2647 (forward-line -1) | |
| 2648 (delete-region (point) (progn (forward-line 1) (point)))) | |
| 2649 ;; do nothing if "asis" | |
| 2650 ((equal texinfo-paragraph-indent "asis")) | |
| 2651 ;; do no indenting in list, etc. | |
| 2652 ((> texinfo-stack-depth 0)) | |
| 2653 ;; otherwise delete existing whitespace and indent | |
| 2654 (t | |
| 2655 (delete-region (point) (progn (skip-chars-forward " \t") (point))) | |
| 2656 (insert (make-string texinfo-paragraph-indent ? )))) | |
| 2657 (forward-paragraph 1) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2658 (forward-line -1) |
| 23658 | 2659 (end-of-line) |
| 2660 ;; Do not fill a section title line with asterisks, hyphens, etc. that | |
| 2661 ;; are used to underline it. This could occur if the line following | |
| 2662 ;; the underlining is not an index entry and has text within it. | |
| 2663 (let* ((previous-paragraph-separate paragraph-separate) | |
| 2664 (paragraph-separate | |
| 2665 (concat paragraph-separate "\\|[-=.]+\\|\\*\\*+")) | |
| 2666 (previous-paragraph-start paragraph-start) | |
| 2667 (paragraph-start | |
| 2668 (concat paragraph-start "\\|[-=.]+\\|\\*\\*+"))) | |
| 2669 (unwind-protect | |
| 2670 (fill-paragraph nil) | |
| 2671 (setq paragraph-separate previous-paragraph-separate) | |
| 2672 (setq paragraph-start previous-paragraph-start))) | |
| 2673 (goto-char position))) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2674 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2675 (put 'noindent 'texinfo-format 'texinfo-noindent) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2676 (defun texinfo-noindent () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2677 (save-excursion |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2678 (forward-paragraph 1) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2679 (if (search-backward "@refill" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2680 (save-excursion (forward-line -1) (point)) t) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2681 () ; leave @noindent command so @refill command knows not to indent |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2682 ;; else |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2683 (texinfo-discard-line)))) |
| 189 | 2684 |
| 2685 | |
| 2686 ;;; Index generation | |
| 2687 | |
| 2688 (put 'vindex 'texinfo-format 'texinfo-format-vindex) | |
| 2689 (defun texinfo-format-vindex () | |
| 2690 (texinfo-index 'texinfo-vindex)) | |
| 2691 | |
| 2692 (put 'cindex 'texinfo-format 'texinfo-format-cindex) | |
| 2693 (defun texinfo-format-cindex () | |
| 2694 (texinfo-index 'texinfo-cindex)) | |
| 2695 | |
| 2696 (put 'findex 'texinfo-format 'texinfo-format-findex) | |
| 2697 (defun texinfo-format-findex () | |
| 2698 (texinfo-index 'texinfo-findex)) | |
| 2699 | |
| 2700 (put 'pindex 'texinfo-format 'texinfo-format-pindex) | |
| 2701 (defun texinfo-format-pindex () | |
| 2702 (texinfo-index 'texinfo-pindex)) | |
| 2703 | |
| 2704 (put 'tindex 'texinfo-format 'texinfo-format-tindex) | |
| 2705 (defun texinfo-format-tindex () | |
| 2706 (texinfo-index 'texinfo-tindex)) | |
| 2707 | |
| 2708 (put 'kindex 'texinfo-format 'texinfo-format-kindex) | |
| 2709 (defun texinfo-format-kindex () | |
| 2710 (texinfo-index 'texinfo-kindex)) | |
| 2711 | |
| 2712 (defun texinfo-index (indexvar) | |
| 2713 (let ((arg (texinfo-parse-expanded-arg))) | |
| 2714 (texinfo-discard-command) | |
| 2715 (set indexvar | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2716 (cons (list arg |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2717 texinfo-last-node |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2718 ;; Region formatting may not provide last node position. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2719 (if texinfo-last-node-pos |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2720 (1+ (count-lines texinfo-last-node-pos (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2721 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2722 (symbol-value indexvar))))) |
| 189 | 2723 |
| 2724 (defconst texinfo-indexvar-alist | |
| 2725 '(("cp" . texinfo-cindex) | |
| 2726 ("fn" . texinfo-findex) | |
| 2727 ("vr" . texinfo-vindex) | |
| 2728 ("tp" . texinfo-tindex) | |
| 2729 ("pg" . texinfo-pindex) | |
| 2730 ("ky" . texinfo-kindex))) | |
| 2731 | |
| 2732 | |
| 2733 ;;; @defindex @defcodeindex | |
| 2734 (put 'defindex 'texinfo-format 'texinfo-format-defindex) | |
| 2735 (put 'defcodeindex 'texinfo-format 'texinfo-format-defindex) | |
| 2736 | |
| 2737 (defun texinfo-format-defindex () | |
| 2738 (let* ((index-name (texinfo-parse-arg-discard)) ; eg: `aa' | |
| 2739 (indexing-command (intern (concat index-name "index"))) | |
| 2740 (index-formatting-command ; eg: `texinfo-format-aaindex' | |
| 2741 (intern (concat "texinfo-format-" index-name "index"))) | |
| 2742 (index-alist-name ; eg: `texinfo-aaindex' | |
| 2743 (intern (concat "texinfo-" index-name "index")))) | |
| 2744 | |
| 2745 (set index-alist-name nil) | |
| 2746 | |
| 2747 (put indexing-command ; eg, aaindex | |
| 2748 'texinfo-format | |
| 2749 index-formatting-command) ; eg, texinfo-format-aaindex | |
| 2750 | |
| 2751 ;; eg: "aa" . texinfo-aaindex | |
| 2752 (or (assoc index-name texinfo-indexvar-alist) | |
| 2753 (setq texinfo-indexvar-alist | |
| 2754 (cons | |
| 2755 (cons index-name | |
| 2756 index-alist-name) | |
| 2757 texinfo-indexvar-alist))) | |
| 2758 | |
| 2759 (fset index-formatting-command | |
| 2760 (list 'lambda 'nil | |
| 2761 (list 'texinfo-index | |
| 2762 (list 'quote index-alist-name)))))) | |
| 2763 | |
| 2764 | |
| 2765 ;;; @synindex @syncodeindex | |
| 2766 | |
| 2767 (put 'synindex 'texinfo-format 'texinfo-format-synindex) | |
| 2768 (put 'syncodeindex 'texinfo-format 'texinfo-format-synindex) | |
| 2769 | |
| 2770 (defun texinfo-format-synindex () | |
| 2771 (let* ((args (texinfo-parse-arg-discard)) | |
| 2772 (second (cdr (read-from-string args))) | |
| 2773 (joiner (symbol-name (car (read-from-string args)))) | |
| 2774 (joined (symbol-name (car (read-from-string args second))))) | |
| 2775 | |
| 2776 (if (assoc joiner texinfo-short-index-cmds-alist) | |
| 2777 (put | |
| 2778 (cdr (assoc joiner texinfo-short-index-cmds-alist)) | |
| 2779 'texinfo-format | |
| 2780 (or (cdr (assoc joined texinfo-short-index-format-cmds-alist)) | |
| 2781 (intern (concat "texinfo-format-" joined "index")))) | |
| 2782 (put | |
| 2783 (intern (concat joiner "index")) | |
| 2784 'texinfo-format | |
| 2785 (or (cdr(assoc joined texinfo-short-index-format-cmds-alist)) | |
| 2786 (intern (concat "texinfo-format-" joined "index"))))))) | |
| 2787 | |
| 2788 (defconst texinfo-short-index-cmds-alist | |
| 2789 '(("cp" . cindex) | |
| 2790 ("fn" . findex) | |
| 2791 ("vr" . vindex) | |
| 2792 ("tp" . tindex) | |
| 2793 ("pg" . pindex) | |
| 2794 ("ky" . kindex))) | |
| 2795 | |
| 2796 (defconst texinfo-short-index-format-cmds-alist | |
| 2797 '(("cp" . texinfo-format-cindex) | |
| 2798 ("fn" . texinfo-format-findex) | |
| 2799 ("vr" . texinfo-format-vindex) | |
| 2800 ("tp" . texinfo-format-tindex) | |
| 2801 ("pg" . texinfo-format-pindex) | |
| 2802 ("ky" . texinfo-format-kindex))) | |
| 2803 | |
| 2804 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2805 ;;; Sort and index (for VMS) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2806 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2807 ;; Sort an index which is in the current buffer between START and END. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2808 ;; Used on VMS, where the `sort' utility is not available. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2809 (defun texinfo-sort-region (start end) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2810 (require 'sort) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2811 (save-restriction |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2812 (narrow-to-region start end) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2813 (sort-subr nil 'forward-line 'end-of-line 'texinfo-sort-startkeyfun))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2814 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2815 ;; Subroutine for sorting an index. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2816 ;; At start of a line, return a string to sort the line under. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2817 (defun texinfo-sort-startkeyfun () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2818 (let ((line |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2819 (buffer-substring (point) (save-excursion (end-of-line) (point))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2820 ;; Canonicalize whitespace and eliminate funny chars. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2821 (while (string-match "[ \t][ \t]+\\|[^a-z0-9 ]+" line) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2822 (setq line (concat (substring line 0 (match-beginning 0)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2823 " " |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2824 (substring line (match-end 0) (length line))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2825 line)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2826 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2827 |
| 189 | 2828 ;;; @printindex |
| 2829 | |
| 2830 (put 'printindex 'texinfo-format 'texinfo-format-printindex) | |
| 2831 | |
| 2832 (defun texinfo-format-printindex () | |
| 2833 (let ((indexelts (symbol-value | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2834 (cdr (assoc (texinfo-parse-arg-discard) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2835 texinfo-indexvar-alist)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2836 opoint) |
| 189 | 2837 (insert "\n* Menu:\n\n") |
| 2838 (setq opoint (point)) | |
| 2839 (texinfo-print-index nil indexelts) | |
| 2840 | |
|
15985
eb812636dcb5
(texinfo-format-printindex):
Richard M. Stallman <rms@gnu.org>
parents:
15680
diff
changeset
|
2841 (if (memq system-type '(vax-vms windows-nt ms-dos)) |
| 189 | 2842 (texinfo-sort-region opoint (point)) |
| 2843 (shell-command-on-region opoint (point) "sort -fd" 1)))) | |
| 2844 | |
| 2845 (defun texinfo-print-index (file indexelts) | |
| 2846 (while indexelts | |
| 2847 (if (stringp (car (car indexelts))) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2848 (progn |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2849 (insert "* " (car (car indexelts)) ": " ) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2850 (indent-to 32) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2851 (insert |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2852 (if file (concat "(" file ")") "") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2853 (nth 1 (car indexelts)) ".") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2854 (indent-to 54) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2855 (insert |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2856 (if (nth 2 (car indexelts)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2857 (format " %d." (nth 2 (car indexelts))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2858 "") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2859 "\n")) |
| 189 | 2860 ;; index entries from @include'd file |
| 2861 (texinfo-print-index (nth 1 (car indexelts)) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2862 (nth 2 (car indexelts)))) |
| 189 | 2863 (setq indexelts (cdr indexelts)))) |
| 2864 | |
| 2865 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2866 ;;; Glyphs: @equiv, @error, etc |
| 189 | 2867 |
| 2868 ;; @equiv to show that two expressions are equivalent | |
| 2869 ;; @error to show an error message | |
| 2870 ;; @expansion to show what a macro expands to | |
| 2871 ;; @point to show the location of point in an example | |
| 2872 ;; @print to show what an evaluated expression prints | |
| 2873 ;; @result to indicate the value returned by an expression | |
| 2874 | |
| 2875 (put 'equiv 'texinfo-format 'texinfo-format-equiv) | |
| 2876 (defun texinfo-format-equiv () | |
| 2877 (texinfo-parse-arg-discard) | |
| 2878 (insert "==")) | |
| 2879 | |
| 2880 (put 'error 'texinfo-format 'texinfo-format-error) | |
| 2881 (defun texinfo-format-error () | |
| 2882 (texinfo-parse-arg-discard) | |
| 2883 (insert "error-->")) | |
| 2884 | |
| 2885 (put 'expansion 'texinfo-format 'texinfo-format-expansion) | |
| 2886 (defun texinfo-format-expansion () | |
| 2887 (texinfo-parse-arg-discard) | |
| 2888 (insert "==>")) | |
| 2889 | |
| 2890 (put 'point 'texinfo-format 'texinfo-format-point) | |
| 2891 (defun texinfo-format-point () | |
| 2892 (texinfo-parse-arg-discard) | |
| 2893 (insert "-!-")) | |
| 2894 | |
| 2895 (put 'print 'texinfo-format 'texinfo-format-print) | |
| 2896 (defun texinfo-format-print () | |
| 2897 (texinfo-parse-arg-discard) | |
| 2898 (insert "-|")) | |
| 2899 | |
| 2900 (put 'result 'texinfo-format 'texinfo-format-result) | |
| 2901 (defun texinfo-format-result () | |
| 2902 (texinfo-parse-arg-discard) | |
| 2903 (insert "=>")) | |
| 2904 | |
| 2905 | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2906 ;;; Accent commands |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2907 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2908 ;; Info presumes a plain ASCII output, so the accented characters do |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2909 ;; not look as they would if typeset, or output with a different |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2910 ;; character set. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2911 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2912 ;; See the `texinfo-accent-commands' variable |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2913 ;; in the section for `texinfo-append-refill'. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2914 ;; Also, see the defun for `texinfo-format-scan' |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2915 ;; for single-character accent commands. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2916 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2917 ;; Command Info output Name |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2918 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2919 ;; These do not have braces: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2920 ;; @^ ==> ^ circumflex accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2921 ;; @` ==> ` grave accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2922 ;; @' ==> ' acute accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2923 ;; @" ==> " umlaut accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2924 ;; @= ==> = overbar accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2925 ;; @~ ==> ~ tilde accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2926 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2927 ;; These have braces, but take no argument: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2928 ;; @OE{} ==> OE French-OE-ligature |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2929 ;; @oe{} ==> oe |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2930 ;; @AA{} ==> AA Scandinavian-A-with-circle |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2931 ;; @aa{} ==> aa |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2932 ;; @AE{} ==> AE Latin-Scandinavian-AE |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2933 ;; @ae{} ==> ae |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2934 ;; @ss{} ==> ss German-sharp-S |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2935 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2936 ;; @questiondown{} ==> ? upside-down-question-mark |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2937 ;; @exclamdown{} ==> ! upside-down-exclamation-mark |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2938 ;; @L{} ==> L/ Polish suppressed-L (Lslash) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2939 ;; @l{} ==> l/ Polish suppressed-L (Lslash) (lower case) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2940 ;; @O{} ==> O/ Scandinavian O-with-slash |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2941 ;; @o{} ==> o/ Scandinavian O-with-slash (lower case) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2942 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2943 ;; These have braces, and take an argument: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2944 ;; @,{c} ==> c, cedilla accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2945 ;; @dotaccent{o} ==> .o overdot-accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2946 ;; @ubaraccent{o} ==> _o underbar-accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2947 ;; @udotaccent{o} ==> o-. underdot-accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2948 ;; @H{o} ==> ""o long Hungarian umlaut |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2949 ;; @ringaccent{o} ==> *o ring accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2950 ;; @tieaccent{oo} ==> [oo tie after accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2951 ;; @u{o} ==> (o breve accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2952 ;; @v{o} ==> <o hacek accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2953 ;; @dotless{i} ==> i dotless i and dotless j |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2954 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2955 ;; ========== |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2956 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2957 ;; Note: The defun texinfo-format-scan |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2958 ;; looks at "[@{}^'`\",=~ *?!-]" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2959 ;; In the case of @*, a line break is inserted; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2960 ;; in the other cases, the characters are simply quoted and the @ is deleted. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2961 ;; Thus, `texinfo-format-scan' handles the following |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2962 ;; single-character accent commands: @^ @` @' @" @, @- @= @~ |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2963 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2964 ;; @^ ==> ^ circumflex accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2965 ;; (put '^ 'texinfo-format 'texinfo-format-circumflex-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2966 ;; (defun texinfo-format-circumflex-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2967 ;; (texinfo-discard-command) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2968 ;; (insert "^")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2969 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2970 ;; @` ==> ` grave accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2971 ;; (put '\` 'texinfo-format 'texinfo-format-grave-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2972 ;; (defun texinfo-format-grave-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2973 ;; (texinfo-discard-command) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2974 ;; (insert "\`")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2975 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2976 ;; @' ==> ' acute accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2977 ;; (put '\' 'texinfo-format 'texinfo-format-acute-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2978 ;; (defun texinfo-format-acute-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2979 ;; (texinfo-discard-command) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2980 ;; (insert "'")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2981 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2982 ;; @" ==> " umlaut accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2983 ;; (put '\" 'texinfo-format 'texinfo-format-umlaut-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2984 ;; (defun texinfo-format-umlaut-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2985 ;; (texinfo-discard-command) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2986 ;; (insert "\"")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2987 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2988 ;; @= ==> = overbar accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2989 ;; (put '= 'texinfo-format 'texinfo-format-overbar-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2990 ;; (defun texinfo-format-overbar-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2991 ;; (texinfo-discard-command) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2992 ;; (insert "=")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2993 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2994 ;; @~ ==> ~ tilde accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2995 ;; (put '~ 'texinfo-format 'texinfo-format-tilde-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2996 ;; (defun texinfo-format-tilde-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2997 ;; (texinfo-discard-command) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2998 ;; (insert "~")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2999 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3000 ;; @OE{} ==> OE French-OE-ligature |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3001 (put 'OE 'texinfo-format 'texinfo-format-French-OE-ligature) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3002 (defun texinfo-format-French-OE-ligature () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3003 (insert "OE" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3004 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3005 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3006 ;; @oe{} ==> oe |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3007 (put 'oe 'texinfo-format 'texinfo-format-French-oe-ligature) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3008 (defun texinfo-format-French-oe-ligature () ; lower case |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3009 (insert "oe" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3010 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3011 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3012 ;; @AA{} ==> AA Scandinavian-A-with-circle |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3013 (put 'AA 'texinfo-format 'texinfo-format-Scandinavian-A-with-circle) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3014 (defun texinfo-format-Scandinavian-A-with-circle () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3015 (insert "AA" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3016 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3017 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3018 ;; @aa{} ==> aa |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3019 (put 'aa 'texinfo-format 'texinfo-format-Scandinavian-a-with-circle) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3020 (defun texinfo-format-Scandinavian-a-with-circle () ; lower case |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3021 (insert "aa" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3022 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3023 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3024 ;; @AE{} ==> AE Latin-Scandinavian-AE |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3025 (put 'AE 'texinfo-format 'texinfo-format-Latin-Scandinavian-AE) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3026 (defun texinfo-format-Latin-Scandinavian-AE () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3027 (insert "AE" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3028 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3029 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3030 ;; @ae{} ==> ae |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3031 (put 'ae 'texinfo-format 'texinfo-format-Latin-Scandinavian-ae) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3032 (defun texinfo-format-Latin-Scandinavian-ae () ; lower case |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3033 (insert "ae" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3034 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3035 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3036 ;; @ss{} ==> ss German-sharp-S |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3037 (put 'ss 'texinfo-format 'texinfo-format-German-sharp-S) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3038 (defun texinfo-format-German-sharp-S () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3039 (insert "ss" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3040 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3041 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3042 ;; @questiondown{} ==> ? upside-down-question-mark |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3043 (put 'questiondown 'texinfo-format 'texinfo-format-upside-down-question-mark) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3044 (defun texinfo-format-upside-down-question-mark () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3045 (insert "?" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3046 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3047 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3048 ;; @exclamdown{} ==> ! upside-down-exclamation-mark |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3049 (put 'exclamdown 'texinfo-format 'texinfo-format-upside-down-exclamation-mark) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3050 (defun texinfo-format-upside-down-exclamation-mark () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3051 (insert "!" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3052 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3053 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3054 ;; @L{} ==> L/ Polish suppressed-L (Lslash) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3055 (put 'L 'texinfo-format 'texinfo-format-Polish-suppressed-L) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3056 (defun texinfo-format-Polish-suppressed-L () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3057 (insert (texinfo-parse-arg-discard) "/L") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3058 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3059 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3060 ;; @l{} ==> l/ Polish suppressed-L (Lslash) (lower case) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3061 (put 'l 'texinfo-format 'texinfo-format-Polish-suppressed-l-lower-case) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3062 (defun texinfo-format-Polish-suppressed-l-lower-case () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3063 (insert (texinfo-parse-arg-discard) "/l") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3064 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3065 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3066 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3067 ;; @O{} ==> O/ Scandinavian O-with-slash |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3068 (put 'O 'texinfo-format 'texinfo-format-Scandinavian-O-with-slash) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3069 (defun texinfo-format-Scandinavian-O-with-slash () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3070 (insert (texinfo-parse-arg-discard) "O/") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3071 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3072 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3073 ;; @o{} ==> o/ Scandinavian O-with-slash (lower case) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3074 (put 'o 'texinfo-format 'texinfo-format-Scandinavian-o-with-slash-lower-case) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3075 (defun texinfo-format-Scandinavian-o-with-slash-lower-case () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3076 (insert (texinfo-parse-arg-discard) "o/") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3077 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3078 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3079 ;; Take arguments |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3080 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3081 ;; @,{c} ==> c, cedilla accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3082 (put ', 'texinfo-format 'texinfo-format-cedilla-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3083 (defun texinfo-format-cedilla-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3084 (insert (texinfo-parse-arg-discard) ",") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3085 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3086 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3087 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3088 ;; @dotaccent{o} ==> .o overdot-accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3089 (put 'dotaccent 'texinfo-format 'texinfo-format-overdot-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3090 (defun texinfo-format-overdot-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3091 (insert "." (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3092 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3093 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3094 ;; @ubaraccent{o} ==> _o underbar-accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3095 (put 'ubaraccent 'texinfo-format 'texinfo-format-underbar-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3096 (defun texinfo-format-underbar-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3097 (insert "_" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3098 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3099 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3100 ;; @udotaccent{o} ==> o-. underdot-accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3101 (put 'udotaccent 'texinfo-format 'texinfo-format-underdot-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3102 (defun texinfo-format-underdot-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3103 (insert (texinfo-parse-arg-discard) "-.") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3104 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3105 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3106 ;; @H{o} ==> ""o long Hungarian umlaut |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3107 (put 'H 'texinfo-format 'texinfo-format-long-Hungarian-umlaut) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3108 (defun texinfo-format-long-Hungarian-umlaut () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3109 (insert "\"\"" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3110 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3111 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3112 ;; @ringaccent{o} ==> *o ring accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3113 (put 'ringaccent 'texinfo-format 'texinfo-format-ring-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3114 (defun texinfo-format-ring-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3115 (insert "*" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3116 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3117 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3118 ;; @tieaccent{oo} ==> [oo tie after accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3119 (put 'tieaccent 'texinfo-format 'texinfo-format-tie-after-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3120 (defun texinfo-format-tie-after-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3121 (insert "[" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3122 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3123 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3124 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3125 ;; @u{o} ==> (o breve accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3126 (put 'u 'texinfo-format 'texinfo-format-breve-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3127 (defun texinfo-format-breve-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3128 (insert "(" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3129 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3130 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3131 ;; @v{o} ==> <o hacek accent |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3132 (put 'v 'texinfo-format 'texinfo-format-hacek-accent) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3133 (defun texinfo-format-hacek-accent () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3134 (insert "<" (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3135 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3136 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3137 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3138 ;; @dotless{i} ==> i dotless i and dotless j |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3139 (put 'dotless 'texinfo-format 'texinfo-format-dotless) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3140 (defun texinfo-format-dotless () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3141 (insert (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3142 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3143 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3144 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3145 ;;; Definition formatting: @deffn, @defun, etc |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3146 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3147 ;; What definition formatting produces: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3148 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3149 ;; @deffn category name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3150 ;; In Info, `Category: name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3151 ;; In index: name: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3152 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3153 ;; @defvr category name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3154 ;; In Info, `Category: name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3155 ;; In index: name: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3156 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3157 ;; @deftp category name attributes... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3158 ;; `category name attributes...' Note: @deftp args in lower case. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3159 ;; In index: name: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3160 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3161 ;; Specialized function-like or variable-like entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3162 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3163 ;; @defun, @defmac, @defspec, @defvar, @defopt |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3164 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3165 ;; @defun name args In Info, `Function: name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3166 ;; @defmac name args In Info, `Macro: name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3167 ;; @defvar name In Info, `Variable: name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3168 ;; etc. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3169 ;; In index: name: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3170 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3171 ;; Generalized typed-function-like or typed-variable-like entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3172 ;; @deftypefn category data-type name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3173 ;; In Info, `Category: data-type name args...' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3174 ;; @deftypevr category data-type name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3175 ;; In Info, `Category: data-type name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3176 ;; In index: name: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3177 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3178 ;; Specialized typed-function-like or typed-variable-like entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3179 ;; @deftypefun data-type name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3180 ;; In Info, `Function: data-type name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3181 ;; In index: name: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3182 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3183 ;; @deftypevar data-type name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3184 ;; In Info, `Variable: data-type name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3185 ;; In index: name: node. line#. but include args after name!? |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3186 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3187 ;; Generalized object oriented entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3188 ;; @defop category class name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3189 ;; In Info, `Category on class: name ARG' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3190 ;; In index: name on class: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3191 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3192 ;; @defcv category class name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3193 ;; In Info, `Category of class: name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3194 ;; In index: name of class: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3195 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3196 ;; Specialized object oriented entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3197 ;; @defmethod class name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3198 ;; In Info, `Method on class: name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3199 ;; In index: name on class: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3200 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3201 ;; @defivar class name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3202 ;; In Info, `Instance variable of class: name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3203 ;; In index: name of class: node. line#. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3204 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3205 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3206 ;;; The definition formatting functions |
| 189 | 3207 |
| 3208 (defun texinfo-format-defun () | |
| 3209 (texinfo-push-stack 'defun nil) | |
| 3210 (setq fill-column (- fill-column 5)) | |
| 3211 (texinfo-format-defun-1 t)) | |
| 3212 | |
| 3213 (defun texinfo-end-defun () | |
| 3214 (setq fill-column (+ fill-column 5)) | |
| 3215 (texinfo-discard-command) | |
| 3216 (let ((start (nth 1 (texinfo-pop-stack 'defun)))) | |
| 3217 (texinfo-do-itemize start) | |
| 3218 ;; Delete extra newline inserted after header. | |
| 3219 (save-excursion | |
| 3220 (goto-char start) | |
| 3221 (delete-char -1)))) | |
| 3222 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3223 (defun texinfo-format-defunx () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3224 (texinfo-format-defun-1 nil)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3225 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3226 (defun texinfo-format-defun-1 (first-p) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3227 (let ((parse-args (texinfo-format-parse-defun-args)) |
|
4868
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3228 (texinfo-defun-type (get texinfo-command-name 'texinfo-defun-type))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3229 (texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3230 ;; Delete extra newline inserted after previous header line. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3231 (if (not first-p) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3232 (delete-char -1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3233 (funcall |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3234 (get texinfo-command-name 'texinfo-deffn-formatting-property) parse-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3235 ;; Insert extra newline so that paragraph filling does not mess |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3236 ;; with header line. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3237 (insert "\n\n") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3238 (rplaca (cdr (cdr (car texinfo-stack))) (point)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3239 (funcall |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3240 (get texinfo-command-name 'texinfo-defun-indexing-property) parse-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3241 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3242 ;;; Formatting the first line of a definition |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3243 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3244 ;; @deffn, @defvr, @deftp |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3245 (put 'deffn 'texinfo-deffn-formatting-property 'texinfo-format-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3246 (put 'deffnx 'texinfo-deffn-formatting-property 'texinfo-format-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3247 (put 'defvr 'texinfo-deffn-formatting-property 'texinfo-format-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3248 (put 'defvrx 'texinfo-deffn-formatting-property 'texinfo-format-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3249 (put 'deftp 'texinfo-deffn-formatting-property 'texinfo-format-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3250 (put 'deftpx 'texinfo-deffn-formatting-property 'texinfo-format-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3251 (defun texinfo-format-deffn (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3252 ;; Generalized function-like, variable-like, or generic data-type entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3253 ;; @deffn category name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3254 ;; In Info, `Category: name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3255 ;; @deftp category name attributes... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3256 ;; `category name attributes...' Note: @deftp args in lower case. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3257 (let ((category (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3258 (name (car (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3259 (args (cdr (cdr parsed-args)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3260 (insert " -- " category ": " name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3261 (while args |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3262 (insert " " |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3263 (if (or (= ?& (aref (car args) 0)) |
|
4868
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3264 (eq (eval (car texinfo-defun-type)) 'deftp-type)) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3265 (car args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3266 (upcase (car args)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3267 (setq args (cdr args))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3268 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3269 ;; @defun, @defmac, @defspec, @defvar, @defopt: Specialized, simple |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3270 (put 'defun 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3271 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3272 (put 'defunx 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3273 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3274 (put 'defmac 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3275 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3276 (put 'defmacx 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3277 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3278 (put 'defspec 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3279 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3280 (put 'defspecx 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3281 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3282 (put 'defvar 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3283 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3284 (put 'defvarx 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3285 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3286 (put 'defopt 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3287 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3288 (put 'defoptx 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3289 'texinfo-format-specialized-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3290 (defun texinfo-format-specialized-defun (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3291 ;; Specialized function-like or variable-like entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3292 ;; @defun name args In Info, `Function: Name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3293 ;; @defmac name args In Info, `Macro: Name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3294 ;; @defvar name In Info, `Variable: Name' |
|
4868
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3295 ;; Use cdr of texinfo-defun-type to determine category: |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3296 (let ((category (car (cdr texinfo-defun-type))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3297 (name (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3298 (args (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3299 (insert " -- " category ": " name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3300 (while args |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3301 (insert " " |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3302 (if (= ?& (aref (car args) 0)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3303 (car args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3304 (upcase (car args)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3305 (setq args (cdr args))))) |
| 189 | 3306 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3307 ;; @deftypefn, @deftypevr: Generalized typed |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3308 (put 'deftypefn 'texinfo-deffn-formatting-property 'texinfo-format-deftypefn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3309 (put 'deftypefnx 'texinfo-deffn-formatting-property 'texinfo-format-deftypefn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3310 (put 'deftypevr 'texinfo-deffn-formatting-property 'texinfo-format-deftypefn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3311 (put 'deftypevrx 'texinfo-deffn-formatting-property 'texinfo-format-deftypefn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3312 (defun texinfo-format-deftypefn (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3313 ;; Generalized typed-function-like or typed-variable-like entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3314 ;; @deftypefn category data-type name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3315 ;; In Info, `Category: data-type name args...' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3316 ;; @deftypevr category data-type name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3317 ;; In Info, `Category: data-type name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3318 ;; Note: args in lower case, unless modified in command line. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3319 (let ((category (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3320 (data-type (car (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3321 (name (car (cdr (cdr parsed-args)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3322 (args (cdr (cdr (cdr parsed-args))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3323 (insert " -- " category ": " data-type " " name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3324 (while args |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3325 (insert " " (car args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3326 (setq args (cdr args))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3327 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3328 ;; @deftypefun, @deftypevar: Specialized typed |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3329 (put 'deftypefun 'texinfo-deffn-formatting-property 'texinfo-format-deftypefun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3330 (put 'deftypefunx 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3331 'texinfo-format-deftypefun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3332 (put 'deftypevar 'texinfo-deffn-formatting-property 'texinfo-format-deftypefun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3333 (put 'deftypevarx 'texinfo-deffn-formatting-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3334 'texinfo-format-deftypefun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3335 (defun texinfo-format-deftypefun (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3336 ;; Specialized typed-function-like or typed-variable-like entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3337 ;; @deftypefun data-type name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3338 ;; In Info, `Function: data-type name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3339 ;; @deftypevar data-type name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3340 ;; In Info, `Variable: data-type name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3341 ;; Note: args in lower case, unless modified in command line. |
|
4868
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3342 ;; Use cdr of texinfo-defun-type to determine category: |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3343 (let ((category (car (cdr texinfo-defun-type))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3344 (data-type (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3345 (name (car (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3346 (args (cdr (cdr parsed-args)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3347 (insert " -- " category ": " data-type " " name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3348 (while args |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3349 (insert " " (car args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3350 (setq args (cdr args))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3351 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3352 ;; @defop: Generalized object-oriented |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3353 (put 'defop 'texinfo-deffn-formatting-property 'texinfo-format-defop) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3354 (put 'defopx 'texinfo-deffn-formatting-property 'texinfo-format-defop) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3355 (defun texinfo-format-defop (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3356 ;; Generalized object oriented entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3357 ;; @defop category class name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3358 ;; In Info, `Category on class: name ARG' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3359 ;; Note: args in upper case; use of `on' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3360 (let ((category (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3361 (class (car (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3362 (name (car (cdr (cdr parsed-args)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3363 (args (cdr (cdr (cdr parsed-args))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3364 (insert " -- " category " on " class ": " name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3365 (while args |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3366 (insert " " (upcase (car args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3367 (setq args (cdr args))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3368 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3369 ;; @defcv: Generalized object-oriented |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3370 (put 'defcv 'texinfo-deffn-formatting-property 'texinfo-format-defcv) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3371 (put 'defcvx 'texinfo-deffn-formatting-property 'texinfo-format-defcv) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3372 (defun texinfo-format-defcv (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3373 ;; Generalized object oriented entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3374 ;; @defcv category class name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3375 ;; In Info, `Category of class: name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3376 ;; Note: args in upper case; use of `of' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3377 (let ((category (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3378 (class (car (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3379 (name (car (cdr (cdr parsed-args)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3380 (args (cdr (cdr (cdr parsed-args))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3381 (insert " -- " category " of " class ": " name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3382 (while args |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3383 (insert " " (upcase (car args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3384 (setq args (cdr args))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3385 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3386 ;; @defmethod: Specialized object-oriented |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3387 (put 'defmethod 'texinfo-deffn-formatting-property 'texinfo-format-defmethod) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3388 (put 'defmethodx 'texinfo-deffn-formatting-property 'texinfo-format-defmethod) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3389 (defun texinfo-format-defmethod (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3390 ;; Specialized object oriented entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3391 ;; @defmethod class name args... |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3392 ;; In Info, `Method on class: name ARGS' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3393 ;; Note: args in upper case; use of `on' |
|
4868
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3394 ;; Use cdr of texinfo-defun-type to determine category: |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3395 (let ((category (car (cdr texinfo-defun-type))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3396 (class (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3397 (name (car (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3398 (args (cdr (cdr parsed-args)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3399 (insert " -- " category " on " class ": " name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3400 (while args |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3401 (insert " " (upcase (car args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3402 (setq args (cdr args))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3403 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3404 ;; @defivar: Specialized object-oriented |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3405 (put 'defivar 'texinfo-deffn-formatting-property 'texinfo-format-defivar) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3406 (put 'defivarx 'texinfo-deffn-formatting-property 'texinfo-format-defivar) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3407 (defun texinfo-format-defivar (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3408 ;; Specialized object oriented entity: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3409 ;; @defivar class name |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3410 ;; In Info, `Instance variable of class: name' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3411 ;; Note: args in upper case; use of `of' |
|
4868
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3412 ;; Use cdr of texinfo-defun-type to determine category: |
|
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
3413 (let ((category (car (cdr texinfo-defun-type))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3414 (class (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3415 (name (car (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3416 (args (cdr (cdr parsed-args)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3417 (insert " -- " category " of " class ": " name) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3418 (while args |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3419 (insert " " (upcase (car args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3420 (setq args (cdr args))))) |
| 189 | 3421 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3422 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3423 ;;; Indexing for definitions |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3424 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3425 ;; An index entry has three parts: the `entry proper', the node name, and the |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3426 ;; line number. Depending on the which command is used, the entry is |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3427 ;; formatted differently: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3428 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3429 ;; @defun, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3430 ;; @defmac, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3431 ;; @defspec, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3432 ;; @defvar, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3433 ;; @defopt all use their 1st argument as the entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3434 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3435 ;; @deffn, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3436 ;; @defvr, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3437 ;; @deftp |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3438 ;; @deftypefun |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3439 ;; @deftypevar all use their 2nd argument as the entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3440 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3441 ;; @deftypefn, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3442 ;; @deftypevr both use their 3rd argument as the entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3443 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3444 ;; @defmethod uses its 2nd and 1st arguments as an entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3445 ;; formatted: NAME on CLASS |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3446 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3447 ;; @defop uses its 3rd and 2nd arguments as an entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3448 ;; formatted: NAME on CLASS |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3449 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3450 ;; @defivar uses its 2nd and 1st arguments as an entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3451 ;; formatted: NAME of CLASS |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3452 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3453 ;; @defcv uses its 3rd and 2nd argument as an entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3454 ;; formatted: NAME of CLASS |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3455 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3456 (put 'defun 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3457 (put 'defunx 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3458 (put 'defmac 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3459 (put 'defmacx 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3460 (put 'defspec 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3461 (put 'defspecx 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3462 (put 'defvar 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3463 (put 'defvarx 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3464 (put 'defopt 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3465 (put 'defoptx 'texinfo-defun-indexing-property 'texinfo-index-defun) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3466 (defun texinfo-index-defun (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3467 ;; use 1st parsed-arg as entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3468 ;; `index-list' will be texinfo-findex or the like |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3469 (let ((index-list (get texinfo-command-name 'texinfo-defun-index))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3470 (set index-list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3471 (cons |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3472 ;; Three elements: entry-proper, node-name, line-number |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3473 (list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3474 (car parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3475 texinfo-last-node |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3476 ;; Region formatting may not provide last node position. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3477 (if texinfo-last-node-pos |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3478 (1+ (count-lines texinfo-last-node-pos (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3479 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3480 (symbol-value index-list))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3481 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3482 (put 'deffn 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3483 (put 'deffnx 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3484 (put 'defvr 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3485 (put 'defvrx 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3486 (put 'deftp 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3487 (put 'deftpx 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3488 (put 'deftypefun 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3489 (put 'deftypefunx 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3490 (put 'deftypevar 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3491 (put 'deftypevarx 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3492 (defun texinfo-index-deffn (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3493 ;; use 2nd parsed-arg as entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3494 ;; `index-list' will be texinfo-findex or the like |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3495 (let ((index-list (get texinfo-command-name 'texinfo-defun-index))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3496 (set index-list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3497 (cons |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3498 ;; Three elements: entry-proper, node-name, line-number |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3499 (list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3500 (car (cdr parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3501 texinfo-last-node |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3502 ;; Region formatting may not provide last node position. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3503 (if texinfo-last-node-pos |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3504 (1+ (count-lines texinfo-last-node-pos (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3505 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3506 (symbol-value index-list))))) |
| 189 | 3507 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3508 (put 'deftypefn 'texinfo-defun-indexing-property 'texinfo-index-deftypefn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3509 (put 'deftypefnx 'texinfo-defun-indexing-property 'texinfo-index-deftypefn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3510 (put 'deftypevr 'texinfo-defun-indexing-property 'texinfo-index-deftypefn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3511 (put 'deftypevrx 'texinfo-defun-indexing-property 'texinfo-index-deftypefn) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3512 (defun texinfo-index-deftypefn (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3513 ;; use 3rd parsed-arg as entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3514 ;; `index-list' will be texinfo-findex or the like |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3515 (let ((index-list (get texinfo-command-name 'texinfo-defun-index))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3516 (set index-list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3517 (cons |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3518 ;; Three elements: entry-proper, node-name, line-number |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3519 (list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3520 (car (cdr (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3521 texinfo-last-node |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3522 ;; Region formatting may not provide last node position. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3523 (if texinfo-last-node-pos |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3524 (1+ (count-lines texinfo-last-node-pos (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3525 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3526 (symbol-value index-list))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3527 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3528 (put 'defmethod 'texinfo-defun-indexing-property 'texinfo-index-defmethod) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3529 (put 'defmethodx 'texinfo-defun-indexing-property 'texinfo-index-defmethod) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3530 (defun texinfo-index-defmethod (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3531 ;; use 2nd on 1st parsed-arg as entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3532 ;; `index-list' will be texinfo-findex or the like |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3533 (let ((index-list (get texinfo-command-name 'texinfo-defun-index))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3534 (set index-list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3535 (cons |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3536 ;; Three elements: entry-proper, node-name, line-number |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3537 (list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3538 (format "%s on %s" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3539 (car (cdr parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3540 (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3541 texinfo-last-node |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3542 ;; Region formatting may not provide last node position. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3543 (if texinfo-last-node-pos |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3544 (1+ (count-lines texinfo-last-node-pos (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3545 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3546 (symbol-value index-list))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3547 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3548 (put 'defop 'texinfo-defun-indexing-property 'texinfo-index-defop) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3549 (put 'defopx 'texinfo-defun-indexing-property 'texinfo-index-defop) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3550 (defun texinfo-index-defop (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3551 ;; use 3rd on 2nd parsed-arg as entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3552 ;; `index-list' will be texinfo-findex or the like |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3553 (let ((index-list (get texinfo-command-name 'texinfo-defun-index))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3554 (set index-list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3555 (cons |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3556 ;; Three elements: entry-proper, node-name, line-number |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3557 (list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3558 (format "%s on %s" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3559 (car (cdr (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3560 (car (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3561 texinfo-last-node |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3562 ;; Region formatting may not provide last node position. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3563 (if texinfo-last-node-pos |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3564 (1+ (count-lines texinfo-last-node-pos (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3565 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3566 (symbol-value index-list))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3567 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3568 (put 'defivar 'texinfo-defun-indexing-property 'texinfo-index-defivar) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3569 (put 'defivarx 'texinfo-defun-indexing-property 'texinfo-index-defivar) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3570 (defun texinfo-index-defivar (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3571 ;; use 2nd of 1st parsed-arg as entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3572 ;; `index-list' will be texinfo-findex or the like |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3573 (let ((index-list (get texinfo-command-name 'texinfo-defun-index))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3574 (set index-list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3575 (cons |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3576 ;; Three elements: entry-proper, node-name, line-number |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3577 (list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3578 (format "%s of %s" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3579 (car (cdr parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3580 (car parsed-args)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3581 texinfo-last-node |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3582 ;; Region formatting may not provide last node position. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3583 (if texinfo-last-node-pos |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3584 (1+ (count-lines texinfo-last-node-pos (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3585 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3586 (symbol-value index-list))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3587 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3588 (put 'defcv 'texinfo-defun-indexing-property 'texinfo-index-defcv) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3589 (put 'defcvx 'texinfo-defun-indexing-property 'texinfo-index-defcv) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3590 (defun texinfo-index-defcv (parsed-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3591 ;; use 3rd of 2nd parsed-arg as entry-proper |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3592 ;; `index-list' will be texinfo-findex or the like |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3593 (let ((index-list (get texinfo-command-name 'texinfo-defun-index))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3594 (set index-list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3595 (cons |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3596 ;; Three elements: entry-proper, node-name, line-number |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3597 (list |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3598 (format "%s of %s" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3599 (car (cdr (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3600 (car (cdr parsed-args))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3601 texinfo-last-node |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3602 ;; Region formatting may not provide last node position. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3603 (if texinfo-last-node-pos |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3604 (1+ (count-lines texinfo-last-node-pos (point))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3605 1)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3606 (symbol-value index-list))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3607 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3608 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3609 ;;; Properties for definitions |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3610 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3611 ;; Each definition command has six properties: |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3612 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3613 ;; 1. texinfo-deffn-formatting-property to format definition line |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3614 ;; 2. texinfo-defun-indexing-property to create index entry |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3615 ;; 3. texinfo-format formatting command |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3616 ;; 4. texinfo-end end formatting command |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3617 ;; 5. texinfo-defun-type type of deffn to format |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3618 ;; 6. texinfo-defun-index type of index to use |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3619 ;; |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3620 ;; The `x' forms of each definition command are used for the second |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3621 ;; and subsequent header lines. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3622 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3623 ;; The texinfo-deffn-formatting-property and texinfo-defun-indexing-property |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3624 ;; are listed just before the appropriate formatting and indexing commands. |
| 189 | 3625 |
| 3626 (put 'deffn 'texinfo-format 'texinfo-format-defun) | |
| 3627 (put 'deffnx 'texinfo-format 'texinfo-format-defunx) | |
| 3628 (put 'deffn 'texinfo-end 'texinfo-end-defun) | |
| 3629 (put 'deffn 'texinfo-defun-type '('deffn-type nil)) | |
| 3630 (put 'deffnx 'texinfo-defun-type '('deffn-type nil)) | |
| 3631 (put 'deffn 'texinfo-defun-index 'texinfo-findex) | |
| 3632 (put 'deffnx 'texinfo-defun-index 'texinfo-findex) | |
| 3633 | |
| 3634 (put 'defun 'texinfo-format 'texinfo-format-defun) | |
| 3635 (put 'defunx 'texinfo-format 'texinfo-format-defunx) | |
| 3636 (put 'defun 'texinfo-end 'texinfo-end-defun) | |
| 3637 (put 'defun 'texinfo-defun-type '('defun-type "Function")) | |
| 3638 (put 'defunx 'texinfo-defun-type '('defun-type "Function")) | |
| 3639 (put 'defun 'texinfo-defun-index 'texinfo-findex) | |
| 3640 (put 'defunx 'texinfo-defun-index 'texinfo-findex) | |
| 3641 | |
| 3642 (put 'defmac 'texinfo-format 'texinfo-format-defun) | |
| 3643 (put 'defmacx 'texinfo-format 'texinfo-format-defunx) | |
| 3644 (put 'defmac 'texinfo-end 'texinfo-end-defun) | |
| 3645 (put 'defmac 'texinfo-defun-type '('defun-type "Macro")) | |
| 3646 (put 'defmacx 'texinfo-defun-type '('defun-type "Macro")) | |
| 3647 (put 'defmac 'texinfo-defun-index 'texinfo-findex) | |
| 3648 (put 'defmacx 'texinfo-defun-index 'texinfo-findex) | |
| 3649 | |
| 3650 (put 'defspec 'texinfo-format 'texinfo-format-defun) | |
| 3651 (put 'defspecx 'texinfo-format 'texinfo-format-defunx) | |
| 3652 (put 'defspec 'texinfo-end 'texinfo-end-defun) | |
| 3653 (put 'defspec 'texinfo-defun-type '('defun-type "Special form")) | |
| 3654 (put 'defspecx 'texinfo-defun-type '('defun-type "Special form")) | |
| 3655 (put 'defspec 'texinfo-defun-index 'texinfo-findex) | |
| 3656 (put 'defspecx 'texinfo-defun-index 'texinfo-findex) | |
| 3657 | |
| 3658 (put 'defvr 'texinfo-format 'texinfo-format-defun) | |
| 3659 (put 'defvrx 'texinfo-format 'texinfo-format-defunx) | |
| 3660 (put 'defvr 'texinfo-end 'texinfo-end-defun) | |
| 3661 (put 'defvr 'texinfo-defun-type '('deffn-type nil)) | |
| 3662 (put 'defvrx 'texinfo-defun-type '('deffn-type nil)) | |
| 3663 (put 'defvr 'texinfo-defun-index 'texinfo-vindex) | |
| 3664 (put 'defvrx 'texinfo-defun-index 'texinfo-vindex) | |
| 3665 | |
| 3666 (put 'defvar 'texinfo-format 'texinfo-format-defun) | |
| 3667 (put 'defvarx 'texinfo-format 'texinfo-format-defunx) | |
| 3668 (put 'defvar 'texinfo-end 'texinfo-end-defun) | |
| 3669 (put 'defvar 'texinfo-defun-type '('defun-type "Variable")) | |
| 3670 (put 'defvarx 'texinfo-defun-type '('defun-type "Variable")) | |
| 3671 (put 'defvar 'texinfo-defun-index 'texinfo-vindex) | |
| 3672 (put 'defvarx 'texinfo-defun-index 'texinfo-vindex) | |
| 3673 | |
| 3674 (put 'defconst 'texinfo-format 'texinfo-format-defun) | |
| 3675 (put 'defconstx 'texinfo-format 'texinfo-format-defunx) | |
| 3676 (put 'defconst 'texinfo-end 'texinfo-end-defun) | |
| 3677 (put 'defconst 'texinfo-defun-type '('defun-type "Constant")) | |
| 3678 (put 'defconstx 'texinfo-defun-type '('defun-type "Constant")) | |
| 3679 (put 'defconst 'texinfo-defun-index 'texinfo-vindex) | |
| 3680 (put 'defconstx 'texinfo-defun-index 'texinfo-vindex) | |
| 3681 | |
| 3682 (put 'defcmd 'texinfo-format 'texinfo-format-defun) | |
| 3683 (put 'defcmdx 'texinfo-format 'texinfo-format-defunx) | |
| 3684 (put 'defcmd 'texinfo-end 'texinfo-end-defun) | |
| 3685 (put 'defcmd 'texinfo-defun-type '('defun-type "Command")) | |
| 3686 (put 'defcmdx 'texinfo-defun-type '('defun-type "Command")) | |
| 3687 (put 'defcmd 'texinfo-defun-index 'texinfo-findex) | |
| 3688 (put 'defcmdx 'texinfo-defun-index 'texinfo-findex) | |
| 3689 | |
| 3690 (put 'defopt 'texinfo-format 'texinfo-format-defun) | |
| 3691 (put 'defoptx 'texinfo-format 'texinfo-format-defunx) | |
| 3692 (put 'defopt 'texinfo-end 'texinfo-end-defun) | |
| 3693 (put 'defopt 'texinfo-defun-type '('defun-type "User Option")) | |
| 3694 (put 'defoptx 'texinfo-defun-type '('defun-type "User Option")) | |
| 3695 (put 'defopt 'texinfo-defun-index 'texinfo-vindex) | |
| 3696 (put 'defoptx 'texinfo-defun-index 'texinfo-vindex) | |
| 3697 | |
| 3698 (put 'deftp 'texinfo-format 'texinfo-format-defun) | |
| 3699 (put 'deftpx 'texinfo-format 'texinfo-format-defunx) | |
| 3700 (put 'deftp 'texinfo-end 'texinfo-end-defun) | |
| 3701 (put 'deftp 'texinfo-defun-type '('deftp-type nil)) | |
| 3702 (put 'deftpx 'texinfo-defun-type '('deftp-type nil)) | |
| 3703 (put 'deftp 'texinfo-defun-index 'texinfo-tindex) | |
| 3704 (put 'deftpx 'texinfo-defun-index 'texinfo-tindex) | |
| 3705 | |
| 3706 ;;; Object-oriented stuff is a little hairier. | |
| 3707 | |
| 3708 (put 'defop 'texinfo-format 'texinfo-format-defun) | |
| 3709 (put 'defopx 'texinfo-format 'texinfo-format-defunx) | |
| 3710 (put 'defop 'texinfo-end 'texinfo-end-defun) | |
| 3711 (put 'defop 'texinfo-defun-type '('defop-type nil)) | |
| 3712 (put 'defopx 'texinfo-defun-type '('defop-type nil)) | |
| 3713 (put 'defop 'texinfo-defun-index 'texinfo-findex) | |
| 3714 (put 'defopx 'texinfo-defun-index 'texinfo-findex) | |
| 3715 | |
| 3716 (put 'defmethod 'texinfo-format 'texinfo-format-defun) | |
| 3717 (put 'defmethodx 'texinfo-format 'texinfo-format-defunx) | |
| 3718 (put 'defmethod 'texinfo-end 'texinfo-end-defun) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3719 (put 'defmethod 'texinfo-defun-type '('defmethod-type "Method")) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3720 (put 'defmethodx 'texinfo-defun-type '('defmethod-type "Method")) |
| 189 | 3721 (put 'defmethod 'texinfo-defun-index 'texinfo-findex) |
| 3722 (put 'defmethodx 'texinfo-defun-index 'texinfo-findex) | |
| 3723 | |
| 3724 (put 'defcv 'texinfo-format 'texinfo-format-defun) | |
| 3725 (put 'defcvx 'texinfo-format 'texinfo-format-defunx) | |
| 3726 (put 'defcv 'texinfo-end 'texinfo-end-defun) | |
| 3727 (put 'defcv 'texinfo-defun-type '('defop-type nil)) | |
| 3728 (put 'defcvx 'texinfo-defun-type '('defop-type nil)) | |
| 3729 (put 'defcv 'texinfo-defun-index 'texinfo-vindex) | |
| 3730 (put 'defcvx 'texinfo-defun-index 'texinfo-vindex) | |
| 3731 | |
| 3732 (put 'defivar 'texinfo-format 'texinfo-format-defun) | |
| 3733 (put 'defivarx 'texinfo-format 'texinfo-format-defunx) | |
| 3734 (put 'defivar 'texinfo-end 'texinfo-end-defun) | |
| 3735 (put 'defivar 'texinfo-defun-type '('defmethod-type "Instance variable")) | |
| 3736 (put 'defivarx 'texinfo-defun-type '('defmethod-type "Instance variable")) | |
| 3737 (put 'defivar 'texinfo-defun-index 'texinfo-vindex) | |
| 3738 (put 'defivarx 'texinfo-defun-index 'texinfo-vindex) | |
| 3739 | |
| 3740 ;;; Typed functions and variables | |
| 3741 | |
| 3742 (put 'deftypefn 'texinfo-format 'texinfo-format-defun) | |
| 3743 (put 'deftypefnx 'texinfo-format 'texinfo-format-defunx) | |
| 3744 (put 'deftypefn 'texinfo-end 'texinfo-end-defun) | |
| 3745 (put 'deftypefn 'texinfo-defun-type '('deftypefn-type nil)) | |
| 3746 (put 'deftypefnx 'texinfo-defun-type '('deftypefn-type nil)) | |
| 3747 (put 'deftypefn 'texinfo-defun-index 'texinfo-findex) | |
| 3748 (put 'deftypefnx 'texinfo-defun-index 'texinfo-findex) | |
| 3749 | |
| 3750 (put 'deftypefun 'texinfo-format 'texinfo-format-defun) | |
| 3751 (put 'deftypefunx 'texinfo-format 'texinfo-format-defunx) | |
| 3752 (put 'deftypefun 'texinfo-end 'texinfo-end-defun) | |
| 3753 (put 'deftypefun 'texinfo-defun-type '('deftypefun-type "Function")) | |
| 3754 (put 'deftypefunx 'texinfo-defun-type '('deftypefun-type "Function")) | |
| 3755 (put 'deftypefun 'texinfo-defun-index 'texinfo-findex) | |
| 3756 (put 'deftypefunx 'texinfo-defun-index 'texinfo-findex) | |
| 3757 | |
| 3758 (put 'deftypevr 'texinfo-format 'texinfo-format-defun) | |
| 3759 (put 'deftypevrx 'texinfo-format 'texinfo-format-defunx) | |
| 3760 (put 'deftypevr 'texinfo-end 'texinfo-end-defun) | |
| 3761 (put 'deftypevr 'texinfo-defun-type '('deftypefn-type nil)) | |
| 3762 (put 'deftypevrx 'texinfo-defun-type '('deftypefn-type nil)) | |
| 3763 (put 'deftypevr 'texinfo-defun-index 'texinfo-vindex) | |
| 3764 (put 'deftypevrx 'texinfo-defun-index 'texinfo-vindex) | |
| 3765 | |
| 3766 (put 'deftypevar 'texinfo-format 'texinfo-format-defun) | |
| 3767 (put 'deftypevarx 'texinfo-format 'texinfo-format-defunx) | |
| 3768 (put 'deftypevar 'texinfo-end 'texinfo-end-defun) | |
| 3769 (put 'deftypevar 'texinfo-defun-type '('deftypevar-type "Variable")) | |
| 3770 (put 'deftypevarx 'texinfo-defun-type '('deftypevar-type "Variable")) | |
| 3771 (put 'deftypevar 'texinfo-defun-index 'texinfo-vindex) | |
| 3772 (put 'deftypevarx 'texinfo-defun-index 'texinfo-vindex) | |
| 3773 | |
| 3774 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3775 ;;; @set, @clear, @ifset, @ifclear |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3776 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3777 ;; If a flag is set with @set FLAG, then text between @ifset and @end |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3778 ;; ifset is formatted normally, but if the flag is is cleared with |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3779 ;; @clear FLAG, then the text is not formatted; it is ignored. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3780 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3781 ;; If a flag is cleared with @clear FLAG, then text between @ifclear |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3782 ;; and @end ifclear is formatted normally, but if the flag is is set with |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3783 ;; @set FLAG, then the text is not formatted; it is ignored. @ifclear |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3784 ;; is the opposite of @ifset. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3785 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3786 ;; If a flag is set to a string with @set FLAG, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3787 ;; replace @value{FLAG} with the string. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3788 ;; If a flag with a value is cleared, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3789 ;; @value{FLAG} is invalid, |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3790 ;; as if there had never been any @set FLAG previously. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3791 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3792 (put 'clear 'texinfo-format 'texinfo-clear) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3793 (defun texinfo-clear () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3794 "Clear the value of the flag." |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3795 (let* ((arg (texinfo-parse-arg-discard)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3796 (flag (car (read-from-string arg))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3797 (value (substring arg (cdr (read-from-string arg))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3798 (put flag 'texinfo-whether-setp 'flag-cleared) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3799 (put flag 'texinfo-set-value ""))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3800 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3801 (put 'set 'texinfo-format 'texinfo-set) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3802 (defun texinfo-set () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3803 "Set the value of the flag, optionally to a string. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3804 The command `@set foo This is a string.' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3805 sets flag foo to the value: `This is a string.' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3806 The command `@value{foo}' expands to the value." |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3807 (let* ((arg (texinfo-parse-arg-discard)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3808 (flag (car (read-from-string arg))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3809 (value (substring arg (cdr (read-from-string arg))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3810 (put flag 'texinfo-whether-setp 'flag-set) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3811 (put flag 'texinfo-set-value value))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3812 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3813 (put 'value 'texinfo-format 'texinfo-value) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3814 (defun texinfo-value () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3815 "Insert the string to which the flag is set. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3816 The command `@set foo This is a string.' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3817 sets flag foo to the value: `This is a string.' |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3818 The command `@value{foo}' expands to the value." |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3819 (let ((arg (texinfo-parse-arg-discard))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3820 (cond ((and |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3821 (eq (get (car (read-from-string arg)) 'texinfo-whether-setp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3822 'flag-set) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3823 (get (car (read-from-string arg)) 'texinfo-set-value)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3824 (insert (get (car (read-from-string arg)) 'texinfo-set-value))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3825 ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3826 'flag-cleared) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3827 (insert (format "{No value for \"%s\"}" arg))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3828 ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) nil) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3829 (insert (format "{No value for \"%s\"}" arg)))))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3830 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3831 (put 'ifset 'texinfo-end 'texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3832 (put 'ifset 'texinfo-format 'texinfo-if-set) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3833 (defun texinfo-if-set () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3834 "If set, continue formatting; else do not format region up to @end ifset" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3835 (let ((arg (texinfo-parse-arg-discard))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3836 (cond |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3837 ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3838 'flag-set) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3839 ;; Format the text (i.e., do not remove it); do nothing here. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3840 ()) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3841 ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3842 'flag-cleared) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3843 ;; Clear region (i.e., cause the text to be ignored). |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3844 (delete-region texinfo-command-start |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3845 (progn (re-search-forward "@end ifset[ \t]*\n") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3846 (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3847 ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3848 nil) |
|
5118
eec34ce70181
(texinfo-if-set, texinfo-if-clear): Act appropriately when flat neither
Robert J. Chassell <bob@rattlesnake.com>
parents:
4982
diff
changeset
|
3849 ;; In this case flag is neither set nor cleared. |
|
eec34ce70181
(texinfo-if-set, texinfo-if-clear): Act appropriately when flat neither
Robert J. Chassell <bob@rattlesnake.com>
parents:
4982
diff
changeset
|
3850 ;; Act as if set, i.e. do nothing. |
|
eec34ce70181
(texinfo-if-set, texinfo-if-clear): Act appropriately when flat neither
Robert J. Chassell <bob@rattlesnake.com>
parents:
4982
diff
changeset
|
3851 ())))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3852 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3853 (put 'ifclear 'texinfo-end 'texinfo-discard-command) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3854 (put 'ifclear 'texinfo-format 'texinfo-if-clear) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3855 (defun texinfo-if-clear () |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3856 "If clear, continue formatting; if set, do not format up to @end ifset" |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3857 (let ((arg (texinfo-parse-arg-discard))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3858 (cond |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3859 ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3860 'flag-set) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3861 ;; Clear region (i.e., cause the text to be ignored). |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3862 (delete-region texinfo-command-start |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3863 (progn (re-search-forward "@end ifclear[ \t]*\n") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3864 (point)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3865 ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3866 'flag-cleared) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3867 ;; Format the text (i.e., do not remove it); do nothing here. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3868 ()) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3869 ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3870 nil) |
|
5118
eec34ce70181
(texinfo-if-set, texinfo-if-clear): Act appropriately when flat neither
Robert J. Chassell <bob@rattlesnake.com>
parents:
4982
diff
changeset
|
3871 ;; In this case flag is neither set nor cleared. |
|
eec34ce70181
(texinfo-if-set, texinfo-if-clear): Act appropriately when flat neither
Robert J. Chassell <bob@rattlesnake.com>
parents:
4982
diff
changeset
|
3872 ;; Act as if clear, i.e. do nothing. |
|
eec34ce70181
(texinfo-if-set, texinfo-if-clear): Act appropriately when flat neither
Robert J. Chassell <bob@rattlesnake.com>
parents:
4982
diff
changeset
|
3873 ())))) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3874 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3875 ;;; @ifeq |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3876 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3877 (put 'ifeq 'texinfo-format 'texinfo-format-ifeq) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3878 (defun texinfo-format-ifeq () |
|
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
3879 "If ARG1 and ARG2 caselessly string compare to same string, perform COMMAND. |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3880 Otherwise produces no output. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3881 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3882 Thus: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3883 @ifeq{ arg1 , arg1 , @code{foo}} bar |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3884 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3885 ==> `foo' bar. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3886 but |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3887 @ifeq{ arg1 , arg2 , @code{foo}} bar |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3888 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3889 ==> bar |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3890 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3891 Note that the Texinfo command and its arguments must be arguments to |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3892 the @ifeq command." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3893 ;; compare-buffer-substrings does not exist in version 18; don't use |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3894 (goto-char texinfo-command-end) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3895 (let* ((case-fold-search t) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3896 (stop (save-excursion (forward-sexp 1) (point))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3897 start end |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3898 ;; @ifeq{arg1, arg2, @command{optional-args}} |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3899 (arg1 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3900 (progn |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3901 (forward-char 1) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3902 (skip-chars-forward " ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3903 (setq start (point)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3904 (search-forward "," stop t) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3905 (skip-chars-backward ", ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3906 (buffer-substring start (point)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3907 (arg2 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3908 (progn |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3909 (search-forward "," stop t) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3910 (skip-chars-forward " ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3911 (setq start (point)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3912 (search-forward "," stop t) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3913 (skip-chars-backward ", ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3914 (buffer-substring start (point)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3915 (texinfo-command |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3916 (progn |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3917 (search-forward "," stop t) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3918 (skip-chars-forward " ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3919 (setq start (point)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3920 (goto-char (1- stop)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3921 (skip-chars-backward " ") |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3922 (buffer-substring start (point))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3923 (delete-region texinfo-command-start stop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3924 (if (equal arg1 arg2) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3925 (insert texinfo-command)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3926 (goto-char texinfo-command-start))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3927 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3928 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3929 ;;; Process included files: `@include' command |
| 189 | 3930 |
| 3931 ;; Updated 19 October 1990 | |
| 3932 ;; In the original version, include files were ignored by Info but | |
| 3933 ;; incorporated in to the printed manual. To make references to the | |
| 3934 ;; included file, the Texinfo source file has to refer to the included | |
| 14040 | 3935 ;; files using the `(filename)nodename' format for referring to other |
| 189 | 3936 ;; Info files. Also, the included files had to be formatted on their |
| 3937 ;; own. It was just like they were another file. | |
| 3938 | |
| 3939 ;; Currently, include files are inserted into the buffer that is | |
| 3940 ;; formatted for Info. If large, the resulting info file is split and | |
| 3941 ;; tagified. For current include files to work, the master menu must | |
| 3942 ;; refer to all the nodes, and the highest level nodes in the include | |
| 3943 ;; files must have the correct next, prev, and up pointers. | |
| 3944 | |
| 3945 ;; The included file may have an @setfilename and even an @settitle, | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3946 ;; but not an `\input texinfo' line. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3947 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3948 ;; Updated 24 March 1993 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3949 ;; In order for @raisesections and @lowersections to work, included |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3950 ;; files must be inserted into the buffer holding the outer file |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3951 ;; before other Info formatting takes place. So @include is no longer |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3952 ;; is treated like other @-commands. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3953 (put 'include 'texinfo-format 'texinfo-format-noop) |
| 189 | 3954 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3955 ;; Original definition: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3956 ;; (defun texinfo-format-include () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3957 ;; (let ((filename (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3958 ;; (default-directory input-directory) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3959 ;; subindex) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3960 ;; (setq subindex |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3961 ;; (save-excursion |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3962 ;; (progn (find-file |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3963 ;; (cond ((file-readable-p (concat filename ".texinfo")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3964 ;; (concat filename ".texinfo")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3965 ;; ((file-readable-p (concat filename ".texi")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3966 ;; (concat filename ".texi")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3967 ;; ((file-readable-p (concat filename ".tex")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3968 ;; (concat filename ".tex")) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3969 ;; ((file-readable-p filename) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3970 ;; filename) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3971 ;; (t (error "@include'd file %s not found" |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3972 ;; filename)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3973 ;; (texinfo-format-buffer-1)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3974 ;; (texinfo-subindex 'texinfo-vindex (car subindex) (nth 1 subindex)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3975 ;; (texinfo-subindex 'texinfo-findex (car subindex) (nth 2 subindex)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3976 ;; (texinfo-subindex 'texinfo-cindex (car subindex) (nth 3 subindex)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3977 ;; (texinfo-subindex 'texinfo-pindex (car subindex) (nth 4 subindex)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3978 ;; (texinfo-subindex 'texinfo-tindex (car subindex) (nth 5 subindex)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3979 ;; (texinfo-subindex 'texinfo-kindex (car subindex) (nth 6 subindex)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3980 ;; |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3981 ;;(defun texinfo-subindex (indexvar file content) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3982 ;; (set indexvar (cons (list 'recurse file content) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3983 ;; (symbol-value indexvar)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3984 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3985 ;; Second definition: |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3986 ;; (put 'include 'texinfo-format 'texinfo-format-include) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3987 ;; (defun texinfo-format-include () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3988 ;; (let ((filename (concat input-directory |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3989 ;; (texinfo-parse-arg-discard))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3990 ;; (default-directory input-directory)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3991 ;; (message "Reading: %s" filename) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3992 ;; (save-excursion |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3993 ;; (save-restriction |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3994 ;; (narrow-to-region |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3995 ;; (point) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3996 ;; (+ (point) (car (cdr (insert-file-contents filename))))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3997 ;; (goto-char (point-min)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3998 ;; (texinfo-append-refill) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3999 ;; (texinfo-format-convert (point-min) (point-max)))) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4000 ;; (setq last-input-buffer input-buffer) ; to bypass setfilename |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4001 ;; )) |
| 189 | 4002 |
| 4003 | |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4004 ;;; Numerous commands do nothing in Info |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4005 ;; These commands are defined in texinfo.tex for printed output. |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4006 |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4007 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4008 ;;; various noops, such as @b{foo}, that take arguments in braces |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4009 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4010 (put 'b 'texinfo-format 'texinfo-format-noop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4011 (put 'i 'texinfo-format 'texinfo-format-noop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4012 (put 'r 'texinfo-format 'texinfo-format-noop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4013 (put 't 'texinfo-format 'texinfo-format-noop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4014 (put 'w 'texinfo-format 'texinfo-format-noop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4015 (put 'asis 'texinfo-format 'texinfo-format-noop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4016 (put 'dmn 'texinfo-format 'texinfo-format-noop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4017 (put 'math 'texinfo-format 'texinfo-format-noop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4018 (put 'titlefont 'texinfo-format 'texinfo-format-noop) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4019 (defun texinfo-format-noop () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4020 (insert (texinfo-parse-arg-discard)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4021 (goto-char texinfo-command-start)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4022 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4023 ;; @hyphenation command discards an argument within braces |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4024 (put 'hyphenation 'texinfo-format 'texinfo-discard-command-and-arg) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4025 (defun texinfo-discard-command-and-arg () |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4026 "Discard both @-command and its argument in braces." |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4027 (goto-char texinfo-command-end) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4028 (forward-list 1) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4029 (setq texinfo-command-end (point)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4030 (delete-region texinfo-command-start texinfo-command-end)) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4031 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4032 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4033 ;;; Do nothing commands, such as @smallbook, that have no args and no braces |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4034 ;; These must appear on a line of their own |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4035 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4036 (put 'bye 'texinfo-format 'texinfo-discard-line) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4037 (put 'smallbook 'texinfo-format 'texinfo-discard-line) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4038 (put 'finalout 'texinfo-format 'texinfo-discard-line) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4039 (put 'overfullrule 'texinfo-format 'texinfo-discard-line) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4040 (put 'smallbreak 'texinfo-format 'texinfo-discard-line) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4041 (put 'medbreak 'texinfo-format 'texinfo-discard-line) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4042 (put 'bigbreak 'texinfo-format 'texinfo-discard-line) |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4043 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4044 |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4045 ;;; These noop commands discard the rest of the line. |
|
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4046 |
| 189 | 4047 (put 'c 'texinfo-format 'texinfo-discard-line-with-args) |
| 4048 (put 'comment 'texinfo-format 'texinfo-discard-line-with-args) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4049 (put 'contents 'texinfo-format 'texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4050 (put 'group 'texinfo-end 'texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4051 (put 'group 'texinfo-format 'texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4052 (put 'headings 'texinfo-format 'texinfo-discard-line-with-args) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4053 (put 'setchapterstyle 'texinfo-format 'texinfo-discard-line-with-args) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4054 (put 'hsize 'texinfo-format 'texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4055 (put 'itemindent 'texinfo-format 'texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4056 (put 'lispnarrowing 'texinfo-format 'texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4057 (put 'need 'texinfo-format 'texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4058 (put 'nopara 'texinfo-format 'texinfo-discard-line-with-args) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4059 |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4060 ;; @novalidate suppresses cross-reference checking and auxiliary file |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4061 ;; creation with TeX. The Info-validate command checks that every |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4062 ;; node pointer points to an existing node. Since this Info command |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4063 ;; is not invoked automatically, the @novalidate command is irrelevant |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4064 ;; and not supported by texinfmt.el |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4065 (put 'novalidate 'texinfo-format 'texinfo-discard-line-with-args) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4066 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4067 (put 'page 'texinfo-format 'texinfo-discard-line-with-args) |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4068 (put 'pagesizes 'texinfo-format 'texinfo-discard-line-with-args) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4069 (put 'parindent 'texinfo-format 'texinfo-discard-line-with-args) |
| 189 | 4070 (put 'setchapternewpage 'texinfo-format 'texinfo-discard-line-with-args) |
| 4071 (put 'setq 'texinfo-format 'texinfo-discard-line-with-args) | |
|
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4072 |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4073 (put 'setcontentsaftertitlepage |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4074 'texinfo-format 'texinfo-discard-line-with-args) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4075 (put 'setshortcontentsaftertitlepage |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4076 'texinfo-format 'texinfo-discard-line-with-args) |
|
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4077 |
| 189 | 4078 (put 'settitle 'texinfo-format 'texinfo-discard-line-with-args) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4079 (put 'setx 'texinfo-format 'texinfo-discard-line-with-args) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4080 (put 'shortcontents 'texinfo-format 'texinfo-discard-line-with-args) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4081 (put 'shorttitlepage 'texinfo-format 'texinfo-discard-line-with-args) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4082 (put 'summarycontents 'texinfo-format 'texinfo-discard-line-with-args) |
|
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4083 (put 'input 'texinfo-format 'texinfo-discard-line-with-args) |
| 189 | 4084 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4085 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4086 ;;; Some commands cannot be handled |
| 189 | 4087 |
| 4088 (defun texinfo-unsupported () | |
| 4089 (error "%s is not handled by texinfo" | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4090 (buffer-substring texinfo-command-start texinfo-command-end))) |
| 189 | 4091 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4092 ;;; Batch formatting |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4093 |
| 189 | 4094 (defun batch-texinfo-format () |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4095 "Runs texinfo-format-buffer on the files remaining on the command line. |
| 189 | 4096 Must be used only with -batch, and kills emacs on completion. |
| 4097 Each file will be processed even if an error occurred previously. | |
| 4098 For example, invoke | |
| 4099 \"emacs -batch -funcall batch-texinfo-format $docs/ ~/*.texinfo\"." | |
| 4100 (if (not noninteractive) | |
| 4101 (error "batch-texinfo-format may only be used -batch.")) | |
| 4102 (let ((version-control t) | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4103 (auto-save-default nil) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4104 (find-file-run-dired nil) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4105 (kept-old-versions 259259) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4106 (kept-new-versions 259259)) |
| 189 | 4107 (let ((error 0) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4108 file |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4109 (files ())) |
| 189 | 4110 (while command-line-args-left |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4111 (setq file (expand-file-name (car command-line-args-left))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4112 (cond ((not (file-exists-p file)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4113 (message ">> %s does not exist!" file) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4114 (setq error 1 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4115 command-line-args-left (cdr command-line-args-left))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4116 ((file-directory-p file) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4117 (setq command-line-args-left |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4118 (nconc (directory-files file) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4119 (cdr command-line-args-left)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4120 (t |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4121 (setq files (cons file files) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4122 command-line-args-left (cdr command-line-args-left))))) |
| 189 | 4123 (while files |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4124 (setq file (car files) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4125 files (cdr files)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4126 (condition-case err |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4127 (progn |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4128 (if buffer-file-name (kill-buffer (current-buffer))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4129 (find-file file) |
|
4769
d1b5ca8f5493
(texinfo-format-region texinfo-format-buffer): Add ###autoload cookies.
Brian Fox <bfox@gnu.org>
parents:
4396
diff
changeset
|
4130 (buffer-disable-undo (current-buffer)) |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4131 (set-buffer-modified-p nil) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4132 (texinfo-mode) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4133 (message "texinfo formatting %s..." file) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4134 (texinfo-format-buffer nil) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4135 (if (buffer-modified-p) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4136 (progn (message "Saving modified %s" (buffer-file-name)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4137 (save-buffer)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4138 (error |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4139 (message ">> Error: %s" (prin1-to-string err)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4140 (message ">> point at") |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4141 (let ((s (buffer-substring (point) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4142 (min (+ (point) 100) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4143 (point-max)))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4144 (tem 0)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4145 (while (setq tem (string-match "\n+" s tem)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4146 (setq s (concat (substring s 0 (match-beginning 0)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4147 "\n>> " |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4148 (substring s (match-end 0))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4149 tem (1+ tem))) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4150 (message ">> %s" s)) |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4151 (setq error 1)))) |
| 189 | 4152 (kill-emacs error)))) |
|
657
fec3f9a1e3e5
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
258
diff
changeset
|
4153 |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4154 |
|
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4155 ;;; Place `provide' at end of file. |
| 3456 | 4156 (provide 'texinfmt) |
| 4157 | |
|
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4158 ;;; texinfmt.el ends here. |
