Mercurial > emacs
annotate lisp/textmodes/texinfmt.el @ 111485:4c3fdb97fdaf
shr.el (shr-insert): Don't break long line if it is because of kinsoku-bol characters in the line end.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 11 Nov 2010 03:50:27 +0000 |
parents | 9ab5ff757483 |
children | 417b1e4d63cd |
rev | line source |
---|---|
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
1 ;;; texinfmt.el --- format Texinfo files into Info files |
13337 | 2 |
109036 | 3 ;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
4 ;; 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | |
5 ;; 2008, 2009, 2010 Free Software Foundation, Inc. | |
841 | 6 |
43808 | 7 ;; 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
|
8 ;; Keywords: maint, tex, docs |
189 | 9 |
13337 | 10 ;; This file is part of GNU Emacs. |
189 | 11 |
94670
f4a69fedbd46
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
189 | 13 ;; it under the terms of the GNU General Public License as published by |
94670
f4a69fedbd46
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
14 ;; the Free Software Foundation, either version 3 of the License, or |
f4a69fedbd46
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
15 ;; (at your option) any later version. |
189 | 16 |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
94670
f4a69fedbd46
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
189 | 24 |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
25 ;;; Commentary: |
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
26 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
27 ;;; Code: |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
28 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
29 ;;; 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
|
30 |
71781
c780a286814a
* textmodes/texinfmt.el: Finally remember to set texinfmt-version
Robert J. Chassell <bob@rattlesnake.com>
parents:
71675
diff
changeset
|
31 (defvar texinfmt-version "2.42 of 7 Jul 2006") |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
32 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
33 (defun texinfmt-version (&optional here) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
34 "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
|
35 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
|
36 (interactive "P") |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
37 (let ((version-string |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
38 (format "Version of \`texinfmt.el\': %s" texinfmt-version))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
39 (if here |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
40 (insert version-string) |
105372
bd2966850aac
Use `called-interactively-p' instead of `interactive-p'.
Juanma Barranquero <lekktu@gmail.com>
parents:
100908
diff
changeset
|
41 (if (called-interactively-p 'interactive) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
42 (message "%s" version-string) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
43 version-string)))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
44 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
45 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
46 ;;; Variable definitions |
189 | 47 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
48 (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
|
49 (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
|
50 |
189 | 51 (defvar texinfo-vindex) |
52 (defvar texinfo-findex) | |
53 (defvar texinfo-cindex) | |
54 (defvar texinfo-pindex) | |
55 (defvar texinfo-tindex) | |
56 (defvar texinfo-kindex) | |
57 (defvar texinfo-last-node) | |
58 (defvar texinfo-node-names) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
59 (defvar texinfo-enclosure-list) |
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
60 (defvar texinfo-alias-list) |
24314
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
61 (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
|
62 |
4868
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
63 (defvar texinfo-command-start) |
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
64 (defvar texinfo-command-end) |
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
65 (defvar texinfo-command-name) |
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
66 (defvar texinfo-defun-type) |
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
67 (defvar texinfo-last-node-pos) |
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
68 (defvar texinfo-stack) |
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
69 (defvar texinfo-short-index-cmds-alist) |
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
70 (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
|
71 (defvar texinfo-format-filename) |
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
72 (defvar texinfo-footnote-number) |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
73 |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
74 (defvar texinfo-raisesections-alist |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
75 '((@chapter . @chapter) ; Cannot go higher |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
76 (@unnumbered . @unnumbered) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
77 (@centerchap . @unnumbered) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
78 |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
79 (@majorheading . @majorheading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
80 (@chapheading . @chapheading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
81 (@appendix . @appendix) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
82 |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
83 (@section . @chapter) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
84 (@unnumberedsec . @unnumbered) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
85 (@heading . @chapheading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
86 (@appendixsec . @appendix) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
87 |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
88 (@subsection . @section) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
89 (@unnumberedsubsec . @unnumberedsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
90 (@subheading . @heading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
91 (@appendixsubsec . @appendixsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
92 |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
93 (@subsubsection . @subsection) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
94 (@unnumberedsubsubsec . @unnumberedsubsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
95 (@subsubheading . @subheading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
96 (@appendixsubsubsec . @appendixsubsec)) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
97 "*An alist of next higher levels for chapters, sections, etc... |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
98 For example, section to chapter, subsection to section. |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
99 Used by `texinfo-raise-lower-sections'. |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
100 The keys specify types of section; the values correspond to the next |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
101 higher types.") |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
102 |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
103 (defvar texinfo-lowersections-alist |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
104 '((@chapter . @section) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
105 (@unnumbered . @unnumberedsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
106 (@centerchap . @unnumberedsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
107 (@majorheading . @heading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
108 (@chapheading . @heading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
109 (@appendix . @appendixsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
110 |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
111 (@section . @subsection) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
112 (@unnumberedsec . @unnumberedsubsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
113 (@heading . @subheading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
114 (@appendixsec . @appendixsubsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
115 |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
116 (@subsection . @subsubsection) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
117 (@unnumberedsubsec . @unnumberedsubsubsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
118 (@subheading . @subsubheading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
119 (@appendixsubsec . @appendixsubsubsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
120 |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
121 (@subsubsection . @subsubsection) ; Cannot go lower. |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
122 (@unnumberedsubsubsec . @unnumberedsubsubsec) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
123 (@subsubheading . @subsubheading) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
124 (@appendixsubsubsec . @appendixsubsubsec)) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
125 "*An alist of next lower levels for chapters, sections, etc... |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
126 For example, chapter to section, section to subsection. |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
127 Used by `texinfo-raise-lower-sections'. |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
128 The keys specify types of section; the values correspond to the next |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
129 lower types.") |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
130 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
131 ;;; Syntax table |
189 | 132 |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
133 (defvar texinfo-format-syntax-table |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
134 (let ((st (make-syntax-table))) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
135 (modify-syntax-entry ?\" " " st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
136 (modify-syntax-entry ?\\ " " st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
137 (modify-syntax-entry ?@ "\\" st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
138 (modify-syntax-entry ?\^q "\\" st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
139 (modify-syntax-entry ?\[ "." st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
140 (modify-syntax-entry ?\] "." st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
141 (modify-syntax-entry ?\( "." st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
142 (modify-syntax-entry ?\) "." st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
143 (modify-syntax-entry ?{ "(}" st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
144 (modify-syntax-entry ?} "){" st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
145 (modify-syntax-entry ?\' "." st) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
146 st)) |
189 | 147 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
148 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
149 ;;; 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
|
150 |
4769
d1b5ca8f5493
(texinfo-format-region texinfo-format-buffer): Add ###autoload cookies.
Brian Fox <bfox@gnu.org>
parents:
4396
diff
changeset
|
151 ;;;###autoload |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
152 (defun texinfo-format-buffer (&optional nosplit) |
189 | 153 "Process the current buffer as texinfo code, into an Info file. |
154 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
|
155 name specified in the @setfilename command. |
189 | 156 |
157 Non-nil argument (prefix, if interactive) means don't make tag table | |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
158 and don't split the file if large. You can use `Info-tagify' and |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
159 `Info-split' to do these manually." |
189 | 160 (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
|
161 (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
|
162 (coding-system-for-write buffer-file-coding-system)) |
189 | 163 (message lastmessage) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
164 (widen) |
189 | 165 (texinfo-format-buffer-1) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
166 (Info-tagify) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
167 (if nosplit |
189 | 168 nil |
98359
d4ebb53e6be1
* informat.el (Info-split-threshold): New variable.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
97142
diff
changeset
|
169 (if (> (buffer-size) (+ 50000 Info-split-threshold)) |
189 | 170 (progn |
171 (message (setq lastmessage "Splitting Info file...")) | |
172 (Info-split)))) | |
173 (message (concat lastmessage | |
105372
bd2966850aac
Use `called-interactively-p' instead of `interactive-p'.
Juanma Barranquero <lekktu@gmail.com>
parents:
100908
diff
changeset
|
174 (if (called-interactively-p 'interactive) |
bd2966850aac
Use `called-interactively-p' instead of `interactive-p'.
Juanma Barranquero <lekktu@gmail.com>
parents:
100908
diff
changeset
|
175 "done. Now save it." "done."))))) |
189 | 176 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
177 (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
|
178 "*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
|
179 |
52969
d60ea4b622fe
(texinfo-pre-format-hook): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
180 (defvar texinfo-pre-format-hook nil |
d60ea4b622fe
(texinfo-pre-format-hook): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
181 "Hook called before the conversion of the Texinfo file to Info format. |
d60ea4b622fe
(texinfo-pre-format-hook): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
182 The functions on this hook are called with argument BUFFER, the buffer |
d60ea4b622fe
(texinfo-pre-format-hook): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
183 containing the Texinfo file.") |
d60ea4b622fe
(texinfo-pre-format-hook): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
184 |
48932
faafd2631b67
(tex-start-of-header, tex-end-of-header): Add defvars.
Richard M. Stallman <rms@gnu.org>
parents:
48794
diff
changeset
|
185 ;; These come from tex-mode.el. |
faafd2631b67
(tex-start-of-header, tex-end-of-header): Add defvars.
Richard M. Stallman <rms@gnu.org>
parents:
48794
diff
changeset
|
186 (defvar tex-start-of-header) |
faafd2631b67
(tex-start-of-header, tex-end-of-header): Add defvars.
Richard M. Stallman <rms@gnu.org>
parents:
48794
diff
changeset
|
187 (defvar tex-end-of-header) |
faafd2631b67
(tex-start-of-header, tex-end-of-header): Add defvars.
Richard M. Stallman <rms@gnu.org>
parents:
48794
diff
changeset
|
188 |
4769
d1b5ca8f5493
(texinfo-format-region texinfo-format-buffer): Add ###autoload cookies.
Brian Fox <bfox@gnu.org>
parents:
4396
diff
changeset
|
189 ;;;###autoload |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
190 (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
|
191 "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
|
192 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
|
193 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
|
194 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
|
195 (interactive "r") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
196 (message "Converting region to Info format...") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
197 (let (texinfo-command-start |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
198 texinfo-command-end |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
199 texinfo-command-name |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
200 texinfo-vindex |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
201 texinfo-findex |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
202 texinfo-cindex |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
203 texinfo-pindex |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
204 texinfo-tindex |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
205 texinfo-kindex |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
206 texinfo-stack |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
207 (texinfo-format-filename "") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
208 texinfo-example-start |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
209 texinfo-last-node-pos |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
210 texinfo-last-node |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
211 texinfo-node-names |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
212 (texinfo-footnote-number 0) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
213 last-input-buffer |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
214 (fill-column-for-info fill-column) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
215 (input-buffer (current-buffer)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
216 (input-directory default-directory) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
217 (header-text "") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
218 (header-beginning 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
219 (header-end 1)) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
220 |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
221 ;;; Copy lines between beginning and end of header lines, |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
222 ;;; 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
|
223 (save-excursion |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
224 (save-restriction |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
225 (widen) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
226 (goto-char (point-min)) |
109036 | 227 (let ((search-end (line-beginning-position 101))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
228 (if (or |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
229 ;; Either copy header text. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
230 (and |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
231 (prog1 |
4982
36b78ccd6285
(texinfo-format-region): Change `texinfo-[start
Richard M. Stallman <rms@gnu.org>
parents:
4868
diff
changeset
|
232 (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
|
233 (forward-line 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
234 ;; Mark beginning of header. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
235 (setq header-beginning (point))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
236 (prog1 |
4982
36b78ccd6285
(texinfo-format-region): Change `texinfo-[start
Richard M. Stallman <rms@gnu.org>
parents:
4868
diff
changeset
|
237 (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
|
238 (beginning-of-line) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
239 ;; Mark end of header |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
240 (setq header-end (point)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
241 ;; Or copy @filename line. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
242 (prog2 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
243 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
244 (search-forward "@setfilename" search-end t) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
245 (beginning-of-line) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
246 (setq header-beginning (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
247 (forward-line 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
248 (setq header-end (point)))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
249 |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
250 ;; Copy header |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
251 (setq header-text |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
252 (buffer-substring-no-properties |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
253 (min header-beginning region-beginning) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
254 header-end)))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
255 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
256 ;;; Find a buffer to use. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
257 (switch-to-buffer (get-buffer-create texinfo-region-buffer-name)) |
67582
cc04cc5f78a8
(texinfo-format-region):
Robert J. Chassell <bob@rattlesnake.com>
parents:
64751
diff
changeset
|
258 (setq buffer-read-only t) |
cc04cc5f78a8
(texinfo-format-region):
Robert J. Chassell <bob@rattlesnake.com>
parents:
64751
diff
changeset
|
259 (let ((inhibit-read-only t)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
260 (erase-buffer) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
261 ;; Insert the header into the buffer. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
262 (insert header-text) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
263 ;; Insert the region into the buffer. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
264 (insert-buffer-substring |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
265 input-buffer |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
266 (max region-beginning header-end) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
267 region-end) |
52969
d60ea4b622fe
(texinfo-pre-format-hook): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
268 (run-hook-with-args 'texinfo-pre-format-hook input-buffer) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
269 ;; 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
|
270 (or (= (preceding-char) ?\n) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
271 (insert "\n")) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
272 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
273 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
274 (texinfo-mode) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
275 (message "Converting region to Info format...") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
276 (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
|
277 ;; 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
|
278 (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
|
279 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
280 ;; 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
|
281 ;; work on them without losing track of multiple |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
282 ;; @raise/@lowersections commands. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
283 (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
|
284 (setq texinfo-command-end (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
285 (let ((filename (concat input-directory |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
286 (texinfo-parse-line-arg)))) |
9178
0facf5c89fff
(texinfo-format-region, texinfo-format-buffer-1):
Richard M. Stallman <rms@gnu.org>
parents:
6309
diff
changeset
|
287 (re-search-backward "^@include") |
109036 | 288 (delete-region (point) (line-beginning-position 2)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
289 (message "Reading included file: %s" filename) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
290 (save-excursion |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
291 (save-restriction |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
292 (narrow-to-region |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
293 (point) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
294 (+ (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
|
295 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
296 ;; 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
|
297 ;; so @setfilename command not duplicated. |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
298 (if (re-search-forward "^@setfilename" (line-end-position 100) t) |
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
299 (delete-region (line-beginning-position 1) |
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
300 (line-beginning-position 2))))))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
301 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
302 ;; 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
|
303 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
304 (texinfo-raise-lower-sections) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
305 ;; 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
|
306 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
307 (texinfo-append-refill) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
308 ;; 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
|
309 ;; discard everything after that. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
310 (goto-char (point-max)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
311 (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
|
312 (delete-region (point) (point-max))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
313 ;; 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
|
314 (or (= (preceding-char) ?\n) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
315 (insert "\n")) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
316 ;; 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
|
317 (setq texinfo-enclosure-list nil) |
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
318 (setq texinfo-alias-list nil) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
319 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
320 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
321 (if (looking-at "\\\\input[ \t]+texinfo") |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
322 (delete-region (point) (line-beginning-position 2))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
323 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
324 ;; Insert Info region title text. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
325 (goto-char (point-min)) |
109036 | 326 (if (search-forward "@setfilename" (line-beginning-position 101) t) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
327 (progn |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
328 (setq texinfo-command-end (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
329 (beginning-of-line) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
330 (setq texinfo-command-start (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
331 (let ((arg (texinfo-parse-arg-discard))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
332 (insert " " |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
333 texinfo-region-buffer-name |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
334 " buffer for: `") |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
335 (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
|
336 (insert "', -*-Text-*-\n"))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
337 ;; Else no `@setfilename' line |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
338 (insert " " |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
339 texinfo-region-buffer-name |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
340 " buffer -*-Text-*-\n")) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
341 (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
|
342 "from a region in: " |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
343 (if (buffer-file-name input-buffer) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
344 (concat "`" |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
345 (file-name-sans-versions |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
346 (file-name-nondirectory |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
347 (buffer-file-name input-buffer))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
348 "'") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
349 (concat "buffer `" (buffer-name input-buffer) "'")) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
350 "\nusing `texinfmt.el' version " |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
351 texinfmt-version |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
352 ".\n\n") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
353 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
354 ;; Now convert for real. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
355 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
356 (texinfo-format-scan) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
357 (goto-char (point-min)) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
358 (Info-tagify input-buffer) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
359 (goto-char (point-min)) |
67582
cc04cc5f78a8
(texinfo-format-region):
Robert J. Chassell <bob@rattlesnake.com>
parents:
64751
diff
changeset
|
360 (message "Done.")))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
361 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
362 ;;;###autoload |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
363 (defun texi2info (&optional nosplit) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
364 "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
|
365 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
|
366 names specified in the @setfilename command. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
367 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
368 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
|
369 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
|
370 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
|
371 Texinfo source buffer is not changed. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
372 |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
373 Non-nil argument (prefix, if interactive) means don't split the file |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
374 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
|
375 (interactive "P") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
376 (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
|
377 (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
|
378 ;; (sit-for 2) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
379 (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
|
380 (switch-to-buffer temp-buffer) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
381 (texinfo-master-menu t) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
382 (message "Now creating Info file.") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
383 (sit-for 2) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
384 (texinfo-format-buffer nosplit) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
385 (save-buffer) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
386 (kill-buffer temp-buffer))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
387 |
189 | 388 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
389 ;;; 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
|
390 |
189 | 391 (defun texinfo-format-buffer-1 () |
392 (let (texinfo-format-filename | |
393 texinfo-example-start | |
394 texinfo-command-start | |
395 texinfo-command-end | |
396 texinfo-command-name | |
397 texinfo-last-node | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
398 texinfo-last-node-pos |
189 | 399 texinfo-vindex |
400 texinfo-findex | |
401 texinfo-cindex | |
402 texinfo-pindex | |
403 texinfo-tindex | |
404 texinfo-kindex | |
405 texinfo-stack | |
406 texinfo-node-names | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
407 (texinfo-footnote-number 0) |
189 | 408 last-input-buffer |
409 outfile | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
410 (fill-column-for-info fill-column) |
189 | 411 (input-buffer (current-buffer)) |
412 (input-directory default-directory)) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
413 (setq texinfo-enclosure-list nil) |
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
414 (setq texinfo-alias-list nil) |
189 | 415 (save-excursion |
416 (goto-char (point-min)) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
417 (or (search-forward "@setfilename" nil t) |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
418 (error "Texinfo file needs an `@setfilename FILENAME' line")) |
189 | 419 (setq texinfo-command-end (point)) |
420 (setq outfile (texinfo-parse-line-arg))) | |
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
421 |
189 | 422 (find-file outfile) |
423 (texinfo-mode) | |
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
424 (erase-buffer) |
59115
fb586fbcd93c
(texinfo-format-buffer-1): Call buffer-disable-undo.
Richard M. Stallman <rms@gnu.org>
parents:
55770
diff
changeset
|
425 (buffer-disable-undo) |
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
426 |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
427 (message "Formatting Info file: %s" outfile) |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
428 (setq texinfo-format-filename |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
429 (file-name-nondirectory (expand-file-name outfile))) |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
430 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
431 (setq fill-column fill-column-for-info) |
189 | 432 (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
|
433 |
189 | 434 (insert-buffer-substring input-buffer) |
52969
d60ea4b622fe
(texinfo-pre-format-hook): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
435 (run-hook-with-args 'texinfo-pre-format-hook input-buffer) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
436 (message "Converting %s to Info format..." (buffer-name input-buffer)) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
437 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
438 ;; 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
|
439 ;; work on them without losing track of multiple |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
440 ;; @raise/@lowersections commands. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
441 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
442 (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
|
443 (setq texinfo-command-end (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
444 (let ((filename (concat input-directory |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
445 (texinfo-parse-line-arg)))) |
9178
0facf5c89fff
(texinfo-format-region, texinfo-format-buffer-1):
Richard M. Stallman <rms@gnu.org>
parents:
6309
diff
changeset
|
446 (re-search-backward "^@include") |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
447 (delete-region (point) (line-beginning-position 2)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
448 (message "Reading included file: %s" filename) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
449 (save-excursion |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
450 (save-restriction |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
451 (narrow-to-region |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
452 (point) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
453 (+ (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
|
454 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
455 ;; 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
|
456 ;; so @setfilename command not duplicated. |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
457 (if (re-search-forward "^@setfilename" (line-end-position 100) t) |
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
458 (delete-region (line-beginning-position 1) |
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
459 (line-beginning-position 2))))))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
460 ;; 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
|
461 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
462 (texinfo-raise-lower-sections) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
463 ;; Append @refill to appropriate paragraphs |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
464 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
465 (texinfo-append-refill) |
189 | 466 (goto-char (point-min)) |
467 (search-forward "@setfilename") | |
468 (beginning-of-line) | |
469 (delete-region (point-min) (point)) | |
470 ;; Remove @bye at end of file, if it is there. | |
471 (goto-char (point-max)) | |
472 (if (search-backward "@bye" nil t) | |
473 (delete-region (point) (point-max))) | |
474 ;; Make sure buffer ends in a newline. | |
475 (or (= (preceding-char) ?\n) | |
476 (insert "\n")) | |
477 ;; Scan the whole buffer, converting to Info format. | |
478 (texinfo-format-scan) | |
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
479 (goto-char (point-min)) |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
480 ;; 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
|
481 (insert "Info file: " |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
482 texinfo-format-filename ", -*-Text-*-\n" |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
483 "produced by `texinfo-format-buffer'\n" |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
484 ;; 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
|
485 ;; "on " |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
486 ;; (insert (format-time-string "%e %b %Y")) " " |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
487 "from file" |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
488 (if (buffer-file-name input-buffer) |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
489 (concat " `" |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
490 (file-name-sans-versions |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
491 (file-name-nondirectory |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
492 (buffer-file-name input-buffer))) |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
493 "'") |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
494 (concat "buffer `" (buffer-name input-buffer) "'")) |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
495 "\nusing `texinfmt.el' version " |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
496 texinfmt-version |
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
497 ".\n\n") |
189 | 498 ;; Return data for indices. |
499 (list outfile | |
500 texinfo-vindex texinfo-findex texinfo-cindex | |
501 texinfo-pindex texinfo-tindex texinfo-kindex))) | |
502 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
503 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
504 ;;; Perform non-@-command file conversions: quotes and hyphens |
189 | 505 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
506 (defun texinfo-format-convert (min max) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
507 ;; 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
|
508 (goto-char min) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
509 (while (search-forward "``" max t) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
510 (replace-match "\"")) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
511 (goto-char min) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
512 (while (search-forward "''" max t) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
513 (replace-match "\"")) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
514 ;; 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
|
515 (goto-char min) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
516 (while (re-search-forward "\\( \\|\\w\\)\\(---\\)\\( \\|\\w\\)" max t) |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
517 (delete-region (1+ (match-beginning 2)) (+ 2 (match-beginning 2))))) |
189 | 518 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
519 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
520 ;;; Handle paragraph filling |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
521 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
522 ;; 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
|
523 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
524 (defvar texinfo-no-refill-regexp |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
525 (concat |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
526 "^@" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
527 "\\(" |
48519
ba7e7cf495b0
(texinfo-no-refill-regexp): add "itemize\\|" because of a problem with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48518
diff
changeset
|
528 ;; add "itemize\\|" (from experiment of 2001 Nov 28) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
529 ;; because of a problem with @end itemize@refill |
48519
ba7e7cf495b0
(texinfo-no-refill-regexp): add "itemize\\|" because of a problem with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48518
diff
changeset
|
530 ;; I don't know if this causes other problems. |
ba7e7cf495b0
(texinfo-no-refill-regexp): add "itemize\\|" because of a problem with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48518
diff
changeset
|
531 ;; I suspect itemized lists don't get filled properly and a |
ba7e7cf495b0
(texinfo-no-refill-regexp): add "itemize\\|" because of a problem with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48518
diff
changeset
|
532 ;; more precise fix is required. Bob |
60309
7621f2acbeb0
(texinfo-no-refill-regexp): commented out inclusion of "itemize\\|",
Robert J. Chassell <bob@rattlesnake.com>
parents:
59115
diff
changeset
|
533 ;; commented out on 2005 Feb 28 by Bob |
7621f2acbeb0
(texinfo-no-refill-regexp): commented out inclusion of "itemize\\|",
Robert J. Chassell <bob@rattlesnake.com>
parents:
59115
diff
changeset
|
534 ;; "itemize\\|" |
18884
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
535 "direntry\\|" |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
536 "lisp\\|" |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
537 "smalllisp\\|" |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
538 "example\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
539 "smallexample\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
540 "display\\|" |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
541 "smalldisplay\\|" |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
542 "format\\|" |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
543 "smallformat\\|" |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
544 "flushleft\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
545 "flushright\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
546 "menu\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
547 "multitable\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
548 "titlepage\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
549 "iftex\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
550 "ifhtml\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
551 "tex\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
552 "html" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
553 "\\)") |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
554 "Regexp specifying environments in which paragraphs are not filled.") |
189 | 555 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
556 (defvar texinfo-accent-commands |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
557 (concat |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
558 "@^\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
559 "@`\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
560 "@'\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
561 "@\"\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
562 "@,\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
563 "@=\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
564 "@~\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
565 "@OE{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
566 "@oe{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
567 "@AA{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
568 "@aa{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
569 "@AE{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
570 "@ae{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
571 "@ss{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
572 "@questiondown{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
573 "@exclamdown{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
574 "@L{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
575 "@l{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
576 "@O{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
577 "@o{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
578 "@dotaccent{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
579 "@ubaraccent{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
580 "@d{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
581 "@H{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
582 "@ringaccent{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
583 "@tieaccent{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
584 "@u{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
585 "@v{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
586 "@dotless{" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
587 )) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
588 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
589 (defvar texinfo-part-of-para-regexp |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
590 (concat |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
591 "^@" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
592 "\\(" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
593 "b{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
594 "bullet{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
595 "cite{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
596 "code{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
597 "email{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
598 "emph{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
599 "equiv{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
600 "error{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
601 "expansion{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
602 "file{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
603 "i{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
604 "inforef{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
605 "kbd{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
606 "key{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
607 "lisp{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
608 "minus{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
609 "point{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
610 "print{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
611 "pxref{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
612 "r{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
613 "ref{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
614 "result{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
615 "samp{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
616 "sc{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
617 "t{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
618 "TeX{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
619 "today{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
620 "url{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
621 "var{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
622 "w{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
623 "xref{\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
624 "@-\\|" ; @- 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
|
625 texinfo-accent-commands |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
626 "\\)" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
627 ) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
628 "Regexp specifying @-commands found within paragraphs.") |
189 | 629 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
630 (defun texinfo-append-refill () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
631 "Append @refill at end of each paragraph that should be filled. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
632 Do not append @refill to paragraphs within @example and similar environments. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
633 Do not append @refill to paragraphs containing @w{TEXT} or @*." |
189 | 634 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
635 ;; 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
|
636 ;; 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
|
637 ;; whether the text should or should not be filled. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
638 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
639 (while (< (point) (point-max)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
640 (let ((refill-blank-lines "^[ \t\n]*$") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
641 (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
|
642 (beginning-of-line) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
643 ;; 1. Skip over blank lines; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
644 ;; skip over lines beginning with @-commands, |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
645 ;; but do not skip over lines |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
646 ;; 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
|
647 ;; 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
|
648 (while (and (looking-at (concat "^@\\|^\\\\\\|" refill-blank-lines)) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
649 (not (looking-at |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
650 (concat |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
651 "\\(" |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
652 texinfo-no-refill-regexp |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
653 "\\|" |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
654 texinfo-part-of-para-regexp |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
655 "\\)"))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
656 (< (point) (point-max))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
657 (forward-line 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
658 ;; 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
|
659 (if (looking-at texinfo-no-refill-regexp) |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
660 (let ((environment (match-string-no-properties 1))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
661 (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
|
662 (forward-line 1))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
663 ;; Else |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
664 ;; 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
|
665 ;; with @<newline> followed by a newline. |
111464
9ab5ff757483
Use line-beginning-position in some texinfo.el files.
Glenn Morris <rgm@gnu.org>
parents:
109036
diff
changeset
|
666 (if (or (>= (point) (point-max)) |
9ab5ff757483
Use line-beginning-position in some texinfo.el files.
Glenn Morris <rgm@gnu.org>
parents:
109036
diff
changeset
|
667 (re-search-forward |
9ab5ff757483
Use line-beginning-position in some texinfo.el files.
Glenn Morris <rgm@gnu.org>
parents:
109036
diff
changeset
|
668 "@w{\\|@\\*\\|@\n\n" |
9ab5ff757483
Use line-beginning-position in some texinfo.el files.
Glenn Morris <rgm@gnu.org>
parents:
109036
diff
changeset
|
669 (save-excursion (forward-paragraph) |
9ab5ff757483
Use line-beginning-position in some texinfo.el files.
Glenn Morris <rgm@gnu.org>
parents:
109036
diff
changeset
|
670 (line-beginning-position 2)) |
9ab5ff757483
Use line-beginning-position in some texinfo.el files.
Glenn Morris <rgm@gnu.org>
parents:
109036
diff
changeset
|
671 t)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
672 ;; Go to end of paragraph and do nothing. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
673 (forward-paragraph) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
674 ;; 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
|
675 (forward-paragraph) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
676 (forward-line -1) |
23658 | 677 (let ((line-beg (point))) |
678 (end-of-line) | |
679 (delete-region | |
680 (point) | |
681 (save-excursion (skip-chars-backward " \t") (point))) | |
24453
3b8991c22dcd
(texinfo-append-refill): Check @c correctly.
Kenichi Handa <handa@m17n.org>
parents:
24314
diff
changeset
|
682 (forward-char 1) |
3b8991c22dcd
(texinfo-append-refill): Check @c correctly.
Kenichi Handa <handa@m17n.org>
parents:
24314
diff
changeset
|
683 (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
|
684 (forward-char -1)) |
60372
f46823f3408c
(texinfo-append-refill): Redefine the types of line to which @refill
Robert J. Chassell <bob@rattlesnake.com>
parents:
60327
diff
changeset
|
685 (unless (re-search-backward "@refill\\|^[ \t]*@" line-beg t) |
23658 | 686 (insert "@refill"))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
687 (forward-line 1)))))) |
189 | 688 |
689 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
690 ;;; Handle `@raisesections' and `@lowersections' commands |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
691 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
692 ;; These commands change the hierarchical level of chapter structuring |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
693 ;; commands. |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
694 ;; |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
695 ;; @raisesections changes @subsection to @section, |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
696 ;; @section to @chapter, |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
697 ;; etc. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
698 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
699 ;; @lowersections changes @chapter to @section |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
700 ;; @subsection to @subsubsection, |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
701 ;; etc. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
702 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
703 ;; 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
|
704 ;; 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
|
705 ;; command. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
706 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
707 ;; 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
|
708 ;; the heading level. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
709 ;; |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
710 ;; 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
|
711 ;; vice versa. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
712 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
713 ;; 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
|
714 ;; 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
|
715 ;; 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
|
716 ;; (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
|
717 ;; @section produce chapter headings). |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
718 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
719 (defun texinfo-raise-lower-sections () |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
720 "Raise or lower the hierarchical level of chapters, sections, etc. |
4396
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 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
|
723 commands in the Texinfo file. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
724 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
725 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
|
726 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
|
727 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
|
728 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
|
729 on. |
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 @raisesections changes @subsection to @section, |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
732 @section to @chapter, |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
733 @heading to @chapheading, |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
734 etc. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
735 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
736 @lowersections changes @chapter to @section, |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
737 @subsection to @subsubsection, |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
738 @heading to @subheading, |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
739 etc. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
740 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
741 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
|
742 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
|
743 `@lowersections' command. |
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 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
|
746 vice versa. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
747 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
748 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
|
749 level a step at a time. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
750 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
751 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
|
752 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
|
753 commands." |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
754 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
755 ;; `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
|
756 ;; 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
|
757 ;; (but not the top node). |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
758 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
759 (let (type (level 0)) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
760 (while |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
761 (re-search-forward |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
762 (concat |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
763 "\\(\\(^@\\(raise\\|lower\\)sections\\)\\|\\(" |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
764 texinfo-section-types-regexp |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
765 "\\)\\)") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
766 nil t) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
767 (beginning-of-line) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
768 (save-excursion (setq type (read (current-buffer)))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
769 (cond |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
770 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
771 ;; 1. Increment level |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
772 ((eq type '@raisesections) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
773 (setq level (1+ level)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
774 (delete-region |
109036 | 775 (point) (line-beginning-position 2))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
776 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
777 ;; 2. Decrement level |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
778 ((eq type '@lowersections) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
779 (setq level (1- level)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
780 (delete-region |
109036 | 781 (point) (line-beginning-position 2))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
782 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
783 ;; Now handle structuring commands |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
784 ((cond |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
785 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
786 ;; 3. Raise level when positive |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
787 ((> level 0) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
788 (let ((count level) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
789 (new-level type)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
790 (while (> count 0) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
791 (setq new-level |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
792 (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
|
793 (setq count (1- count))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
794 (kill-word 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
795 (insert (symbol-name new-level)))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
796 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
797 ;; 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
|
798 ((= level 0) (forward-line 1)) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
799 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
800 ;; 5. Lower level when positive |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
801 ((< level 0) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
802 (let ((count level) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
803 (new-level type)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
804 (while (< count 0) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
805 (setq new-level |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
806 (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
|
807 (setq count (1+ count))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
808 (kill-word 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
809 (insert (symbol-name new-level)))))))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
810 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
811 ;;; 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
|
812 ;;; uniformly. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
813 |
189 | 814 (defun texinfo-format-scan () |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
815 (texinfo-format-convert (point-min) (point-max)) |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
816 ;; Search for @copying, which has to be first since the |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
817 ;; @insertcopying command then inserts the text elsewhere. |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
818 (goto-char (point-min)) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
819 (when (search-forward "@copying" nil t) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
820 (texinfo-copying)) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
821 (while (search-forward "@insertcopying" nil t) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
822 (delete-region (match-beginning 0) (match-end 0)) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
823 |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
824 (texinfo-insertcopying)) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
825 ;; Scan for other @-commands. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
826 (goto-char (point-min)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
827 (while (search-forward "@" nil t) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
828 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
829 ;; These are the single-character accent commands: @^ @` @' @" @= @~ |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
830 ;; 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
|
831 ;; Other single-character commands: |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
832 ;; @* forces a line break, |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
833 ;; @- 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
|
834 ;; @<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
|
835 ;; unless followed by a newline. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
836 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
837 ;; Old version 2.34 expression: (looking-at "[@{}^'` *\"?!]") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
838 (if (looking-at "[@{}^'`\"=~ \t\n*?!-]") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
839 ;; @*, causes a line break. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
840 (cond |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
841 ;; @*, a line break |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
842 ((= (following-char) ?*) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
843 ;; remove command |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
844 (delete-region (1- (point)) (1+ (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
845 ;; 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
|
846 ;; else line is already broken. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
847 (if (not (= (following-char) ?\n)) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
848 (insert ?\n))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
849 ;; @-, deleted |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
850 ((= (following-char) ?-) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
851 (delete-region (1- (point)) (1+ (point)))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
852 ;; @<space>, @<tab>, @<newline>: produce a single space, |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
853 ;; unless followed by a newline. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
854 ((= (following-char) ? ) |
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)) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
859 (insert ? ))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
860 ((= (following-char) ?\t) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
861 (delete-region (1- (point)) (1+ (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
862 ;; 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
|
863 ;; else line is already broken. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
864 (if (not (= (following-char) ?\n)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
865 (insert ? ))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
866 ;; following char is a carriage return |
27254
650eddd41858
(texinfo-format-scan): Use ?\n instead
Gerd Moellmann <gerd@gnu.org>
parents:
25278
diff
changeset
|
867 ((= (following-char) ?\n) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
868 ;; remove command |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
869 (delete-region (1- (point)) (1+ (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
870 ;; 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
|
871 ;; else line is already broken. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
872 (if (not (= (following-char) ?\n)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
873 (insert ? ))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
874 ;; 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
|
875 (t |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
876 (delete-char -1) |
36300 | 877 ;; Be compatible with makeinfo: if @' and its ilk are |
36287
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
878 ;; followed by a @ without a brace, barf. |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
879 (if (looking-at "[\"'^`~=]") |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
880 (progn |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
881 (if (= (char-after (1+ (point))) ?@) |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
882 (error "Use braces to give a command as an argument to @%c" |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
883 (following-char))) |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
884 (forward-char 1) |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
885 ;; @' etc. can optionally accept their argument in |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
886 ;; braces (makeinfo supports that). |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
887 (when (looking-at "{") |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
888 (let ((start (point))) |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
889 (forward-list 1) |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
890 (delete-char -1) |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
891 (goto-char start) |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
892 (delete-char 1)))) |
6619db0066d9
(texinfo-format-scan): Signal an error if
Eli Zaretskii <eliz@gnu.org>
parents:
28740
diff
changeset
|
893 (forward-char 1)))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
894 ;; @ 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
|
895 (setq texinfo-command-start (1- (point))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
896 (if (= (char-syntax (following-char)) ?w) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
897 (forward-word 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
898 (forward-char 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
899 (setq texinfo-command-end (point)) |
23658 | 900 ;; Detect the case of two @-commands in a row; |
901 ;; process just the first one. | |
902 (goto-char (1+ texinfo-command-start)) | |
903 (skip-chars-forward "^@" texinfo-command-end) | |
904 (setq texinfo-command-end (point)) | |
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
905 ;; Handle let aliasing |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
906 (setq texinfo-command-name |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
907 (let (trial |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
908 (cmdname |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
909 (buffer-substring-no-properties |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
910 (1+ texinfo-command-start) texinfo-command-end))) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
911 (while (setq trial (assoc cmdname texinfo-alias-list)) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
912 (setq cmdname (cdr trial))) |
9759
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
913 (intern cmdname))) |
ebe611f49450
(texinfo-alias-list): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9754
diff
changeset
|
914 ;; 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
|
915 (let ((enclosure-type |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
916 (assoc |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
917 (symbol-name texinfo-command-name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
918 texinfo-enclosure-list))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
919 (if enclosure-type |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
920 (progn |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
921 (insert |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
922 (car (car (cdr enclosure-type))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
923 (texinfo-parse-arg-discard) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
924 (car (cdr (car (cdr enclosure-type))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
925 (goto-char texinfo-command-start)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
926 (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
|
927 (if cmd (funcall cmd) (texinfo-unsupported))))))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
928 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
929 (cond (texinfo-stack |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
930 (goto-char (nth 2 (car texinfo-stack))) |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
931 (error "Unterminated @%s" (car (car texinfo-stack))))) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
932 |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
933 ;; Remove excess whitespace |
51550
5ffaa82e4d48
(texinfo-format-scan): Silence `whitespace-cleanup'.
Juanma Barranquero <lekktu@gmail.com>
parents:
49700
diff
changeset
|
934 (let ((whitespace-silent t)) |
5ffaa82e4d48
(texinfo-format-scan): Silence `whitespace-cleanup'.
Juanma Barranquero <lekktu@gmail.com>
parents:
49700
diff
changeset
|
935 (whitespace-cleanup))) |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
936 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
937 (defvar texinfo-copying-text "" |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
938 "Text of the copyright notice and copying permissions.") |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
939 |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
940 (defun texinfo-copying () |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
941 "Copy the copyright notice and copying permissions from the Texinfo file, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
942 as indicated by the @copying ... @end copying command; |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
943 insert the text with the @insertcopying command." |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
944 (let ((beg (progn (beginning-of-line) (point))) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
945 (end (progn (re-search-forward "^@end copying[ \t]*\n") (point)))) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
946 (setq texinfo-copying-text |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
947 (buffer-substring-no-properties |
111464
9ab5ff757483
Use line-beginning-position in some texinfo.el files.
Glenn Morris <rgm@gnu.org>
parents:
109036
diff
changeset
|
948 (save-excursion (goto-char beg) (line-beginning-position 2)) |
9ab5ff757483
Use line-beginning-position in some texinfo.el files.
Glenn Morris <rgm@gnu.org>
parents:
109036
diff
changeset
|
949 (save-excursion (goto-char end) (line-beginning-position 0)))) |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
950 (delete-region beg end))) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
951 |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
952 (defun texinfo-insertcopying () |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
953 "Insert the copyright notice and copying permissions from the Texinfo file, |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
954 which are indicated by the @copying ... @end copying command." |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
955 (insert (concat "\n" texinfo-copying-text))) |
189 | 956 |
957 (put 'begin 'texinfo-format 'texinfo-format-begin) | |
958 (defun texinfo-format-begin () | |
959 (texinfo-format-begin-end 'texinfo-format)) | |
960 | |
961 (put 'end 'texinfo-format 'texinfo-format-end) | |
962 (defun texinfo-format-end () | |
963 (texinfo-format-begin-end 'texinfo-end)) | |
964 | |
965 (defun texinfo-format-begin-end (prop) | |
966 (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
|
967 (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
|
968 (if cmd (funcall cmd) |
6de32c7b6045
(texinfo-format-begin-end): Bind cmd locally.
Richard M. Stallman <rms@gnu.org>
parents:
4769
diff
changeset
|
969 (texinfo-unsupported)))) |
189 | 970 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
971 ;;; Parsing functions |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
972 |
189 | 973 (defun texinfo-parse-line-arg () |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
974 "Return argument of @-command as string. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
975 Argument is separated from command either by a space or by a brace. |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
976 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
|
977 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
|
978 Leave point after argument." |
189 | 979 (goto-char texinfo-command-end) |
980 (let ((start (point))) | |
981 (cond ((looking-at " ") | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
982 (skip-chars-forward " ") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
983 (setq start (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
984 (end-of-line) |
189 | 985 (skip-chars-backward " ") |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
986 (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
|
987 (setq texinfo-command-end (1+ (point)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
988 ((looking-at "{") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
989 (setq start (1+ (point))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
990 (forward-list 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
991 (setq texinfo-command-end (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
992 (forward-char -1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
993 (t |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
994 (error "Invalid texinfo command arg format"))) |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
995 (prog1 (buffer-substring-no-properties start (point)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
996 (if (eolp) (forward-char 1))))) |
189 | 997 |
998 (defun texinfo-parse-expanded-arg () | |
999 (goto-char texinfo-command-end) | |
1000 (let ((start (point)) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1001 marker) |
189 | 1002 (cond ((looking-at " ") |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1003 (skip-chars-forward " ") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1004 (setq start (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1005 (end-of-line) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1006 (setq texinfo-command-end (1+ (point)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1007 ((looking-at "{") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1008 (setq start (1+ (point))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1009 (forward-list 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1010 (setq texinfo-command-end (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1011 (forward-char -1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1012 (t |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1013 (error "Invalid texinfo command arg format"))) |
189 | 1014 (setq marker (move-marker (make-marker) texinfo-command-end)) |
1015 (texinfo-format-expand-region start (point)) | |
1016 (setq texinfo-command-end (marker-position marker)) | |
1017 (move-marker marker nil) | |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
1018 (prog1 (buffer-substring-no-properties start (point)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1019 (if (eolp) (forward-char 1))))) |
189 | 1020 |
1021 (defun texinfo-format-expand-region (start end) | |
1022 (save-restriction | |
1023 (narrow-to-region start end) | |
1024 (let (texinfo-command-start | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1025 texinfo-command-end |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1026 texinfo-command-name |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1027 texinfo-stack) |
189 | 1028 (texinfo-format-scan)) |
1029 (goto-char (point-max)))) | |
1030 | |
1031 (defun texinfo-parse-arg-discard () | |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1032 "Delete command and argument; return argument of command." |
189 | 1033 (prog1 (texinfo-parse-line-arg) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1034 (texinfo-discard-command))) |
189 | 1035 |
1036 (defun texinfo-discard-command () | |
1037 (delete-region texinfo-command-start texinfo-command-end)) | |
1038 | |
1039 (defun texinfo-optional-braces-discard () | |
1040 "Discard braces following command, if any." | |
1041 (goto-char texinfo-command-end) | |
1042 (let ((start (point))) | |
1043 (cond ((looking-at "[ \t]*\n")) ; do nothing | |
1044 ((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
|
1045 (forward-list 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1046 (setq texinfo-command-end (point))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1047 (t |
189 | 1048 (error |
1049 "Invalid `texinfo-optional-braces-discard' format \(need braces?\)"))) | |
1050 (delete-region texinfo-command-start texinfo-command-end))) | |
1051 | |
1052 (defun texinfo-format-parse-line-args () | |
1053 (let ((start (1- (point))) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1054 next beg end |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1055 args) |
189 | 1056 (skip-chars-forward " ") |
1057 (while (not (eolp)) | |
1058 (setq beg (point)) | |
1059 (re-search-forward "[\n,]") | |
1060 (setq next (point)) | |
1061 (if (bolp) (setq next (1- next))) | |
1062 (forward-char -1) | |
1063 (skip-chars-backward " ") | |
1064 (setq end (point)) | |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
1065 (push (if (> end beg) (buffer-substring-no-properties beg end)) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
1066 args) |
189 | 1067 (goto-char next) |
1068 (skip-chars-forward " ")) | |
1069 (if (eolp) (forward-char 1)) | |
1070 (setq texinfo-command-end (point)) | |
1071 (nreverse args))) | |
1072 | |
1073 (defun texinfo-format-parse-args () | |
1074 (let ((start (1- (point))) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1075 next beg end |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1076 args) |
189 | 1077 (search-forward "{") |
1078 (save-excursion | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1079 (texinfo-format-expand-region |
189 | 1080 (point) |
1081 (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
|
1082 ;; 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
|
1083 ;; `@xref{bullet, , @code{@@bullet}@{@}}.' because the |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1084 ;; re-search-forward finds the first right brace after the second |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1085 ;; comma. |
189 | 1086 (while (/= (preceding-char) ?\}) |
1087 (skip-chars-forward " \t\n") | |
1088 (setq beg (point)) | |
1089 (re-search-forward "[},]") | |
1090 (setq next (point)) | |
1091 (forward-char -1) | |
1092 (skip-chars-backward " \t\n") | |
1093 (setq end (point)) | |
1094 (cond ((< beg end) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1095 (goto-char beg) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1096 (while (search-forward "\n" end t) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1097 (replace-match " ")))) |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
1098 (push (if (> end beg) (buffer-substring-no-properties beg end)) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
1099 args) |
189 | 1100 (goto-char next)) |
37538
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
1101 ;;(if (eolp) (forward-char 1)) |
189 | 1102 (setq texinfo-command-end (point)) |
1103 (nreverse args))) | |
1104 | |
1105 (defun texinfo-format-parse-defun-args () | |
1106 (goto-char texinfo-command-end) | |
1107 (let ((start (point))) | |
1108 (end-of-line) | |
1109 (setq texinfo-command-end (1+ (point))) | |
1110 (let ((marker (move-marker (make-marker) texinfo-command-end))) | |
1111 (texinfo-format-expand-region start (point)) | |
1112 (setq texinfo-command-end (marker-position marker)) | |
1113 (move-marker marker nil)) | |
1114 (goto-char start) | |
1115 (let ((args '()) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1116 beg end) |
189 | 1117 (skip-chars-forward " ") |
1118 (while (not (eolp)) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1119 (cond ((looking-at "{") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1120 (setq beg (1+ (point))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1121 (forward-list 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1122 (setq end (1- (point)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1123 (t |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1124 (setq beg (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1125 (re-search-forward "[\n ]") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1126 (forward-char -1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1127 (setq end (point)))) |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
1128 (push (buffer-substring-no-properties beg end) args) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1129 (skip-chars-forward " ")) |
189 | 1130 (forward-char 1) |
1131 (nreverse args)))) | |
1132 | |
1133 (defun texinfo-discard-line () | |
1134 (goto-char texinfo-command-end) | |
1135 (skip-chars-forward " \t") | |
1136 (or (eolp) | |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
1137 (error "Extraneous text at end of command line")) |
189 | 1138 (goto-char texinfo-command-start) |
1139 (or (bolp) | |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
1140 (error "Extraneous text at beginning of command line")) |
189 | 1141 (delete-region (point) (progn (forward-line 1) (point)))) |
1142 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1143 (defun texinfo-discard-line-with-args () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1144 (goto-char texinfo-command-start) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1145 (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
|
1146 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1147 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1148 ;;; @setfilename |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1149 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1150 ;; 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
|
1151 ;; definition; `texinfo-format-region' handles @setfilename, if any, |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1152 ;; specially. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1153 (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
|
1154 (defun texinfo-format-setfilename () |
18818
3c0dec827888
(texinfo-format-buffer-1): Insert, here,
Richard M. Stallman <rms@gnu.org>
parents:
17939
diff
changeset
|
1155 (texinfo-parse-arg-discard)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1156 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1157 ;;; @node, @menu, @detailmenu |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1158 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1159 (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
|
1160 (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
|
1161 (defun texinfo-format-node () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1162 (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
|
1163 (name (nth 0 args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1164 (next (nth 1 args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1165 (prev (nth 2 args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1166 (up (nth 3 args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1167 (texinfo-discard-command) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1168 (setq texinfo-last-node name) |
24314
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
1169 (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
|
1170 (if (assoc tem texinfo-node-names) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1171 (error "Duplicate node name: %s" name) |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
1172 (push (list tem) texinfo-node-names))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1173 (setq texinfo-footnote-number 0) |
9896
a70b99926339
(texinfo-format-node): Insert the node delimiter
Richard M. Stallman <rms@gnu.org>
parents:
9759
diff
changeset
|
1174 ;; 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
|
1175 (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
|
1176 ", Node: " name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1177 (if next |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1178 (insert ", Next: " next)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1179 (if prev |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1180 (insert ", Prev: " prev)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1181 (if up |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1182 (insert ", Up: " up)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1183 (insert ?\n) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1184 (setq texinfo-last-node-pos (point)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1185 |
22661
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1186 (put 'anchor 'texinfo-format 'texinfo-anchor) |
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1187 (defun texinfo-anchor () |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1188 (let (anchor-string |
22661
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1189 (here (- (point) 7)) ; save location of beginning of `@anchor' |
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1190 (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
|
1191 (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
|
1192 (delete-char 1)) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1193 (forward-paragraph) |
22661
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1194 (let ((end (point))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1195 (if (save-excursion |
22661
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1196 (backward-word 1) |
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1197 (search-forward "@refill" end t)) |
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1198 (setq anchor-string "@anchor-yes-refill") |
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1199 (setq anchor-string "@anchor-no-refill"))) |
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1200 (goto-char here) |
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1201 (insert anchor-string "{" arg "}"))) |
90460d1e2c3f
(texinfo-anchor): New function.
Richard M. Stallman <rms@gnu.org>
parents:
19630
diff
changeset
|
1202 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1203 (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
|
1204 (defun texinfo-format-menu () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1205 (texinfo-discard-line) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1206 (insert "* Menu:\n\n")) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1207 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1208 (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
|
1209 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1210 ;; The @detailmenu should be removed eventually. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1211 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1212 ;; According to Karl Berry, 31 August 1996: |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1213 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1214 ;; 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
|
1215 ;; 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
|
1216 ;; 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
|
1217 ;; expend more effort... |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1218 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1219 ;; 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
|
1220 ;; blame on makeinfo where it belongs :-(). |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1221 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1222 (put 'detailmenu 'texinfo-format 'texinfo-discard-line) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1223 (put 'detailmenu 'texinfo-end 'texinfo-discard-command) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1224 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1225 ;; (Also see `texnfo-upd.el') |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1226 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1227 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1228 ;;; Cross references |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1229 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1230 ;; @xref {NODE, FNAME, NAME, FILE, DOCUMENT} |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1231 ;; -> *Note FNAME: (FILE)NODE |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1232 ;; If FILE is missing, |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1233 ;; *Note FNAME: NODE |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1234 ;; 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
|
1235 ;; *Note NAME: Node |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1236 ;; If both NAME and FNAME are missing |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1237 ;; *Note NODE:: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1238 ;; texinfo ignores the DOCUMENT argument. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1239 ;; -> 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
|
1240 ;; 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
|
1241 ;; If fifth argument DOCUMENT is specified, produces |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1242 ;; 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
|
1243 ;; of DOCUMENT |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1244 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1245 ;; @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
|
1246 ;; the hardcopy and is the same as @xref in Info |
189 | 1247 (put 'ref 'texinfo-format 'texinfo-format-xref) |
1248 | |
1249 (put 'xref 'texinfo-format 'texinfo-format-xref) | |
1250 (defun texinfo-format-xref () | |
1251 (let ((args (texinfo-format-parse-args))) | |
1252 (texinfo-discard-command) | |
1253 (insert "*Note ") | |
1254 (let ((fname (or (nth 1 args) (nth 2 args)))) | |
1255 (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
|
1256 (insert (car args) "::") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1257 (insert (or fname (car args)) ": ") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1258 (if (nth 3 args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1259 (insert "(" (nth 3 args) ")")) |
28740
14cc47ddd47a
(texinfo-format-xref): Don't try to insert nil.
Gerd Moellmann <gerd@gnu.org>
parents:
27254
diff
changeset
|
1260 (and (car args) (insert (car args))))))) |
189 | 1261 |
1262 (put 'pxref 'texinfo-format 'texinfo-format-pxref) | |
1263 (defun texinfo-format-pxref () | |
1264 (texinfo-format-xref) | |
1265 (or (save-excursion | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1266 (forward-char -2) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1267 (looking-at "::")) |
189 | 1268 (insert "."))) |
1269 | |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1270 ;; @inforef{NODE, FNAME, FILE} |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1271 ;; Like @xref{NODE, FNAME,,FILE} in texinfo. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1272 ;; In Tex, generates "See Info file FILE, node NODE" |
189 | 1273 (put 'inforef 'texinfo-format 'texinfo-format-inforef) |
1274 (defun texinfo-format-inforef () | |
1275 (let ((args (texinfo-format-parse-args))) | |
1276 (texinfo-discard-command) | |
1277 (if (nth 1 args) | |
1278 (insert "*Note " (nth 1 args) ": (" (nth 2 args) ")" (car args)) | |
1279 (insert "*Note " "(" (nth 2 args) ")" (car args) "::")))) | |
1280 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1281 |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1282 ;;; URL Reference: @uref |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1283 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1284 ;; @uref produces a reference to a uniform resource locator (URL). |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1285 ;; It takes one mandatory argument, the URL, and one optional argument, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1286 ;; the text to display (the default is the URL itself). |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1287 |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1288 (put 'uref 'texinfo-format 'texinfo-format-uref) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1289 (defun texinfo-format-uref () |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1290 "Format URL and optional URL-TITLE. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1291 Insert ` ... ' around URL if no URL-TITLE argument; |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1292 otherwise, insert URL-TITLE followed by URL in parentheses." |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1293 (let ((args (texinfo-format-parse-args))) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1294 (texinfo-discard-command) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1295 ;; if url-title |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1296 (if (nth 1 args) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1297 (insert (nth 1 args) " (" (nth 0 args) ")") |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1298 (insert "`" (nth 0 args) "'")) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1299 (goto-char texinfo-command-start))) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1300 |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
1301 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1302 ;;; Section headings |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1303 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1304 (put 'majorheading 'texinfo-format 'texinfo-format-chapter) |
189 | 1305 (put 'chapheading 'texinfo-format 'texinfo-format-chapter) |
1306 (put 'ichapter 'texinfo-format 'texinfo-format-chapter) | |
1307 (put 'chapter 'texinfo-format 'texinfo-format-chapter) | |
1308 (put 'iappendix 'texinfo-format 'texinfo-format-chapter) | |
1309 (put 'appendix 'texinfo-format 'texinfo-format-chapter) | |
1310 (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
|
1311 (put 'top 'texinfo-format 'texinfo-format-chapter) |
189 | 1312 (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
|
1313 (put 'centerchap 'texinfo-format 'texinfo-format-chapter) |
189 | 1314 (defun texinfo-format-chapter () |
1315 (texinfo-format-chapter-1 ?*)) | |
1316 | |
1317 (put 'heading 'texinfo-format 'texinfo-format-section) | |
1318 (put 'isection 'texinfo-format 'texinfo-format-section) | |
1319 (put 'section 'texinfo-format 'texinfo-format-section) | |
1320 (put 'iappendixsection 'texinfo-format 'texinfo-format-section) | |
1321 (put 'appendixsection 'texinfo-format 'texinfo-format-section) | |
1322 (put 'iappendixsec 'texinfo-format 'texinfo-format-section) | |
1323 (put 'appendixsec 'texinfo-format 'texinfo-format-section) | |
1324 (put 'iunnumberedsec 'texinfo-format 'texinfo-format-section) | |
1325 (put 'unnumberedsec 'texinfo-format 'texinfo-format-section) | |
1326 (defun texinfo-format-section () | |
1327 (texinfo-format-chapter-1 ?=)) | |
1328 | |
1329 (put 'subheading 'texinfo-format 'texinfo-format-subsection) | |
1330 (put 'isubsection 'texinfo-format 'texinfo-format-subsection) | |
1331 (put 'subsection 'texinfo-format 'texinfo-format-subsection) | |
1332 (put 'iappendixsubsec 'texinfo-format 'texinfo-format-subsection) | |
1333 (put 'appendixsubsec 'texinfo-format 'texinfo-format-subsection) | |
1334 (put 'iunnumberedsubsec 'texinfo-format 'texinfo-format-subsection) | |
1335 (put 'unnumberedsubsec 'texinfo-format 'texinfo-format-subsection) | |
1336 (defun texinfo-format-subsection () | |
1337 (texinfo-format-chapter-1 ?-)) | |
1338 | |
1339 (put 'subsubheading 'texinfo-format 'texinfo-format-subsubsection) | |
1340 (put 'isubsubsection 'texinfo-format 'texinfo-format-subsubsection) | |
1341 (put 'subsubsection 'texinfo-format 'texinfo-format-subsubsection) | |
1342 (put 'iappendixsubsubsec 'texinfo-format 'texinfo-format-subsubsection) | |
1343 (put 'appendixsubsubsec 'texinfo-format 'texinfo-format-subsubsection) | |
1344 (put 'iunnumberedsubsubsec 'texinfo-format 'texinfo-format-subsubsection) | |
1345 (put 'unnumberedsubsubsec 'texinfo-format 'texinfo-format-subsubsection) | |
1346 (defun texinfo-format-subsubsection () | |
1347 (texinfo-format-chapter-1 ?.)) | |
1348 | |
1349 (defun texinfo-format-chapter-1 (belowchar) | |
1350 (let ((arg (texinfo-parse-arg-discard))) | |
1351 (message "Formatting: %s ... " arg) ; So we can see where we are. | |
1352 (insert ?\n arg ?\n "@SectionPAD " belowchar ?\n) | |
1353 (forward-line -2))) | |
1354 | |
1355 (put 'SectionPAD 'texinfo-format 'texinfo-format-sectionpad) | |
1356 (defun texinfo-format-sectionpad () | |
1357 (let ((str (texinfo-parse-arg-discard))) | |
1358 (forward-char -1) | |
1359 (let ((column (current-column))) | |
1360 (forward-char 1) | |
1361 (while (> column 0) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1362 (insert str) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1363 (setq column (1- column)))) |
189 | 1364 (insert ?\n))) |
1365 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1366 |
9754
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1367 ;;; 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
|
1368 |
189 | 1369 (put '\. 'texinfo-format 'texinfo-format-\.) |
1370 (defun texinfo-format-\. () | |
1371 (texinfo-discard-command) | |
1372 (insert ".")) | |
1373 | |
1374 (put '\: 'texinfo-format 'texinfo-format-\:) | |
1375 (defun texinfo-format-\: () | |
1376 (texinfo-discard-command)) | |
1377 | |
9754
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1378 (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
|
1379 (defun texinfo-format-soft-hyphen () |
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1380 (texinfo-discard-command)) |
7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
Richard M. Stallman <rms@gnu.org>
parents:
9549
diff
changeset
|
1381 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1382 |
48794
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1383 ;;; @kbdinputstyle, @vskip, headings & footings |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1384 ;; These commands for not for Info and should never |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1385 ;; appear in an Info environment; but if they do, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1386 ;; this causes them to be discarded. |
48794
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1387 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1388 ;; @kbdinputstyle |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1389 (put 'kbdinputstyle 'texinfo-format 'texinfo-discard-line-with-args) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1390 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1391 ;; @vskip |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1392 (put 'vskip 'texinfo-format 'texinfo-discard-line-with-args) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1393 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1394 ;; headings & footings |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1395 (put 'evenfooting 'texinfo-format 'texinfo-discard-line-with-args) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1396 (put 'evenheading 'texinfo-format 'texinfo-discard-line-with-args) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1397 (put 'oddfooting 'texinfo-format 'texinfo-discard-line-with-args) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1398 (put 'oddheading 'texinfo-format 'texinfo-discard-line-with-args) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1399 (put 'everyfooting 'texinfo-format 'texinfo-discard-line-with-args) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1400 (put 'everyheading 'texinfo-format 'texinfo-discard-line-with-args) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1401 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1402 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1403 ;;; @documentdescription ... @end documentdescription |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1404 ;; This command is for HTML output and should never |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1405 ;; appear in an Info environment; but if it does, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1406 ;; this causes it to be discarded. |
48794
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1407 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1408 (put 'documentdescription 'texinfo-format 'texinfo-format-documentdescription) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1409 (defun texinfo-format-documentdescription () |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1410 (delete-region texinfo-command-start |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1411 (progn (re-search-forward "^@end documentdescription[ \t]*\n") |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1412 (point)))) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1413 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1414 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
1415 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1416 ;;; @center, @sp, and @br |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1417 |
189 | 1418 (put 'center 'texinfo-format 'texinfo-format-center) |
1419 (defun texinfo-format-center () | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1420 (let ((arg (texinfo-parse-expanded-arg))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1421 (texinfo-discard-command) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1422 (insert arg) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1423 (insert ?\n) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1424 (save-restriction |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1425 (goto-char (1- (point))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1426 (let ((indent-tabs-mode nil)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1427 (center-line))))) |
189 | 1428 |
1429 (put 'sp 'texinfo-format 'texinfo-format-sp) | |
1430 (defun texinfo-format-sp () | |
1431 (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
|
1432 (num (read arg))) |
189 | 1433 (insert-char ?\n num))) |
1434 | |
1435 (put 'br 'texinfo-format 'texinfo-format-paragraph-break) | |
1436 (defun texinfo-format-paragraph-break () | |
1437 "Force a paragraph break. | |
1438 If used within a line, follow `@br' with braces." | |
1439 (texinfo-optional-braces-discard) | |
1440 ;; insert one return if at end of line; | |
1441 ;; else insert two returns, to generate a blank line. | |
1442 (if (= (following-char) ?\n) | |
1443 (insert ?\n) | |
1444 (insert-char ?\n 2))) | |
1445 | |
1446 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1447 ;;; @footnote and @footnotestyle |
189 | 1448 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1449 ;; 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
|
1450 ;; 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
|
1451 ;; 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
|
1452 ;; template for a footnote is: |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1453 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1454 ;; @footnote{TEXT} |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1455 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1456 ;; Info has two footnote styles: |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1457 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1458 ;; * 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
|
1459 ;; 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
|
1460 ;; 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
|
1461 ;; the word `Footnotes' within it. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1462 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1463 ;; * 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
|
1464 ;; 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
|
1465 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1466 ;; 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
|
1467 ;; @footnotestyle separate |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1468 ;; or |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1469 ;; @footnotestyle end |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1470 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1471 ;; The default is separate |
189 | 1472 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1473 (defvar texinfo-footnote-style "separate" |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1474 "Footnote style, either separate or end.") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1475 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1476 (put 'footnotestyle 'texinfo-format 'texinfo-footnotestyle) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1477 (defun texinfo-footnotestyle () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1478 "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
|
1479 Argument is either end or separate." |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1480 (setq texinfo-footnote-style (texinfo-parse-arg-discard))) |
189 | 1481 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1482 (put 'footnote 'texinfo-format 'texinfo-format-footnote) |
189 | 1483 (defun texinfo-format-footnote () |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1484 "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
|
1485 The texinfo-footnote-style variable controls which style is used." |
189 | 1486 (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
|
1487 (cond ((string= texinfo-footnote-style "end") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1488 (texinfo-format-end-node)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1489 ((string= texinfo-footnote-style "separate") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1490 (texinfo-format-separate-node)))) |
189 | 1491 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1492 (defun texinfo-format-separate-node () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1493 "Format footnote in Separate node style, with notes in own node. |
189 | 1494 The node is constructed automatically." |
1495 (let* (start | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1496 (arg (texinfo-parse-line-arg)) |
189 | 1497 (node-name-beginning |
1498 (save-excursion | |
1499 (re-search-backward | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1500 "^File: \\w+\\(\\w\\|\\s_\\|\\.\\|,\\)*[ \t]+Node:") |
189 | 1501 (match-end 0))) |
1502 (node-name | |
1503 (save-excursion | |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
1504 (buffer-substring-no-properties |
189 | 1505 (progn (goto-char node-name-beginning) ; skip over node command |
1506 (skip-chars-forward " \t") ; and over spaces | |
1507 (point)) | |
109036 | 1508 (if (search-forward "," (line-end-position) t) ; bound search |
189 | 1509 (1- (point)) |
1510 (end-of-line) (point)))))) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1511 (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
|
1512 (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
|
1513 (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1514 (insert (format " (%d) (*Note %s-Footnotes::)" |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1515 texinfo-footnote-number node-name)) |
189 | 1516 (fill-paragraph nil) |
1517 (save-excursion | |
1518 (if (re-search-forward "^@node" nil 'move) | |
1519 (forward-line -1)) | |
1520 | |
1521 ;; two cases: for the first footnote, we must insert a node header; | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1522 ;; for the second and subsequent footnotes, we need only insert |
189 | 1523 ;; the text of the footnote. |
1524 | |
1525 (if (save-excursion | |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
1526 (search-backward |
189 | 1527 (concat node-name "-Footnotes, Up: ") |
1528 node-name-beginning | |
1529 t)) | |
1530 (progn ; already at least one footnote | |
1531 (setq start (point)) | |
1532 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg)) | |
1533 (fill-region start (point))) | |
1534 ;; else not yet a footnote | |
1535 (insert "\n\^_\nFile: " texinfo-format-filename | |
1536 " Node: " node-name "-Footnotes, Up: " node-name "\n") | |
1537 (setq start (point)) | |
1538 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg)) | |
71675
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
1539 (narrow-to-region (save-excursion (goto-char start) (point)) (point)) |
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
1540 (fill-region (point-min) (point-max)) |
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
1541 (widen))))) |
189 | 1542 |
1543 (defun texinfo-format-end-node () | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1544 "Format footnote in the End of node style, with notes at end of node." |
189 | 1545 (let (start |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1546 (arg (texinfo-parse-line-arg))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1547 (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
|
1548 (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
|
1549 (point)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1550 (insert (format " (%d) " texinfo-footnote-number)) |
189 | 1551 (fill-paragraph nil) |
1552 (save-excursion | |
1553 (if (search-forward "\n--------- Footnotes ---------\n" nil t) | |
1554 (progn ; already have footnote, put new one before end of node | |
1555 (if (re-search-forward "^@node" nil 'move) | |
1556 (forward-line -1)) | |
1557 (setq start (point)) | |
1558 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg)) | |
1559 (fill-region start (point))) | |
1560 ;; else no prior footnote | |
1561 (if (re-search-forward "^@node" nil 'move) | |
1562 (forward-line -1)) | |
1563 (insert "\n--------- Footnotes ---------\n") | |
1564 (setq start (point)) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1565 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg)))))) |
189 | 1566 |
1567 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1568 ;;; @itemize, @enumerate, and similar commands |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1569 |
189 | 1570 ;; @itemize pushes (itemize "COMMANDS" STARTPOS) on texinfo-stack. |
1571 ;; @enumerate pushes (enumerate 0 STARTPOS). | |
1572 ;; @item dispatches to the texinfo-item prop of the first elt of the list. | |
1573 ;; For itemize, this puts in and rescans the COMMANDS. | |
1574 ;; For enumerate, this increments the number and puts it in. | |
1575 ;; In either case, it puts a Backspace at the front of the line | |
1576 ;; which marks it not to be indented later. | |
1577 ;; All other lines get indented by 5 when the @end is reached. | |
1578 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1579 (defvar texinfo-stack-depth 0 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1580 "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
|
1581 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
|
1582 |
189 | 1583 (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
|
1584 (setq texinfo-stack-depth (1+ texinfo-stack-depth)) |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
1585 (push (list check arg texinfo-command-start) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
1586 texinfo-stack)) |
189 | 1587 |
1588 (defun texinfo-pop-stack (check) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1589 (setq texinfo-stack-depth (1- texinfo-stack-depth)) |
189 | 1590 (if (null texinfo-stack) |
1591 (error "Unmatched @end %s" check)) | |
1592 (if (not (eq (car (car texinfo-stack)) check)) | |
1593 (error "@end %s matches @%s" | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1594 check (car (car texinfo-stack)))) |
189 | 1595 (prog1 (cdr (car texinfo-stack)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1596 (setq texinfo-stack (cdr texinfo-stack)))) |
189 | 1597 |
1598 (put 'itemize 'texinfo-format 'texinfo-itemize) | |
1599 (defun texinfo-itemize () | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1600 (texinfo-push-stack |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1601 'itemize |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1602 (progn (skip-chars-forward " \t") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1603 (if (eolp) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1604 "@bullet" |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1605 (texinfo-parse-line-arg)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1606 (texinfo-discard-line-with-args) |
189 | 1607 (setq fill-column (- fill-column 5))) |
1608 | |
1609 (put 'itemize 'texinfo-end 'texinfo-end-itemize) | |
1610 (defun texinfo-end-itemize () | |
1611 (setq fill-column (+ fill-column 5)) | |
1612 (texinfo-discard-command) | |
1613 (let ((stacktop | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1614 (texinfo-pop-stack 'itemize))) |
189 | 1615 (texinfo-do-itemize (nth 1 stacktop)))) |
1616 | |
1617 (put 'enumerate 'texinfo-format 'texinfo-enumerate) | |
1618 (defun texinfo-enumerate () | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1619 (texinfo-push-stack |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1620 'enumerate |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1621 (progn (skip-chars-forward " \t") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1622 (if (eolp) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1623 1 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1624 (read (current-buffer))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1625 (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
|
1626 (> 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
|
1627 (error |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1628 "@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
|
1629 (texinfo-discard-line-with-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1630 (setq fill-column (- fill-column 5))) |
189 | 1631 |
1632 (put 'enumerate 'texinfo-end 'texinfo-end-enumerate) | |
1633 (defun texinfo-end-enumerate () | |
1634 (setq fill-column (+ fill-column 5)) | |
1635 (texinfo-discard-command) | |
1636 (let ((stacktop | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1637 (texinfo-pop-stack 'enumerate))) |
189 | 1638 (texinfo-do-itemize (nth 1 stacktop)))) |
1639 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1640 ;; @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
|
1641 (put 'alphaenumerate 'texinfo-format 'texinfo-alphaenumerate) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1642 (defun texinfo-alphaenumerate () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1643 (texinfo-push-stack 'alphaenumerate (1- ?a)) |
189 | 1644 (setq fill-column (- fill-column 5)) |
1645 (texinfo-discard-line)) | |
1646 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1647 (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
|
1648 (defun texinfo-end-alphaenumerate () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1649 (setq fill-column (+ fill-column 5)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1650 (texinfo-discard-command) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1651 (let ((stacktop |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1652 (texinfo-pop-stack 'alphaenumerate))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1653 (texinfo-do-itemize (nth 1 stacktop)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1654 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1655 ;; @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
|
1656 (put 'capsenumerate 'texinfo-format 'texinfo-capsenumerate) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1657 (defun texinfo-capsenumerate () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1658 (texinfo-push-stack 'capsenumerate (1- ?A)) |
189 | 1659 (setq fill-column (- fill-column 5)) |
1660 (texinfo-discard-line)) | |
1661 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1662 (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
|
1663 (defun texinfo-end-capsenumerate () |
189 | 1664 (setq fill-column (+ fill-column 5)) |
1665 (texinfo-discard-command) | |
1666 (let ((stacktop | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1667 (texinfo-pop-stack 'capsenumerate))) |
189 | 1668 (texinfo-do-itemize (nth 1 stacktop)))) |
1669 | |
1670 ;; At the @end, indent all the lines within the construct | |
1671 ;; except those marked with backspace. FROM says where | |
1672 ;; construct started. | |
1673 (defun texinfo-do-itemize (from) | |
1674 (save-excursion | |
1675 (while (progn (forward-line -1) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1676 (>= (point) from)) |
189 | 1677 (if (= (following-char) ?\b) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1678 (save-excursion |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1679 (delete-char 1) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1680 (end-of-line) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1681 (delete-char 6)) |
189 | 1682 (if (not (looking-at "[ \t]*$")) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1683 (save-excursion (insert " "))))))) |
189 | 1684 |
1685 (put 'item 'texinfo-format 'texinfo-item) | |
1686 (put 'itemx 'texinfo-format 'texinfo-item) | |
1687 (defun texinfo-item () | |
1688 (funcall (get (car (car texinfo-stack)) 'texinfo-item))) | |
1689 | |
1690 (put 'itemize 'texinfo-item 'texinfo-itemize-item) | |
1691 (defun texinfo-itemize-item () | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1692 ;; (texinfo-discard-line) ; Did not handle text on same line as @item. |
109036 | 1693 (delete-region (1+ (point)) (line-beginning-position)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1694 (if (looking-at "[ \t]*[^ \t\n]+") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1695 ;; 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
|
1696 (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
|
1697 ;; Else text on next line. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1698 (insert "\b " (nth 1 (car texinfo-stack)) " ")) |
189 | 1699 (forward-line -1)) |
1700 | |
1701 (put 'enumerate 'texinfo-item 'texinfo-enumerate-item) | |
1702 (defun texinfo-enumerate-item () | |
1703 (texinfo-discard-line) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1704 (let (enumerating-symbol) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1705 (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
|
1706 (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
|
1707 (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
|
1708 (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
|
1709 ((symbolp (car (cdr (car texinfo-stack)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1710 (setq enumerating-symbol |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1711 (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
|
1712 (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
|
1713 (equal ?\{ (string-to-char enumerating-symbol))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1714 (error |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1715 "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
|
1716 (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
|
1717 (setcar (cdr (car texinfo-stack)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1718 (make-symbol |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1719 (char-to-string |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1720 (1+ |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1721 (string-to-char enumerating-symbol)))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1722 (t |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1723 (error |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1724 "@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
|
1725 (forward-line -1))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1726 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1727 (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
|
1728 (defun texinfo-alphaenumerate-item () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1729 (texinfo-discard-line) |
189 | 1730 (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
|
1731 (if (> next ?z) |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
1732 (error "More than 26 items in @alphaenumerate; get a bigger alphabet")) |
189 | 1733 (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
|
1734 (insert "\b " next ". \n")) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1735 (forward-line -1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1736 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1737 (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
|
1738 (defun texinfo-capsenumerate-item () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1739 (texinfo-discard-line) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1740 (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
|
1741 (if (> next ?Z) |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
1742 (error "More than 26 items in @capsenumerate; get a bigger alphabet")) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1743 (setcar (cdr (car texinfo-stack)) next) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1744 (insert "\b " next ". \n")) |
189 | 1745 (forward-line -1)) |
1746 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1747 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1748 ;;; @table |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1749 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1750 ;; 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
|
1751 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1752 (put 'table 'texinfo-format 'texinfo-table) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1753 (defun texinfo-table () |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1754 (texinfo-push-stack |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1755 'table |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1756 (progn (skip-chars-forward " \t") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1757 (if (eolp) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1758 "@asis" |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1759 (texinfo-parse-line-arg)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1760 (texinfo-discard-line-with-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1761 (setq fill-column (- fill-column 5))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1762 |
189 | 1763 (put 'table 'texinfo-item 'texinfo-table-item) |
1764 (defun texinfo-table-item () | |
1765 (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
|
1766 (itemfont (car (cdr (car texinfo-stack))))) |
189 | 1767 (insert ?\b itemfont ?\{ arg "}\n \n")) |
1768 (forward-line -2)) | |
1769 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1770 (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
|
1771 (defun texinfo-end-table () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1772 (setq fill-column (+ fill-column 5)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1773 (texinfo-discard-command) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1774 (let ((stacktop |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1775 (texinfo-pop-stack 'table))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1776 (texinfo-do-itemize (nth 1 stacktop)))) |
189 | 1777 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1778 ;; @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
|
1779 ;; 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
|
1780 ;; 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
|
1781 (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
|
1782 (put 'description 'texinfo-format 'texinfo-description) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1783 (defun texinfo-description () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1784 (texinfo-push-stack 'table "@asis") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1785 (setq fill-column (- fill-column 5)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1786 (texinfo-discard-line)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1787 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1788 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1789 ;;; @ftable, @vtable |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1790 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1791 ;; 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
|
1792 ;; 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
|
1793 ;; 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
|
1794 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1795 ;; Handle the @ftable and @vtable commands: |
189 | 1796 |
1797 (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
|
1798 (put 'vtable 'texinfo-format 'texinfo-vtable) |
189 | 1799 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1800 (defun texinfo-ftable () (texinfo-indextable 'ftable)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1801 (defun texinfo-vtable () (texinfo-indextable 'vtable)) |
189 | 1802 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1803 (defun texinfo-indextable (table-type) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1804 (texinfo-push-stack table-type (texinfo-parse-arg-discard)) |
189 | 1805 (setq fill-column (- fill-column 5))) |
1806 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1807 ;; 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
|
1808 |
189 | 1809 (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
|
1810 (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
|
1811 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1812 (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
|
1813 (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
|
1814 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1815 (defun texinfo-indextable-item (index-type) |
189 | 1816 (let ((item (texinfo-parse-arg-discard)) |
1817 (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
|
1818 (indexvar index-type)) |
189 | 1819 (insert ?\b itemfont ?\{ item "}\n \n") |
1820 (set indexvar | |
1821 (cons | |
1822 (list item texinfo-last-node) | |
1823 (symbol-value indexvar))) | |
1824 (forward-line -2))) | |
1825 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1826 ;; Handle @end ftable, @end vtable |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1827 |
189 | 1828 (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
|
1829 (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
|
1830 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1831 (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
|
1832 (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
|
1833 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1834 (defun texinfo-end-indextable (table-type) |
189 | 1835 (setq fill-column (+ fill-column 5)) |
1836 (texinfo-discard-command) | |
1837 (let ((stacktop | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1838 (texinfo-pop-stack table-type))) |
189 | 1839 (texinfo-do-itemize (nth 1 stacktop)))) |
1840 | |
1841 | |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1842 ;;; @multitable ... @end multitable |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1843 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1844 ;; 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
|
1845 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1846 ;; A multi-column table has this template: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1847 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1848 ;; @multitable {A1} {A2} {A3} |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1849 ;; @item A1 @tab A2 @tab A3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1850 ;; @item B1 @tab B2 @tab B3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1851 ;; @item C1 @tab C2 @tab C3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1852 ;; @end multitable |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1853 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1854 ;; 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
|
1855 ;; respective column. |
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 ;; Or else: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1858 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1859 ;; @multitable @columnfractions .25 .3 .45 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1860 ;; @item A1 @tab A2 @tab A3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1861 ;; @item B1 @tab B2 @tab B3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1862 ;; @end multitable |
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 ;; 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
|
1865 ;; 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
|
1866 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1867 ;; 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
|
1868 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1869 ;; Using the Emacs Lisp formatter, texinfmt.el, |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1870 ;; 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
|
1871 ;; `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
|
1872 ;; 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
|
1873 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1874 ;; 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
|
1875 ;; commands that are defined in texinfo.tex for printed output. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1876 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1877 ;; @multitableparskip, |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1878 ;; @multitableparindent, |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1879 ;; @multitablecolmargin, |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1880 ;; @multitablelinespace. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1881 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1882 ;; How @multitable works. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1883 ;; ===================== |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1884 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1885 ;; `texinfo-multitable' reads the @multitable line and determines from it |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1886 ;; how wide each column should be. |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1887 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1888 ;; 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
|
1889 ;; 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
|
1890 ;; 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
|
1891 ;; 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
|
1892 ;; the start of the table onto the stack. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1893 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1894 ;; `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
|
1895 ;; 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
|
1896 ;; pops the stack. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1897 ;; |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1898 ;; `texinfo-multitable-widths' is called by `texinfo-multitable'. |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1899 ;; 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
|
1900 ;; 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
|
1901 ;; 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
|
1902 ;; 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
|
1903 ;; environment). |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1904 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1905 ;; `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
|
1906 ;; 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
|
1907 ;; 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
|
1908 ;; 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
|
1909 ;; 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
|
1910 ;; with blanks. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1911 ;; |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1912 ;; `texinfo-multitable-extract-row' is called by `texinfo-multitable-item'. |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1913 ;; 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
|
1914 ;; 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
|
1915 ;; 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
|
1916 ;; Cells within a row are separated by @tab. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1917 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1918 ;; 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
|
1919 ;; Texinfo commands. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1920 |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1921 (defvar texinfo-extra-inter-column-width 0 |
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1922 "*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
|
1923 |
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1924 (defvar texinfo-multitable-buffer-name "*multitable-temporary-buffer*") |
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1925 (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
|
1926 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1927 ;; 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
|
1928 (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
|
1929 (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
|
1930 (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
|
1931 (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
|
1932 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1933 (put 'multitable 'texinfo-format 'texinfo-multitable) |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
1934 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1935 (defun texinfo-multitable () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1936 "Produce multi-column tables. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1937 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1938 A multi-column table has this template: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1939 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1940 @multitable {A1} {A2} {A3} |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1941 @item A1 @tab A2 @tab A3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1942 @item B1 @tab B2 @tab B3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1943 @item C1 @tab C2 @tab C3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1944 @end multitable |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1945 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1946 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
|
1947 respective column. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1948 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1949 Or else: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1950 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1951 @multitable @columnfractions .25 .3 .45 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1952 @item A1 @tab A2 @tab A3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1953 @item B1 @tab B2 @tab B3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1954 @end multitable |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1955 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1956 where the fractions specify the width of each column as a percent |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
1957 of the current width of the text (i.e., of the `fill-column'). |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1958 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1959 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
|
1960 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
1961 Using the Emacs Lisp formatter, texinfmt.el, |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1962 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
|
1963 `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
|
1964 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
|
1965 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1966 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
|
1967 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
|
1968 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1969 @multitableparskip, |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1970 @multitableparindent, |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1971 @multitablecolmargin, |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1972 @multitablelinespace." |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1973 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1974 ;; 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
|
1975 ;; A stack element consists of: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1976 ;; - type-of-command, i.e., multitable |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1977 ;; - the information about column widths, and |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1978 ;; - the position of texinfo-command-start. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1979 ;; 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
|
1980 ;; The command line is then deleted. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1981 (texinfo-push-stack |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1982 'multitable |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1983 ;; push width information on stack |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1984 (texinfo-multitable-widths)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1985 (texinfo-discard-line-with-args)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1986 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1987 (put 'multitable 'texinfo-end 'texinfo-end-multitable) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1988 (defun texinfo-end-multitable () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1989 "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
|
1990 (texinfo-discard-command) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1991 (texinfo-pop-stack 'multitable)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1992 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1993 (defun texinfo-multitable-widths () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1994 "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
|
1995 (let (texinfo-multitable-width-list) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1996 ;; Fractions format: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1997 ;; @multitable @columnfractions .25 .3 .45 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1998 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
1999 ;; Template format: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2000 ;; @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
|
2001 ;; Place point before first argument |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2002 (skip-chars-forward " \t") |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2003 (cond |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2004 ;; Check for common misspelling |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2005 ((looking-at "@columnfraction ") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2006 (error "In @multitable, @columnfractions misspelled")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2007 ;; Case 1: @columnfractions .25 .3 .45 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2008 ((looking-at "@columnfractions") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2009 (forward-word 1) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2010 (while (not (eolp)) |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2011 (push (truncate |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2012 (1- |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2013 (* fill-column (read (get-buffer (current-buffer)))))) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2014 texinfo-multitable-width-list))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2015 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2016 ;; 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
|
2017 ((looking-at "{") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2018 (let ((start-of-templates (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2019 (while (not (eolp)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2020 (skip-chars-forward " \t") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2021 (let* ((start-of-template (1+ (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2022 (end-of-template |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2023 ;; 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
|
2024 (progn (forward-sexp 1) (1- (point))))) |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2025 (push (- end-of-template start-of-template) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2026 texinfo-multitable-width-list) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2027 ;; 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
|
2028 ;; 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
|
2029 ;; 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
|
2030 (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
|
2031 (goto-char (point-min)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2032 (while (search-forward " |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2033 " nil t) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2034 (delete-char -1)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2035 (goto-char (point-max)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2036 (widen) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2037 (forward-char 1))))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2038 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2039 ;; Case 3: Trouble |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2040 (t |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2041 (error |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2042 "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
|
2043 ;; Check whether columns fit on page. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2044 (let ((desired-columns |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2045 (+ |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2046 ;; between column spaces |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2047 (length texinfo-multitable-width-list) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2048 ;; additional between column spaces, if any |
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 ;; sum of spaces for each entry |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2051 (apply '+ texinfo-multitable-width-list)))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2052 (if (> desired-columns fill-column) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2053 (error |
87137
1d87492bc6e0
Resolve cvs commit conflict. (Fix buggy calls to error.)
Deepak Goel <deego@gnufans.org>
parents:
86206
diff
changeset
|
2054 "Multi-column table width, %d chars, is greater than page width, %d chars." |
1d87492bc6e0
Resolve cvs commit conflict. (Fix buggy calls to error.)
Deepak Goel <deego@gnufans.org>
parents:
86206
diff
changeset
|
2055 desired-columns fill-column))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2056 texinfo-multitable-width-list)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2057 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2058 ;; @item A1 @tab A2 @tab A3 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2059 (defun texinfo-multitable-extract-row () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2060 "Return multitable row, as a string. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2061 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
|
2062 Cells within rows are separated by @tab." |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2063 (skip-chars-forward " \t") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2064 (let* ((start (point)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2065 (end (progn |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2066 (re-search-forward "@item\\|@end") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2067 (match-beginning 0))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2068 (row (progn (goto-char end) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2069 (skip-chars-backward " ") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2070 ;; remove whitespace at end of argument |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2071 (delete-region (point) end) |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
2072 (buffer-substring-no-properties start (point))))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2073 (delete-region texinfo-command-start end) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2074 row)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2075 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2076 (put 'multitable 'texinfo-item 'texinfo-multitable-item) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2077 (defun texinfo-multitable-item () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2078 "Format a row within a multicolumn table. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2079 Cells in row are separated by @tab. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2080 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
|
2081 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
|
2082 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
|
2083 (let ((original-buffer (current-buffer)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2084 (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
|
2085 (existing-fill-column fill-column) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2086 start |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2087 end |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2088 (table-column 0) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2089 (table-entry-height 0) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2090 ;; 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
|
2091 ;; 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
|
2092 (unformated-row (texinfo-multitable-extract-row))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2093 ;; Use a temporary buffer |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2094 (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
|
2095 (delete-region (point-min) (point-max)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2096 (insert unformated-row) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2097 (goto-char (point-min)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2098 ;; 1. Check for correct number of @tab in line. |
71675
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
2099 (let ((tab-number 1)) ; one @tab between two columns |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2100 (while (search-forward "@tab" nil t) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2101 (setq tab-number (1+ tab-number))) |
71675
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
2102 (let ((needed-tabs (- (length table-widths) tab-number))) |
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
2103 (when (> needed-tabs 0) |
73729
581994501499
(batch-texinfo-format): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
71781
diff
changeset
|
2104 (goto-char (point-min)) |
71675
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
2105 (end-of-line) |
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
2106 (while (> needed-tabs 0) |
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
2107 (insert "@w{ }\n@tab") |
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
2108 (setq needed-tabs (1- needed-tabs)) |
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
2109 (message |
e5f36608288b
* textmodes/texinfmt.el (texinfo-format-separate-node):
Robert J. Chassell <bob@rattlesnake.com>
parents:
68648
diff
changeset
|
2110 "Added @tabs and empty spaces to a @multitable row"))))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2111 (goto-char (point-min)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2112 ;; 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
|
2113 ;; 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
|
2114 ;; Cell #1: format up to @tab |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2115 ;; Cell #2: format up to @tab |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2116 ;; Cell #3: format up to eob |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2117 (while (not (eobp)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2118 (setq start (point)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2119 (setq end (save-excursion |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2120 (if (search-forward "@tab" nil 'move) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2121 ;; Delete the @tab command, including the @-sign |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2122 (delete-region |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2123 (point) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2124 (progn (forward-word -1) (1- (point))))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2125 (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2126 ;; 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
|
2127 (setq fill-column (+ 1 |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2128 texinfo-extra-inter-column-width |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2129 (nth table-column table-widths))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2130 (narrow-to-region start end) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2131 ;; Remove whitespace before and after entry. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2132 (skip-chars-forward " ") |
109036 | 2133 (delete-region (point) (line-beginning-position)) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2134 (goto-char (point-max)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2135 (skip-chars-backward " ") |
109036 | 2136 (delete-region (point) (line-end-position)) |
48568 | 2137 ;; Temporarily set texinfo-stack to nil so texinfo-format-scan |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2138 ;; does not see an unterminated @multitable. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2139 (let (texinfo-stack) ; nil |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2140 (texinfo-format-scan)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2141 (let (fill-prefix) ; no fill prefix |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2142 (fill-region (point-min) (point-max))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2143 (setq table-entry-height |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2144 (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
|
2145 ;; 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
|
2146 (goto-char (point-min)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2147 (forward-line (1- table-entry-height)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2148 (let* ((beg (point)) ; beginning of line |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2149 ;; 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
|
2150 (needed-whitespace |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2151 (1+ |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2152 (- fill-column |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2153 (- |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2154 (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
|
2155 beg))))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2156 (insert (make-string |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2157 (if (> needed-whitespace 0) needed-whitespace 1) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2158 ? ))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2159 ;; now, put formatted cell into a rectangle |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2160 (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
|
2161 (int-to-string table-column))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2162 (extract-rectangle (point-min) (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2163 (delete-region (point-min) (point)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2164 (goto-char (point-max)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2165 (setq table-column (1+ table-column)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2166 (widen)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2167 ;; 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
|
2168 (let ((total-number-of-columns table-column) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2169 (column-number 0) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2170 here) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2171 (while (> table-column 0) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2172 (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
|
2173 (while (< (length this-rectangle) table-entry-height) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2174 (setq this-rectangle (append this-rectangle '(""))))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2175 (setq table-column (1- table-column))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2176 ;; 5. Insert formatted rectangles in original buffer |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2177 (switch-to-buffer original-buffer) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2178 (open-line table-entry-height) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2179 (while (< column-number total-number-of-columns) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2180 (setq here (point)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2181 (insert-rectangle |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2182 (eval (intern |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2183 (concat texinfo-multitable-rectangle-name |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2184 (int-to-string column-number))))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2185 (goto-char here) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2186 (end-of-line) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2187 (setq column-number (1+ column-number)))) |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2188 (kill-buffer texinfo-multitable-buffer-name) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2189 (setq fill-column existing-fill-column))) |
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 |
48794
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2192 ;;; @image |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2193 ;; Use only the FILENAME argument to the command. |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2194 ;; In Info, ignore the other arguments. |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2195 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2196 (put 'image 'texinfo-format 'texinfo-format-image) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2197 (defun texinfo-format-image () |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2198 "Insert an image from an an file ending in .txt. |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2199 Use only the FILENAME arg; for Info, ignore the other arguments to @image." |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2200 (let ((args (texinfo-format-parse-args)) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2201 filename) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2202 (when (null (nth 0 args)) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2203 (error "Invalid image command")) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2204 (texinfo-discard-command) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2205 ;; makeinfo uses FILENAME.txt |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2206 (setq filename (format "%s.txt" (nth 0 args))) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2207 (message "Reading included file: %s" filename) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2208 ;; verbatim for Info output |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2209 (goto-char (+ (point) (cadr (insert-file-contents filename)))) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2210 (message "Reading included file: %s...done" filename))) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2211 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2212 |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2213 ;;; @ifinfo, @iftex, @tex, @ifhtml, @html, @ifplaintext, @ifxml, @xml |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2214 ;; @ifnottex, @ifnotinfo, @ifnothtml, @ifnotplaintext, @ifnotxml |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2215 |
189 | 2216 (put 'ifinfo 'texinfo-format 'texinfo-discard-line) |
2217 (put 'ifinfo 'texinfo-end 'texinfo-discard-command) | |
2218 | |
2219 (put 'iftex 'texinfo-format 'texinfo-format-iftex) | |
2220 (defun texinfo-format-iftex () | |
2221 (delete-region texinfo-command-start | |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
2222 (re-search-forward "@end iftex[ \t]*\n"))) |
189 | 2223 |
9549
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2224 (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
|
2225 (defun texinfo-format-ifhtml () |
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2226 (delete-region texinfo-command-start |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
2227 (re-search-forward "@end ifhtml[ \t]*\n"))) |
9549
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2228 |
48063
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
2229 (put 'ifplaintext 'texinfo-format 'texinfo-format-ifplaintext) |
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
2230 (defun texinfo-format-ifplaintext () |
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
2231 (delete-region texinfo-command-start |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
2232 (re-search-forward "@end ifplaintext[ \t]*\n"))) |
48063
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
2233 |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2234 (put 'ifxml 'texinfo-format 'texinfo-format-ifxml) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2235 (defun texinfo-format-ifxml () |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2236 (delete-region texinfo-command-start |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2237 (progn (re-search-forward "^@end ifxml[ \t]*\n") |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2238 (point)))) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2239 |
189 | 2240 (put 'tex 'texinfo-format 'texinfo-format-tex) |
2241 (defun texinfo-format-tex () | |
2242 (delete-region texinfo-command-start | |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
2243 (re-search-forward "@end tex[ \t]*\n"))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2244 |
9549
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2245 (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
|
2246 (defun texinfo-format-html () |
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2247 (delete-region texinfo-command-start |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
2248 (re-search-forward "@end html[ \t]*\n"))) |
9549
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2249 |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2250 (put 'xml 'texinfo-format 'texinfo-format-xml) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2251 (defun texinfo-format-xml () |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2252 (delete-region texinfo-command-start |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2253 (progn (re-search-forward "^@end xml[ \t]*\n") |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2254 (point)))) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2255 |
40374
fb22b0e18665
No change. Error by bob, not eliz, logging change for wrong file.
Eli Zaretskii <eliz@gnu.org>
parents:
38436
diff
changeset
|
2256 (put 'ifnotinfo 'texinfo-format 'texinfo-format-ifnotinfo) |
fb22b0e18665
No change. Error by bob, not eliz, logging change for wrong file.
Eli Zaretskii <eliz@gnu.org>
parents:
38436
diff
changeset
|
2257 (defun texinfo-format-ifnotinfo () |
fb22b0e18665
No change. Error by bob, not eliz, logging change for wrong file.
Eli Zaretskii <eliz@gnu.org>
parents:
38436
diff
changeset
|
2258 (delete-region texinfo-command-start |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
2259 (re-search-forward "@end ifnotinfo[ \t]*\n"))) |
40374
fb22b0e18665
No change. Error by bob, not eliz, logging change for wrong file.
Eli Zaretskii <eliz@gnu.org>
parents:
38436
diff
changeset
|
2260 |
48063
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
2261 (put 'ifnotplaintext 'texinfo-format 'texinfo-discard-line) |
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
2262 (put 'ifnotplaintext 'texinfo-end 'texinfo-discard-command) |
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
2263 |
25274 | 2264 (put 'ifnottex 'texinfo-format 'texinfo-discard-line) |
2265 (put 'ifnottex 'texinfo-end 'texinfo-discard-command) | |
2266 | |
40374
fb22b0e18665
No change. Error by bob, not eliz, logging change for wrong file.
Eli Zaretskii <eliz@gnu.org>
parents:
38436
diff
changeset
|
2267 (put 'ifnothtml 'texinfo-format 'texinfo-discard-line) |
fb22b0e18665
No change. Error by bob, not eliz, logging change for wrong file.
Eli Zaretskii <eliz@gnu.org>
parents:
38436
diff
changeset
|
2268 (put 'ifnothtml 'texinfo-end 'texinfo-discard-command) |
fb22b0e18665
No change. Error by bob, not eliz, logging change for wrong file.
Eli Zaretskii <eliz@gnu.org>
parents:
38436
diff
changeset
|
2269 |
48697
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2270 (put 'ifnotxml 'texinfo-format 'texinfo-discard-line) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2271 (put 'ifnotxml 'texinfo-end 'texinfo-discard-command) |
880db53196d5
(texinfo-format-scan) Handle new functions for copyright
Robert J. Chassell <bob@rattlesnake.com>
parents:
48568
diff
changeset
|
2272 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2273 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2274 ;;; @titlepage |
189 | 2275 |
2276 (put 'titlepage 'texinfo-format 'texinfo-format-titlepage) | |
2277 (defun texinfo-format-titlepage () | |
2278 (delete-region texinfo-command-start | |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
2279 (re-search-forward "@end titlepage[ \t]*\n"))) |
189 | 2280 |
2281 (put 'endtitlepage 'texinfo-format 'texinfo-discard-line) | |
2282 | |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2283 ;; @titlespec an alternative titling command; ignored by Info |
189 | 2284 |
2285 (put 'titlespec 'texinfo-format 'texinfo-format-titlespec) | |
2286 (defun texinfo-format-titlespec () | |
2287 (delete-region texinfo-command-start | |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
2288 (re-search-forward "@end titlespec[ \t]*\n"))) |
189 | 2289 |
2290 (put 'endtitlespec 'texinfo-format 'texinfo-discard-line) | |
2291 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2292 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2293 ;;; @today |
189 | 2294 |
2295 (put 'today 'texinfo-format 'texinfo-format-today) | |
2296 | |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2297 ;; 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
|
2298 ;; The `@today{}' command requires a pair of braces, like `@dots{}'. |
189 | 2299 (defun texinfo-format-today () |
2300 (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
|
2301 (insert (format-time-string "%e %b %Y"))) |
189 | 2302 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2303 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2304 ;;; @timestamp{} |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2305 ;; Produce `Day Month Year Hour:Min' style of output. |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2306 ;; eg `1 Jan 1900 13:52' |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2307 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2308 (put 'timestamp 'texinfo-format 'texinfo-format-timestamp) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2309 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2310 ;; 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
|
2311 (defun texinfo-format-timestamp () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2312 "Insert the current local time and date." |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2313 (texinfo-parse-arg-discard) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2314 ;; 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
|
2315 (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
|
2316 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2317 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2318 ;;; @ignore |
189 | 2319 |
2320 (put 'ignore 'texinfo-format 'texinfo-format-ignore) | |
2321 (defun texinfo-format-ignore () | |
2322 (delete-region texinfo-command-start | |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
2323 (re-search-forward "@end ignore[ \t]*\n"))) |
189 | 2324 |
2325 (put 'endignore 'texinfo-format 'texinfo-discard-line) | |
2326 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2327 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2328 ;;; Define the Info enclosure command: @definfoenclose |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2329 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2330 ;; 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
|
2331 ;; 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
|
2332 ;; `@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
|
2333 ;; and follow the text. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2334 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2335 ;; 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
|
2336 ;; 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
|
2337 ;; `texinfo.tex' in a manner appropriate for typesetting. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2338 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2339 ;; 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
|
2340 ;; 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
|
2341 ;; `@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
|
2342 ;; `@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
|
2343 ;; 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
|
2344 ;; 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
|
2345 ;; 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
|
2346 ;; 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
|
2347 ;; 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
|
2348 ;; 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
|
2349 ;; 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
|
2350 ;; string as a start delimiter string. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2351 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2352 ;; 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
|
2353 ;; 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
|
2354 ;; override the built-in definition. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2355 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2356 ;; 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
|
2357 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2358 ;; For example, you can write: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2359 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2360 ;; @ifinfo |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2361 ;; @definfoenclose phoo, //, \\ |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2362 ;; @end ifinfo |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2363 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2364 ;; 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
|
2365 ;; 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
|
2366 ;; 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
|
2367 ;; `@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
|
2368 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2369 ;; Also, for TeX formatting, you could write |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2370 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2371 ;; @iftex |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2372 ;; @global@let@phoo=@i |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2373 ;; @end iftex |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2374 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2375 ;; 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
|
2376 ;; the argument to `@phoo' in italics. |
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 ;; 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
|
2379 ;; 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
|
2380 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2381 ;; Here is another example: write |
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 ;; @definfoenclose headword, , : |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2384 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2385 ;; 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
|
2386 ;; 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
|
2387 ;; argument to `@headword'. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2388 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2389 (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
|
2390 (defun texinfo-define-info-enclosure () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2391 (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
|
2392 (command-name (nth 0 args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2393 (beginning-delimiter (or (nth 1 args) "")) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2394 (end-delimiter (or (nth 2 args) ""))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2395 (texinfo-discard-command) |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2396 (push (list command-name |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2397 (list |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2398 beginning-delimiter |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2399 end-delimiter)) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2400 texinfo-enclosure-list))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2401 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2402 |
24314
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2403 ;;; @alias |
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2404 |
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2405 (put 'alias 'texinfo-format 'texinfo-alias) |
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2406 (defun texinfo-alias () |
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2407 (let ((start (1- (point))) |
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2408 args) |
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2409 (skip-chars-forward " ") |
109036 | 2410 (setq texinfo-command-end (line-end-position)) |
24314
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2411 (if (not (looking-at "\\([^=]+\\)=\\(.*\\)")) |
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2412 (error "Invalid alias command") |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2413 (push (cons |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2414 (match-string-no-properties 1) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2415 (match-string-no-properties 2)) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2416 texinfo-alias-list) |
109036 | 2417 (texinfo-discard-command)))) |
24314
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2418 |
96aef9174003
(texinfo-alias): New function.
Richard M. Stallman <rms@gnu.org>
parents:
23658
diff
changeset
|
2419 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2420 ;;; @var, @code and the like |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2421 |
189 | 2422 (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
|
2423 ;; @sc a small caps font for TeX; formatted as `var' in Info |
189 | 2424 (put 'sc 'texinfo-format 'texinfo-format-var) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2425 ;; @acronym for abbreviations in all caps, such as `NASA'. |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2426 ;; 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
|
2427 (put 'acronym 'texinfo-format 'texinfo-format-var) |
189 | 2428 (defun texinfo-format-var () |
24750
ea9b449cc742
(texinfo-format-var): Handle other nested constructs, using
Richard M. Stallman <rms@gnu.org>
parents:
24745
diff
changeset
|
2429 (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
|
2430 (texinfo-discard-command) |
ea9b449cc742
(texinfo-format-var): Handle other nested constructs, using
Richard M. Stallman <rms@gnu.org>
parents:
24745
diff
changeset
|
2431 (insert (upcase arg)))) |
189 | 2432 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2433 (put 'cite 'texinfo-format 'texinfo-format-code) |
189 | 2434 (put 'code 'texinfo-format 'texinfo-format-code) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2435 ;; @command (for command names) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2436 (put 'command 'texinfo-format 'texinfo-format-code) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2437 ;; @env (for environment variables) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2438 (put 'env 'texinfo-format 'texinfo-format-code) |
189 | 2439 (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
|
2440 (put 'samp 'texinfo-format 'texinfo-format-code) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2441 (put 'url 'texinfo-format 'texinfo-format-code) |
189 | 2442 (defun texinfo-format-code () |
2443 (insert "`" (texinfo-parse-arg-discard) "'") | |
2444 (goto-char texinfo-command-start)) | |
2445 | |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2446 ;; @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
|
2447 ;; 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
|
2448 ;; 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
|
2449 (put 'option 'texinfo-format 'texinfo-format-option) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2450 (defun texinfo-format-option () |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2451 "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
|
2452 ;; `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
|
2453 (if (not (search-backward "" ; searched-for character is a control-H |
109036 | 2454 (line-beginning-position) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2455 t)) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2456 (insert "`" (texinfo-parse-arg-discard) "'") |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2457 (insert (texinfo-parse-arg-discard))) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2458 (goto-char texinfo-command-start)) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2459 |
189 | 2460 (put 'emph 'texinfo-format 'texinfo-format-emph) |
2461 (put 'strong 'texinfo-format 'texinfo-format-emph) | |
2462 (defun texinfo-format-emph () | |
2463 (insert "*" (texinfo-parse-arg-discard) "*") | |
2464 (goto-char texinfo-command-start)) | |
2465 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2466 (put 'dfn 'texinfo-format 'texinfo-format-defn) |
189 | 2467 (put 'defn 'texinfo-format 'texinfo-format-defn) |
2468 (defun texinfo-format-defn () | |
2469 (insert "\"" (texinfo-parse-arg-discard) "\"") | |
2470 (goto-char texinfo-command-start)) | |
2471 | |
37538
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2472 (put 'email 'texinfo-format 'texinfo-format-email) |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2473 (defun texinfo-format-email () |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2474 "Format email address and optional following full name. |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2475 Insert full name, if present, followed by email address |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2476 surrounded by in angle brackets." |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2477 (let ((args (texinfo-format-parse-args))) |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2478 (texinfo-discard-command) |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2479 ;; if full-name |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2480 (if (nth 1 args) |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2481 (insert (nth 1 args) " ")) |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2482 (insert "<" (nth 0 args) ">"))) |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2483 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2484 (put 'key 'texinfo-format 'texinfo-format-key) |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2485 ;; 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
|
2486 (defun texinfo-format-key () |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
2487 (insert (texinfo-parse-arg-discard)) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2488 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2489 |
48794
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2490 ;; @verb{<char>TEXT<char>} (in `makeinfo' 4.1 and later) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2491 (put 'verb 'texinfo-format 'texinfo-format-verb) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2492 (defun texinfo-format-verb () |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2493 "Format text between non-quoted unique delimiter characters verbatim. |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2494 Enclose the verbatim text, including the delimiters, in braces. Print |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2495 text exactly as written (but not the delimiters) in a fixed-width. |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2496 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2497 For example, @verb\{|@|\} results in @ and |
48794
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2498 @verb\{+@'e?`!`+} results in @'e?`!`." |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2499 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2500 (let ((delimiter (buffer-substring-no-properties |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2501 (1+ texinfo-command-end) (+ 2 texinfo-command-end)))) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2502 (unless (looking-at "{") |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2503 (error "Not found: @verb start brace")) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2504 (delete-region texinfo-command-start (+ 2 texinfo-command-end)) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2505 (search-forward delimiter)) |
108765
d835100c3e8b
Replace Lisp calls to delete-backward-char by delete-char.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
2506 (delete-char -1) |
48794
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2507 (unless (looking-at "}") |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2508 (error "Not found: @verb end brace")) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2509 (delete-char 1)) |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2510 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2511 ;; as of 2002 Dec 10 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2512 ;; see (texinfo)Block Enclosing Commands |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2513 ;; need: @verbatim |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2514 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2515 ;; as of 2002 Dec 10 |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2516 ;; see (texinfo)verbatiminclude |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2517 ;; need: @verbatiminclude FILENAME |
837d37faadcf
Installed on behalf of TAKAHASHI Kaoru <kaoru@kaisei.org>
Robert J. Chassell <bob@rattlesnake.com>
parents:
48755
diff
changeset
|
2518 |
189 | 2519 (put 'bullet 'texinfo-format 'texinfo-format-bullet) |
2520 (defun texinfo-format-bullet () | |
2521 "Insert an asterisk. | |
2522 If used within a line, follow `@bullet' with braces." | |
2523 (texinfo-optional-braces-discard) | |
2524 (insert "*")) | |
2525 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2526 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2527 ;;; @kbd |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2528 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2529 ;; Inside of @example ... @end example and similar environments, |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2530 ;; @kbd does nothing; but outside of such environments, it places |
48568 | 2531 ;; single quotation marks around its argument. |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2532 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2533 (defvar texinfo-format-kbd-regexp |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2534 (concat |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2535 "^@" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2536 "\\(" |
37538
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2537 "display\\|" |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2538 "example\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2539 "smallexample\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2540 "lisp\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2541 "smalllisp" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2542 "\\)") |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2543 "Regexp matching environments in which @kbd does not put `...' around arg.") |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2544 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2545 (defvar texinfo-format-kbd-end-regexp |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2546 (concat |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2547 "^@end " |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2548 "\\(" |
37538
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
2549 "display\\|" |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2550 "example\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2551 "smallexample\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2552 "lisp\\|" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2553 "smalllisp" |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2554 "\\)") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2555 "Regexp specifying end of environments in which @kbd does not put `...' |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2556 around argument. (See `texinfo-format-kbd-regexp')") |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2557 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2558 (put 'kbd 'texinfo-format 'texinfo-format-kbd) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2559 (defun texinfo-format-kbd () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2560 "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
|
2561 ;; 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
|
2562 ;; Can stop search at nearest @node or texinfo-section-types-regexp |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2563 (let* ((stop |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2564 (save-excursion |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2565 (re-search-forward |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2566 (concat "^@node\\|\\(" texinfo-section-types-regexp "\\)") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2567 nil |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2568 '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
|
2569 (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2570 (example-location |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2571 (save-excursion |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2572 (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
|
2573 (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2574 (end-example-location |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2575 (save-excursion |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2576 (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
|
2577 (point)))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2578 ;; 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
|
2579 ;; 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
|
2580 (if (>= end-example-location example-location) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2581 ;; outside an @example or equivalent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2582 (insert "`" (texinfo-parse-arg-discard) "'") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2583 ;; else, in @example; do not surround with `...' |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2584 (insert (texinfo-parse-arg-discard))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2585 (goto-char texinfo-command-start))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2586 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2587 |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2588 ;;; @example, @lisp, @quotation, @display, @smalllisp, @smallexample, |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2589 ;; @smalldisplay |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2590 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2591 (put 'display 'texinfo-format 'texinfo-format-example) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2592 (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
|
2593 (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
|
2594 (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
|
2595 (put 'quotation 'texinfo-format 'texinfo-format-example) |
189 | 2596 (put 'smallexample 'texinfo-format 'texinfo-format-example) |
2597 (put 'smalllisp 'texinfo-format 'texinfo-format-example) | |
2598 (defun texinfo-format-example () | |
2599 (texinfo-push-stack 'example nil) | |
2600 (setq fill-column (- fill-column 5)) | |
2601 (texinfo-discard-line)) | |
2602 | |
2603 (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
|
2604 (put 'display 'texinfo-end 'texinfo-end-example) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2605 (put 'smalldisplay 'texinfo-end 'texinfo-end-example) |
189 | 2606 (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
|
2607 (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
|
2608 (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
|
2609 (put 'smalllisp 'texinfo-end 'texinfo-end-example) |
189 | 2610 (defun texinfo-end-example () |
2611 (setq fill-column (+ fill-column 5)) | |
2612 (texinfo-discard-command) | |
2613 (let ((stacktop | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2614 (texinfo-pop-stack 'example))) |
189 | 2615 (texinfo-do-itemize (nth 1 stacktop)))) |
2616 | |
2617 (put 'exdent 'texinfo-format 'texinfo-format-exdent) | |
2618 (defun texinfo-format-exdent () | |
2619 (texinfo-discard-command) | |
2620 (delete-region (point) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2621 (progn |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2622 (skip-chars-forward " ") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2623 (point))) |
189 | 2624 (insert ?\b) |
2625 ;; Cancel out the deletion that texinfo-do-itemize | |
2626 ;; is going to do at the end of this line. | |
2627 (save-excursion | |
2628 (end-of-line) | |
2629 (insert "\n "))) | |
2630 | |
2631 | |
18884
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2632 ;; @direntry and @dircategory |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2633 |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2634 (put 'direntry 'texinfo-format 'texinfo-format-direntry) |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2635 (defun texinfo-format-direntry () |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2636 (texinfo-push-stack 'direntry nil) |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2637 (texinfo-discard-line) |
24792
c4e546aa9dd5
(texinfo-format-direntry): Avoid blank line.
Karl Heuer <kwzh@gnu.org>
parents:
24750
diff
changeset
|
2638 (insert "START-INFO-DIR-ENTRY\n")) |
18884
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2639 |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2640 (put 'direntry 'texinfo-end 'texinfo-end-direntry) |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2641 (defun texinfo-end-direntry () |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2642 (texinfo-discard-command) |
18908
a5e6856e865e
(dircategory): Delete obsolete mistaken `put'.
Richard M. Stallman <rms@gnu.org>
parents:
18884
diff
changeset
|
2643 (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
|
2644 (texinfo-pop-stack 'direntry)) |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2645 |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2646 (put 'dircategory 'texinfo-format 'texinfo-format-dircategory) |
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2647 (defun texinfo-format-dircategory () |
18908
a5e6856e865e
(dircategory): Delete obsolete mistaken `put'.
Richard M. Stallman <rms@gnu.org>
parents:
18884
diff
changeset
|
2648 (let ((str (texinfo-parse-arg-discard))) |
a5e6856e865e
(dircategory): Delete obsolete mistaken `put'.
Richard M. Stallman <rms@gnu.org>
parents:
18884
diff
changeset
|
2649 (delete-region (point) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2650 (progn |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2651 (skip-chars-forward " ") |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2652 (point))) |
18908
a5e6856e865e
(dircategory): Delete obsolete mistaken `put'.
Richard M. Stallman <rms@gnu.org>
parents:
18884
diff
changeset
|
2653 (insert "INFO-DIR-SECTION " str "\n"))) |
18884
04d36f3e7fa6
(texinfo-no-refill-regexp): Add "direntry".
Richard M. Stallman <rms@gnu.org>
parents:
18818
diff
changeset
|
2654 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2655 ;;; @cartouche |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2656 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2657 ;; 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
|
2658 ;; 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
|
2659 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2660 (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
|
2661 (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
|
2662 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2663 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2664 ;;; @flushleft and @format |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2665 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2666 ;; 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
|
2667 ;; 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
|
2668 ;; `do-nothing' command |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2669 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2670 ;; 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
|
2671 ;; 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
|
2672 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2673 (put 'format 'texinfo-format 'texinfo-format-flushleft) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2674 (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
|
2675 (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
|
2676 (defun texinfo-format-flushleft () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2677 (texinfo-discard-line)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2678 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2679 (put 'format 'texinfo-end 'texinfo-end-flushleft) |
22695
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
2680 (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
|
2681 (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
|
2682 (defun texinfo-end-flushleft () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2683 (texinfo-discard-command)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2684 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2685 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2686 ;;; @flushright |
189 | 2687 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2688 ;; 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
|
2689 ;; 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
|
2690 ;; removed so that visible text lines up on the right side. |
189 | 2691 |
2692 (put 'flushright 'texinfo-format 'texinfo-format-flushright) | |
2693 (defun texinfo-format-flushright () | |
2694 (texinfo-push-stack 'flushright nil) | |
2695 (texinfo-discard-line)) | |
2696 | |
2697 (put 'flushright 'texinfo-end 'texinfo-end-flushright) | |
2698 (defun texinfo-end-flushright () | |
2699 (texinfo-discard-command) | |
2700 | |
2701 (let ((stacktop | |
2702 (texinfo-pop-stack 'flushright))) | |
2703 | |
2704 (texinfo-do-flushright (nth 1 stacktop)))) | |
2705 | |
2706 (defun texinfo-do-flushright (from) | |
2707 (save-excursion | |
2708 (while (progn (forward-line -1) | |
2709 (>= (point) from)) | |
2710 | |
2711 (beginning-of-line) | |
2712 (insert | |
2713 (make-string | |
2714 (- fill-column | |
2715 (save-excursion | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2716 (end-of-line) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2717 (skip-chars-backward " \t") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2718 (delete-region (point) (progn (end-of-line) (point))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2719 (current-column))) |
189 | 2720 ? ))))) |
2721 | |
2722 | |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2723 ;;; @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
|
2724 |
189 | 2725 (put 'ctrl 'texinfo-format 'texinfo-format-ctrl) |
2726 (defun texinfo-format-ctrl () | |
2727 (let ((str (texinfo-parse-arg-discard))) | |
2728 (insert (logand 31 (aref str 0))))) | |
2729 | |
2730 (put 'TeX 'texinfo-format 'texinfo-format-TeX) | |
2731 (defun texinfo-format-TeX () | |
2732 (texinfo-parse-arg-discard) | |
2733 (insert "TeX")) | |
2734 | |
2735 (put 'copyright 'texinfo-format 'texinfo-format-copyright) | |
2736 (defun texinfo-format-copyright () | |
2737 (texinfo-parse-arg-discard) | |
2738 (insert "(C)")) | |
2739 | |
2740 (put 'minus 'texinfo-format 'texinfo-format-minus) | |
2741 (defun texinfo-format-minus () | |
2742 "Insert a minus sign. | |
2743 If used within a line, follow `@minus' with braces." | |
2744 (texinfo-optional-braces-discard) | |
2745 (insert "-")) | |
2746 | |
2747 (put 'dots 'texinfo-format 'texinfo-format-dots) | |
2748 (defun texinfo-format-dots () | |
2749 (texinfo-parse-arg-discard) | |
2750 (insert "...")) | |
2751 | |
9549
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2752 (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
|
2753 (defun texinfo-format-enddots () |
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2754 (texinfo-parse-arg-discard) |
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2755 (insert "....")) |
1de7e5bc1ff1
(texinfo-no-refill-regexp): Recognize @ifhtml, @html.
Richard M. Stallman <rms@gnu.org>
parents:
9344
diff
changeset
|
2756 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2757 (put 'pounds 'texinfo-format 'texinfo-format-pounds) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2758 (defun texinfo-format-pounds () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2759 (texinfo-parse-arg-discard) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2760 (insert "#")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2761 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2762 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2763 ;;; Refilling and indenting: @refill, @paragraphindent, @noindent |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2764 |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2765 ;; Indent only those paragraphs that are refilled as a result of an |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2766 ;; @refill command. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2767 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2768 ;; * 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
|
2769 ;; the starts of paragraphs. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2770 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2771 ;; * 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
|
2772 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
2773 ;; * 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
|
2774 ;; number of spaces. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2775 |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2776 ;; But do not refill paragraphs with an @refill command that are |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2777 ;; preceded by @noindent or are part of a table, list, or deffn. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2778 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2779 (defvar texinfo-paragraph-indent "asis" |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2780 "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
|
2781 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2782 (put 'paragraphindent 'texinfo-format 'texinfo-paragraphindent) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2783 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2784 (defun texinfo-paragraphindent () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2785 "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
|
2786 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
|
2787 (let ((arg (texinfo-parse-arg-discard))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2788 (if (string= "asis" arg) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2789 (setq texinfo-paragraph-indent "asis") |
62402
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
60372
diff
changeset
|
2790 (setq texinfo-paragraph-indent (string-to-number arg))))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2791 |
189 | 2792 (put 'refill 'texinfo-format 'texinfo-format-refill) |
2793 (defun texinfo-format-refill () | |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2794 "Refill paragraph. Also, indent first line as set by @paragraphindent. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2795 Default is to leave paragraph indentation as is." |
189 | 2796 (texinfo-discard-command) |
23658 | 2797 (let ((position (point-marker))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2798 (forward-paragraph -1) |
23658 | 2799 (if (looking-at "[ \t\n]*$") (forward-line 1)) |
2800 ;; Do not indent if an entry in a list, table, or deffn, | |
2801 ;; or if paragraph is preceded by @noindent. | |
2802 ;; Otherwise, indent | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2803 (cond |
23658 | 2804 ;; delete a @noindent line and do not indent paragraph |
2805 ((save-excursion (forward-line -1) | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2806 (looking-at "^@noindent")) |
23658 | 2807 (forward-line -1) |
2808 (delete-region (point) (progn (forward-line 1) (point)))) | |
2809 ;; do nothing if "asis" | |
2810 ((equal texinfo-paragraph-indent "asis")) | |
2811 ;; do no indenting in list, etc. | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2812 ((> texinfo-stack-depth 0)) |
23658 | 2813 ;; otherwise delete existing whitespace and indent |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2814 (t |
23658 | 2815 (delete-region (point) (progn (skip-chars-forward " \t") (point))) |
2816 (insert (make-string texinfo-paragraph-indent ? )))) | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2817 (forward-paragraph 1) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2818 (forward-line -1) |
23658 | 2819 (end-of-line) |
2820 ;; Do not fill a section title line with asterisks, hyphens, etc. that | |
2821 ;; are used to underline it. This could occur if the line following | |
2822 ;; the underlining is not an index entry and has text within it. | |
2823 (let* ((previous-paragraph-separate paragraph-separate) | |
2824 (paragraph-separate | |
2825 (concat paragraph-separate "\\|[-=.]+\\|\\*\\*+")) | |
2826 (previous-paragraph-start paragraph-start) | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2827 (paragraph-start |
23658 | 2828 (concat paragraph-start "\\|[-=.]+\\|\\*\\*+"))) |
2829 (unwind-protect | |
2830 (fill-paragraph nil) | |
2831 (setq paragraph-separate previous-paragraph-separate) | |
2832 (setq paragraph-start previous-paragraph-start))) | |
2833 (goto-char position))) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2834 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2835 (put 'noindent 'texinfo-format 'texinfo-noindent) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2836 (defun texinfo-noindent () |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2837 (save-excursion |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2838 (forward-paragraph 1) |
109036 | 2839 (if (search-backward "@refill" (line-beginning-position 0) t) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2840 () ; 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
|
2841 ;; else |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2842 (texinfo-discard-line)))) |
189 | 2843 |
2844 | |
2845 ;;; Index generation | |
2846 | |
2847 (put 'vindex 'texinfo-format 'texinfo-format-vindex) | |
2848 (defun texinfo-format-vindex () | |
2849 (texinfo-index 'texinfo-vindex)) | |
2850 | |
2851 (put 'cindex 'texinfo-format 'texinfo-format-cindex) | |
2852 (defun texinfo-format-cindex () | |
2853 (texinfo-index 'texinfo-cindex)) | |
2854 | |
2855 (put 'findex 'texinfo-format 'texinfo-format-findex) | |
2856 (defun texinfo-format-findex () | |
2857 (texinfo-index 'texinfo-findex)) | |
2858 | |
2859 (put 'pindex 'texinfo-format 'texinfo-format-pindex) | |
2860 (defun texinfo-format-pindex () | |
2861 (texinfo-index 'texinfo-pindex)) | |
2862 | |
2863 (put 'tindex 'texinfo-format 'texinfo-format-tindex) | |
2864 (defun texinfo-format-tindex () | |
2865 (texinfo-index 'texinfo-tindex)) | |
2866 | |
2867 (put 'kindex 'texinfo-format 'texinfo-format-kindex) | |
2868 (defun texinfo-format-kindex () | |
2869 (texinfo-index 'texinfo-kindex)) | |
2870 | |
2871 (defun texinfo-index (indexvar) | |
2872 (let ((arg (texinfo-parse-expanded-arg))) | |
2873 (texinfo-discard-command) | |
2874 (set indexvar | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2875 (cons (list arg |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2876 texinfo-last-node |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2877 ;; 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
|
2878 (if texinfo-last-node-pos |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2879 (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
|
2880 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2881 (symbol-value indexvar))))) |
189 | 2882 |
55770
f813d67d717a
(texinfo-indexvar-alist): Declare as variable instead of constant.
John Paul Wallington <jpw@pobox.com>
parents:
55752
diff
changeset
|
2883 (defvar texinfo-indexvar-alist |
189 | 2884 '(("cp" . texinfo-cindex) |
2885 ("fn" . texinfo-findex) | |
2886 ("vr" . texinfo-vindex) | |
2887 ("tp" . texinfo-tindex) | |
2888 ("pg" . texinfo-pindex) | |
2889 ("ky" . texinfo-kindex))) | |
2890 | |
2891 | |
2892 ;;; @defindex @defcodeindex | |
2893 (put 'defindex 'texinfo-format 'texinfo-format-defindex) | |
2894 (put 'defcodeindex 'texinfo-format 'texinfo-format-defindex) | |
2895 | |
2896 (defun texinfo-format-defindex () | |
2897 (let* ((index-name (texinfo-parse-arg-discard)) ; eg: `aa' | |
2898 (indexing-command (intern (concat index-name "index"))) | |
2899 (index-formatting-command ; eg: `texinfo-format-aaindex' | |
2900 (intern (concat "texinfo-format-" index-name "index"))) | |
2901 (index-alist-name ; eg: `texinfo-aaindex' | |
2902 (intern (concat "texinfo-" index-name "index")))) | |
2903 | |
2904 (set index-alist-name nil) | |
2905 | |
2906 (put indexing-command ; eg, aaindex | |
2907 'texinfo-format | |
2908 index-formatting-command) ; eg, texinfo-format-aaindex | |
2909 | |
2910 ;; eg: "aa" . texinfo-aaindex | |
2911 (or (assoc index-name texinfo-indexvar-alist) | |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2912 (push (cons index-name |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2913 index-alist-name) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
2914 texinfo-indexvar-alist)) |
189 | 2915 |
2916 (fset index-formatting-command | |
2917 (list 'lambda 'nil | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
2918 (list 'texinfo-index |
189 | 2919 (list 'quote index-alist-name)))))) |
2920 | |
2921 | |
2922 ;;; @synindex @syncodeindex | |
2923 | |
2924 (put 'synindex 'texinfo-format 'texinfo-format-synindex) | |
2925 (put 'syncodeindex 'texinfo-format 'texinfo-format-synindex) | |
2926 | |
2927 (defun texinfo-format-synindex () | |
2928 (let* ((args (texinfo-parse-arg-discard)) | |
2929 (second (cdr (read-from-string args))) | |
2930 (joiner (symbol-name (car (read-from-string args)))) | |
2931 (joined (symbol-name (car (read-from-string args second))))) | |
2932 | |
2933 (if (assoc joiner texinfo-short-index-cmds-alist) | |
2934 (put | |
2935 (cdr (assoc joiner texinfo-short-index-cmds-alist)) | |
2936 'texinfo-format | |
2937 (or (cdr (assoc joined texinfo-short-index-format-cmds-alist)) | |
2938 (intern (concat "texinfo-format-" joined "index")))) | |
2939 (put | |
2940 (intern (concat joiner "index")) | |
2941 'texinfo-format | |
2942 (or (cdr(assoc joined texinfo-short-index-format-cmds-alist)) | |
2943 (intern (concat "texinfo-format-" joined "index"))))))) | |
2944 | |
2945 (defconst texinfo-short-index-cmds-alist | |
2946 '(("cp" . cindex) | |
2947 ("fn" . findex) | |
2948 ("vr" . vindex) | |
2949 ("tp" . tindex) | |
2950 ("pg" . pindex) | |
2951 ("ky" . kindex))) | |
2952 | |
2953 (defconst texinfo-short-index-format-cmds-alist | |
2954 '(("cp" . texinfo-format-cindex) | |
2955 ("fn" . texinfo-format-findex) | |
2956 ("vr" . texinfo-format-vindex) | |
2957 ("tp" . texinfo-format-tindex) | |
2958 ("pg" . texinfo-format-pindex) | |
2959 ("ky" . texinfo-format-kindex))) | |
2960 | |
2961 | |
2962 ;;; @printindex | |
2963 | |
2964 (put 'printindex 'texinfo-format 'texinfo-format-printindex) | |
2965 | |
2966 (defun texinfo-format-printindex () | |
86206
2abbcd7bdb21
(texinfo-format-printindex): Collect combined indexes
Juri Linkov <juri@jurta.org>
parents:
82907
diff
changeset
|
2967 (let* ((arg (texinfo-parse-arg-discard)) |
2abbcd7bdb21
(texinfo-format-printindex): Collect combined indexes
Juri Linkov <juri@jurta.org>
parents:
82907
diff
changeset
|
2968 (fmt (cdr (assoc arg texinfo-short-index-format-cmds-alist))) |
2abbcd7bdb21
(texinfo-format-printindex): Collect combined indexes
Juri Linkov <juri@jurta.org>
parents:
82907
diff
changeset
|
2969 (index-list (delq nil (mapcar (lambda (e) |
2abbcd7bdb21
(texinfo-format-printindex): Collect combined indexes
Juri Linkov <juri@jurta.org>
parents:
82907
diff
changeset
|
2970 (and (eq fmt (get (cdr e) 'texinfo-format)) |
2abbcd7bdb21
(texinfo-format-printindex): Collect combined indexes
Juri Linkov <juri@jurta.org>
parents:
82907
diff
changeset
|
2971 (cdr (assoc (car e) texinfo-indexvar-alist)))) |
2abbcd7bdb21
(texinfo-format-printindex): Collect combined indexes
Juri Linkov <juri@jurta.org>
parents:
82907
diff
changeset
|
2972 texinfo-short-index-cmds-alist))) |
2abbcd7bdb21
(texinfo-format-printindex): Collect combined indexes
Juri Linkov <juri@jurta.org>
parents:
82907
diff
changeset
|
2973 (indexelts (apply #'append nil (mapcar #'symbol-value index-list))) |
2abbcd7bdb21
(texinfo-format-printindex): Collect combined indexes
Juri Linkov <juri@jurta.org>
parents:
82907
diff
changeset
|
2974 opoint) |
189 | 2975 (insert "\n* Menu:\n\n") |
2976 (setq opoint (point)) | |
2977 (texinfo-print-index nil indexelts) | |
97142 | 2978 (shell-command-on-region opoint (point) "sort -fd" 1))) |
189 | 2979 |
2980 (defun texinfo-print-index (file indexelts) | |
2981 (while indexelts | |
2982 (if (stringp (car (car indexelts))) | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2983 (progn |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2984 (insert "* " (car (car indexelts)) ": " ) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2985 (indent-to 32) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2986 (insert |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2987 (if file (concat "(" file ")") "") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2988 (nth 1 (car indexelts)) ".") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2989 (indent-to 54) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2990 (insert |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2991 (if (nth 2 (car indexelts)) |
55752
a7f7c0fa52a6
(texinfo-print-index): Print index line numbers in the new Texinfo 4.7 format.
Juri Linkov <juri@jurta.org>
parents:
52969
diff
changeset
|
2992 (format " (line %3d)" (1+ (nth 2 (car indexelts)))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2993 "") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
2994 "\n")) |
189 | 2995 ;; index entries from @include'd file |
2996 (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
|
2997 (nth 2 (car indexelts)))) |
189 | 2998 (setq indexelts (cdr indexelts)))) |
2999 | |
3000 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3001 ;;; Glyphs: @equiv, @error, etc |
189 | 3002 |
3003 ;; @equiv to show that two expressions are equivalent | |
3004 ;; @error to show an error message | |
3005 ;; @expansion to show what a macro expands to | |
3006 ;; @point to show the location of point in an example | |
3007 ;; @print to show what an evaluated expression prints | |
3008 ;; @result to indicate the value returned by an expression | |
3009 | |
3010 (put 'equiv 'texinfo-format 'texinfo-format-equiv) | |
3011 (defun texinfo-format-equiv () | |
3012 (texinfo-parse-arg-discard) | |
3013 (insert "==")) | |
3014 | |
3015 (put 'error 'texinfo-format 'texinfo-format-error) | |
3016 (defun texinfo-format-error () | |
3017 (texinfo-parse-arg-discard) | |
3018 (insert "error-->")) | |
3019 | |
3020 (put 'expansion 'texinfo-format 'texinfo-format-expansion) | |
3021 (defun texinfo-format-expansion () | |
3022 (texinfo-parse-arg-discard) | |
3023 (insert "==>")) | |
3024 | |
3025 (put 'point 'texinfo-format 'texinfo-format-point) | |
3026 (defun texinfo-format-point () | |
3027 (texinfo-parse-arg-discard) | |
3028 (insert "-!-")) | |
3029 | |
3030 (put 'print 'texinfo-format 'texinfo-format-print) | |
3031 (defun texinfo-format-print () | |
3032 (texinfo-parse-arg-discard) | |
3033 (insert "-|")) | |
3034 | |
3035 (put 'result 'texinfo-format 'texinfo-format-result) | |
3036 (defun texinfo-format-result () | |
3037 (texinfo-parse-arg-discard) | |
3038 (insert "=>")) | |
3039 | |
3040 | |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3041 ;;; Accent commands |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3042 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3043 ;; 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
|
3044 ;; 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
|
3045 ;; character set. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3046 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3047 ;; See the `texinfo-accent-commands' variable |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3048 ;; in the section for `texinfo-append-refill'. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3049 ;; Also, see the defun for `texinfo-format-scan' |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3050 ;; for single-character accent commands. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3051 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3052 ;; Command Info output Name |
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 ;; These do not have braces: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3055 ;; @^ ==> ^ circumflex accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3056 ;; @` ==> ` grave accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3057 ;; @' ==> ' acute accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3058 ;; @" ==> " umlaut accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3059 ;; @= ==> = overbar accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3060 ;; @~ ==> ~ tilde accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3061 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3062 ;; These have braces, but take no argument: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3063 ;; @OE{} ==> OE French-OE-ligature |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3064 ;; @oe{} ==> oe |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3065 ;; @AA{} ==> AA Scandinavian-A-with-circle |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3066 ;; @aa{} ==> aa |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3067 ;; @AE{} ==> AE Latin-Scandinavian-AE |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3068 ;; @ae{} ==> ae |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3069 ;; @ss{} ==> ss German-sharp-S |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3070 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3071 ;; @questiondown{} ==> ? upside-down-question-mark |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3072 ;; @exclamdown{} ==> ! upside-down-exclamation-mark |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3073 ;; @L{} ==> L/ Polish suppressed-L (Lslash) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3074 ;; @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
|
3075 ;; @O{} ==> O/ Scandinavian O-with-slash |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3076 ;; @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
|
3077 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3078 ;; These have braces, and take an argument: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3079 ;; @,{c} ==> c, cedilla accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3080 ;; @dotaccent{o} ==> .o overdot-accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3081 ;; @ubaraccent{o} ==> _o underbar-accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3082 ;; @udotaccent{o} ==> o-. underdot-accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3083 ;; @H{o} ==> ""o long Hungarian umlaut |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3084 ;; @ringaccent{o} ==> *o ring accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3085 ;; @tieaccent{oo} ==> [oo tie after accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3086 ;; @u{o} ==> (o breve accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3087 ;; @v{o} ==> <o hacek accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3088 ;; @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
|
3089 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3090 ;; ========== |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3091 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3092 ;; Note: The defun texinfo-format-scan |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3093 ;; looks at "[@{}^'`\",=~ *?!-]" |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3094 ;; In the case of @*, a line break is inserted; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3095 ;; 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
|
3096 ;; Thus, `texinfo-format-scan' handles the following |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3097 ;; single-character accent commands: @^ @` @' @" @, @- @= @~ |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3098 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3099 ;; @^ ==> ^ circumflex accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3100 ;; (put '^ 'texinfo-format 'texinfo-format-circumflex-accent) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3101 ;; (defun texinfo-format-circumflex-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3102 ;; (texinfo-discard-command) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3103 ;; (insert "^")) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3104 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3105 ;; @` ==> ` grave accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3106 ;; (put '\` 'texinfo-format 'texinfo-format-grave-accent) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3107 ;; (defun texinfo-format-grave-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3108 ;; (texinfo-discard-command) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3109 ;; (insert "\`")) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3110 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3111 ;; @' ==> ' acute accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3112 ;; (put '\' 'texinfo-format 'texinfo-format-acute-accent) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3113 ;; (defun texinfo-format-acute-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3114 ;; (texinfo-discard-command) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3115 ;; (insert "'")) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3116 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3117 ;; @" ==> " umlaut accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3118 ;; (put '\" 'texinfo-format 'texinfo-format-umlaut-accent) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3119 ;; (defun texinfo-format-umlaut-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3120 ;; (texinfo-discard-command) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3121 ;; (insert "\"")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3122 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3123 ;; @= ==> = overbar accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3124 ;; (put '= 'texinfo-format 'texinfo-format-overbar-accent) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3125 ;; (defun texinfo-format-overbar-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3126 ;; (texinfo-discard-command) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3127 ;; (insert "=")) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3128 ;; |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3129 ;; @~ ==> ~ tilde accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3130 ;; (put '~ 'texinfo-format 'texinfo-format-tilde-accent) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3131 ;; (defun texinfo-format-tilde-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3132 ;; (texinfo-discard-command) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3133 ;; (insert "~")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3134 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3135 ;; @OE{} ==> OE French-OE-ligature |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3136 (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
|
3137 (defun texinfo-format-French-OE-ligature () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3138 (insert "OE" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3139 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3140 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3141 ;; @oe{} ==> oe |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3142 (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
|
3143 (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
|
3144 (insert "oe" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3145 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3146 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3147 ;; @AA{} ==> AA Scandinavian-A-with-circle |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3148 (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
|
3149 (defun texinfo-format-Scandinavian-A-with-circle () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3150 (insert "AA" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3151 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3152 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3153 ;; @aa{} ==> aa |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3154 (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
|
3155 (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
|
3156 (insert "aa" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3157 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3158 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3159 ;; @AE{} ==> AE Latin-Scandinavian-AE |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3160 (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
|
3161 (defun texinfo-format-Latin-Scandinavian-AE () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3162 (insert "AE" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3163 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3164 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3165 ;; @ae{} ==> ae |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3166 (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
|
3167 (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
|
3168 (insert "ae" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3169 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3170 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3171 ;; @ss{} ==> ss German-sharp-S |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3172 (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
|
3173 (defun texinfo-format-German-sharp-S () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3174 (insert "ss" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3175 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3176 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3177 ;; @questiondown{} ==> ? upside-down-question-mark |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3178 (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
|
3179 (defun texinfo-format-upside-down-question-mark () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3180 (insert "?" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3181 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3182 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3183 ;; @exclamdown{} ==> ! upside-down-exclamation-mark |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3184 (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
|
3185 (defun texinfo-format-upside-down-exclamation-mark () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3186 (insert "!" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3187 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3188 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3189 ;; @L{} ==> L/ Polish suppressed-L (Lslash) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3190 (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
|
3191 (defun texinfo-format-Polish-suppressed-L () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3192 (insert (texinfo-parse-arg-discard) "/L") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3193 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3194 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3195 ;; @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
|
3196 (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
|
3197 (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
|
3198 (insert (texinfo-parse-arg-discard) "/l") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3199 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3200 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3201 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3202 ;; @O{} ==> O/ Scandinavian O-with-slash |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3203 (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
|
3204 (defun texinfo-format-Scandinavian-O-with-slash () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3205 (insert (texinfo-parse-arg-discard) "O/") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3206 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3207 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3208 ;; @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
|
3209 (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
|
3210 (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
|
3211 (insert (texinfo-parse-arg-discard) "o/") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3212 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3213 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3214 ;; Take arguments |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3215 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3216 ;; @,{c} ==> c, cedilla accent |
78636
b1e667d914ef
(\,): Calrify it's not a new-style unquote.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78225
diff
changeset
|
3217 (put '\, 'texinfo-format 'texinfo-format-cedilla-accent) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3218 (defun texinfo-format-cedilla-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3219 (insert (texinfo-parse-arg-discard) ",") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3220 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3221 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3222 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3223 ;; @dotaccent{o} ==> .o overdot-accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3224 (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
|
3225 (defun texinfo-format-overdot-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3226 (insert "." (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3227 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3228 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3229 ;; @ubaraccent{o} ==> _o underbar-accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3230 (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
|
3231 (defun texinfo-format-underbar-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3232 (insert "_" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3233 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3234 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3235 ;; @udotaccent{o} ==> o-. underdot-accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3236 (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
|
3237 (defun texinfo-format-underdot-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3238 (insert (texinfo-parse-arg-discard) "-.") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3239 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3240 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3241 ;; @H{o} ==> ""o long Hungarian umlaut |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3242 (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
|
3243 (defun texinfo-format-long-Hungarian-umlaut () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3244 (insert "\"\"" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3245 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3246 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3247 ;; @ringaccent{o} ==> *o ring accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3248 (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
|
3249 (defun texinfo-format-ring-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3250 (insert "*" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3251 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3252 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3253 ;; @tieaccent{oo} ==> [oo tie after accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3254 (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
|
3255 (defun texinfo-format-tie-after-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3256 (insert "[" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3257 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3258 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3259 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3260 ;; @u{o} ==> (o breve accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3261 (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
|
3262 (defun texinfo-format-breve-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3263 (insert "(" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3264 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3265 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3266 ;; @v{o} ==> <o hacek accent |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3267 (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
|
3268 (defun texinfo-format-hacek-accent () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3269 (insert "<" (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3270 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3271 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3272 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3273 ;; @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
|
3274 (put 'dotless 'texinfo-format 'texinfo-format-dotless) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3275 (defun texinfo-format-dotless () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3276 (insert (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3277 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3278 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
3279 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3280 ;;; Definition formatting: @deffn, @defun, etc |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3281 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3282 ;; What definition formatting produces: |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3283 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3284 ;; @deffn category name args... |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3285 ;; In Info, `Category: name ARGS' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3286 ;; In index: name: node. line#. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3287 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3288 ;; @defvr category name |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3289 ;; In Info, `Category: name' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3290 ;; In index: name: node. line#. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3291 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3292 ;; @deftp category name attributes... |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3293 ;; `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
|
3294 ;; In index: name: node. line#. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3295 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3296 ;; 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
|
3297 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3298 ;; @defun, @defmac, @defspec, @defvar, @defopt |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3299 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3300 ;; @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
|
3301 ;; @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
|
3302 ;; @defvar name In Info, `Variable: name' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3303 ;; etc. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3304 ;; In index: name: node. line#. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3305 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3306 ;; 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
|
3307 ;; @deftypefn category data-type name args... |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3308 ;; In Info, `Category: data-type name args...' |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3309 ;; @deftypevr category data-type name |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3310 ;; In Info, `Category: data-type name' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3311 ;; In index: name: node. line#. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3312 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3313 ;; 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
|
3314 ;; @deftypefun 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, `Function: data-type name ARGS' |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3316 ;; In index: name: node. line#. |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3317 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3318 ;; @deftypevar data-type name |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3319 ;; In Info, `Variable: data-type name' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3320 ;; 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
|
3321 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3322 ;; Generalized object oriented entity: |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3323 ;; @defop category class name args... |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3324 ;; 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
|
3325 ;; 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
|
3326 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3327 ;; @defcv category class name |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3328 ;; In Info, `Category of class: name' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3329 ;; 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
|
3330 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3331 ;; Specialized object oriented entity: |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3332 ;; @defmethod class name args... |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3333 ;; 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
|
3334 ;; 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
|
3335 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3336 ;; @defivar class name |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3337 ;; 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
|
3338 ;; 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
|
3339 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3340 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3341 ;;; The definition formatting functions |
189 | 3342 |
3343 (defun texinfo-format-defun () | |
3344 (texinfo-push-stack 'defun nil) | |
3345 (setq fill-column (- fill-column 5)) | |
3346 (texinfo-format-defun-1 t)) | |
3347 | |
3348 (defun texinfo-end-defun () | |
3349 (setq fill-column (+ fill-column 5)) | |
3350 (texinfo-discard-command) | |
3351 (let ((start (nth 1 (texinfo-pop-stack 'defun)))) | |
3352 (texinfo-do-itemize start) | |
3353 ;; Delete extra newline inserted after header. | |
3354 (save-excursion | |
3355 (goto-char start) | |
3356 (delete-char -1)))) | |
3357 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3358 (defun texinfo-format-defunx () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3359 (texinfo-format-defun-1 nil)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3360 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3361 (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
|
3362 (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
|
3363 (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
|
3364 (texinfo-discard-command) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3365 ;; 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
|
3366 (if (not first-p) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3367 (delete-char -1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3368 (funcall |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3369 (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
|
3370 ;; 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
|
3371 ;; with header line. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3372 (insert "\n\n") |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3373 (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
|
3374 (funcall |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3375 (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
|
3376 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3377 ;;; 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
|
3378 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3379 ;; @deffn, @defvr, @deftp |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3380 (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
|
3381 (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
|
3382 (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
|
3383 (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
|
3384 (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
|
3385 (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
|
3386 (defun texinfo-format-deffn (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3387 ;; 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
|
3388 ;; @deffn category name args... |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3389 ;; In Info, `Category: name ARGS' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3390 ;; @deftp category name attributes... |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3391 ;; `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
|
3392 (let ((category (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3393 (name (car (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3394 (args (cdr (cdr parsed-args)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3395 (insert " -- " category ": " name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3396 (while args |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3397 (insert " " |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3398 (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
|
3399 (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
|
3400 (car args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3401 (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 ;; @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
|
3405 (put 'defun 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3406 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3407 (put 'defunx 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3408 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3409 (put 'defmac 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3410 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3411 (put 'defmacx 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3412 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3413 (put 'defspec 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3414 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3415 (put 'defspecx 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3416 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3417 (put 'defvar 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3418 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3419 (put 'defvarx 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3420 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3421 (put 'defopt 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3422 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3423 (put 'defoptx 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3424 'texinfo-format-specialized-defun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3425 (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
|
3426 ;; 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
|
3427 ;; @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
|
3428 ;; @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
|
3429 ;; @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
|
3430 ;; 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
|
3431 (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
|
3432 (name (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3433 (args (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3434 (insert " -- " category ": " name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3435 (while args |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3436 (insert " " |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3437 (if (= ?& (aref (car args) 0)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3438 (car args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3439 (upcase (car args)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3440 (setq args (cdr args))))) |
189 | 3441 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3442 ;; @deftypefn, @deftypevr: Generalized typed |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3443 (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
|
3444 (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
|
3445 (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
|
3446 (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
|
3447 (defun texinfo-format-deftypefn (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3448 ;; 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
|
3449 ;; @deftypefn category data-type name args... |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3450 ;; In Info, `Category: data-type name args...' |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3451 ;; @deftypevr category data-type name |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3452 ;; In Info, `Category: data-type name' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3453 ;; 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
|
3454 (let ((category (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3455 (data-type (car (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3456 (name (car (cdr (cdr parsed-args)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3457 (args (cdr (cdr (cdr parsed-args))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3458 (insert " -- " category ": " data-type " " name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3459 (while args |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3460 (insert " " (car args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3461 (setq args (cdr args))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3462 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3463 ;; @deftypefun, @deftypevar: Specialized typed |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3464 (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
|
3465 (put 'deftypefunx 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3466 'texinfo-format-deftypefun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3467 (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
|
3468 (put 'deftypevarx 'texinfo-deffn-formatting-property |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3469 'texinfo-format-deftypefun) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3470 (defun texinfo-format-deftypefun (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3471 ;; 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
|
3472 ;; @deftypefun data-type name args... |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3473 ;; In Info, `Function: data-type name ARGS' |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3474 ;; @deftypevar data-type name |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3475 ;; In Info, `Variable: data-type name' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3476 ;; 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
|
3477 ;; 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
|
3478 (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
|
3479 (data-type (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3480 (name (car (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3481 (args (cdr (cdr parsed-args)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3482 (insert " -- " category ": " data-type " " name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3483 (while args |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3484 (insert " " (car args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3485 (setq args (cdr args))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3486 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3487 ;; @defop: Generalized object-oriented |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3488 (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
|
3489 (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
|
3490 (defun texinfo-format-defop (parsed-args) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3491 ;; Generalized object oriented entity: |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3492 ;; @defop category class name args... |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3493 ;; 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
|
3494 ;; 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
|
3495 (let ((category (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3496 (class (car (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3497 (name (car (cdr (cdr parsed-args)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3498 (args (cdr (cdr (cdr parsed-args))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3499 (insert " -- " category " on " class ": " name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3500 (while args |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3501 (insert " " (upcase (car args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3502 (setq args (cdr args))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3503 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3504 ;; @defcv: Generalized object-oriented |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3505 (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
|
3506 (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
|
3507 (defun texinfo-format-defcv (parsed-args) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3508 ;; Generalized object oriented entity: |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3509 ;; @defcv category class name |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3510 ;; In Info, `Category of class: name' |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3511 ;; 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
|
3512 (let ((category (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3513 (class (car (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3514 (name (car (cdr (cdr parsed-args)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3515 (args (cdr (cdr (cdr parsed-args))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3516 (insert " -- " category " of " class ": " name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3517 (while args |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3518 (insert " " (upcase (car args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3519 (setq args (cdr args))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3520 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3521 ;; @defmethod: Specialized object-oriented |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3522 (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
|
3523 (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
|
3524 (defun texinfo-format-defmethod (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3525 ;; Specialized object oriented entity: |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3526 ;; @defmethod class name args... |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3527 ;; 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
|
3528 ;; 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
|
3529 ;; 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
|
3530 (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
|
3531 (class (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3532 (name (car (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3533 (args (cdr (cdr parsed-args)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3534 (insert " -- " category " on " class ": " name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3535 (while args |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3536 (insert " " (upcase (car args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3537 (setq args (cdr args))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3538 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3539 ;; @defivar: Specialized object-oriented |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3540 (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
|
3541 (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
|
3542 (defun texinfo-format-defivar (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3543 ;; Specialized object oriented entity: |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3544 ;; @defivar class name |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3545 ;; 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
|
3546 ;; 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
|
3547 ;; 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
|
3548 (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
|
3549 (class (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3550 (name (car (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3551 (args (cdr (cdr parsed-args)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3552 (insert " -- " category " of " class ": " name) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3553 (while args |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3554 (insert " " (upcase (car args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3555 (setq args (cdr args))))) |
189 | 3556 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3557 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3558 ;;; Indexing for definitions |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3559 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3560 ;; 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
|
3561 ;; 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
|
3562 ;; formatted differently: |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3563 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3564 ;; @defun, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3565 ;; @defmac, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3566 ;; @defspec, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3567 ;; @defvar, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3568 ;; @defopt all use their 1st argument as the entry-proper |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3569 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3570 ;; @deffn, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3571 ;; @defvr, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3572 ;; @deftp |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3573 ;; @deftypefun |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3574 ;; @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
|
3575 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3576 ;; @deftypefn, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3577 ;; @deftypevr both use their 3rd argument as the entry-proper |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3578 ;; |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3579 ;; @defmethod uses its 2nd and 1st arguments as an entry-proper |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3580 ;; formatted: NAME on CLASS |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3581 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3582 ;; @defop uses its 3rd and 2nd arguments as an entry-proper |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3583 ;; formatted: NAME on CLASS |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3584 ;; |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3585 ;; @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
|
3586 ;; formatted: NAME of CLASS |
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 ;; @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
|
3589 ;; formatted: NAME of CLASS |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3590 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3591 (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
|
3592 (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
|
3593 (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
|
3594 (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
|
3595 (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
|
3596 (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
|
3597 (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
|
3598 (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
|
3599 (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
|
3600 (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
|
3601 (defun texinfo-index-defun (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3602 ;; 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
|
3603 ;; `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
|
3604 (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
|
3605 (set index-list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3606 (cons |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3607 ;; 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
|
3608 (list |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3609 (car parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3610 texinfo-last-node |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3611 ;; 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
|
3612 (if texinfo-last-node-pos |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3613 (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
|
3614 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3615 (symbol-value index-list))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3616 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3617 (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
|
3618 (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
|
3619 (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
|
3620 (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
|
3621 (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
|
3622 (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
|
3623 (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
|
3624 (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
|
3625 (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
|
3626 (put 'deftypevarx 'texinfo-defun-indexing-property 'texinfo-index-deffn) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3627 (defun texinfo-index-deffn (parsed-args) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3628 ;; 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
|
3629 ;; `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
|
3630 (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
|
3631 (set index-list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3632 (cons |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3633 ;; 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
|
3634 (list |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3635 (car (cdr parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3636 texinfo-last-node |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3637 ;; 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
|
3638 (if texinfo-last-node-pos |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3639 (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
|
3640 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3641 (symbol-value index-list))))) |
189 | 3642 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3643 (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
|
3644 (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
|
3645 (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
|
3646 (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
|
3647 (defun texinfo-index-deftypefn (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3648 ;; 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
|
3649 ;; `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
|
3650 (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
|
3651 (set index-list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3652 (cons |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3653 ;; 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
|
3654 (list |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3655 (car (cdr (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3656 texinfo-last-node |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3657 ;; 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
|
3658 (if texinfo-last-node-pos |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3659 (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
|
3660 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3661 (symbol-value index-list))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3662 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3663 (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
|
3664 (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
|
3665 (defun texinfo-index-defmethod (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3666 ;; 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
|
3667 ;; `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
|
3668 (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
|
3669 (set index-list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3670 (cons |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3671 ;; 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
|
3672 (list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3673 (format "%s on %s" |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3674 (car (cdr parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3675 (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3676 texinfo-last-node |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3677 ;; 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
|
3678 (if texinfo-last-node-pos |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3679 (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
|
3680 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3681 (symbol-value index-list))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3682 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3683 (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
|
3684 (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
|
3685 (defun texinfo-index-defop (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3686 ;; 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
|
3687 ;; `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
|
3688 (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
|
3689 (set index-list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3690 (cons |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3691 ;; 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
|
3692 (list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3693 (format "%s on %s" |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3694 (car (cdr (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3695 (car (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3696 texinfo-last-node |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3697 ;; 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
|
3698 (if texinfo-last-node-pos |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3699 (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
|
3700 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3701 (symbol-value index-list))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3702 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3703 (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
|
3704 (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
|
3705 (defun texinfo-index-defivar (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3706 ;; 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
|
3707 ;; `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
|
3708 (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
|
3709 (set index-list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3710 (cons |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3711 ;; 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
|
3712 (list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3713 (format "%s of %s" |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3714 (car (cdr parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3715 (car parsed-args)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3716 texinfo-last-node |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3717 ;; 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
|
3718 (if texinfo-last-node-pos |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3719 (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
|
3720 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3721 (symbol-value index-list))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3722 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3723 (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
|
3724 (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
|
3725 (defun texinfo-index-defcv (parsed-args) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3726 ;; 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
|
3727 ;; `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
|
3728 (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
|
3729 (set index-list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3730 (cons |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3731 ;; 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
|
3732 (list |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3733 (format "%s of %s" |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3734 (car (cdr (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3735 (car (cdr parsed-args))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3736 texinfo-last-node |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3737 ;; 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
|
3738 (if texinfo-last-node-pos |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3739 (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
|
3740 1)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3741 (symbol-value index-list))))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3742 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3743 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3744 ;;; Properties for definitions |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3745 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3746 ;; Each definition command has six properties: |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3747 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3748 ;; 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
|
3749 ;; 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
|
3750 ;; 3. texinfo-format formatting command |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3751 ;; 4. texinfo-end end formatting command |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3752 ;; 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
|
3753 ;; 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
|
3754 ;; |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3755 ;; 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
|
3756 ;; and subsequent header lines. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3757 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3758 ;; 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
|
3759 ;; are listed just before the appropriate formatting and indexing commands. |
189 | 3760 |
3761 (put 'deffn 'texinfo-format 'texinfo-format-defun) | |
3762 (put 'deffnx 'texinfo-format 'texinfo-format-defunx) | |
3763 (put 'deffn 'texinfo-end 'texinfo-end-defun) | |
3764 (put 'deffn 'texinfo-defun-type '('deffn-type nil)) | |
3765 (put 'deffnx 'texinfo-defun-type '('deffn-type nil)) | |
3766 (put 'deffn 'texinfo-defun-index 'texinfo-findex) | |
3767 (put 'deffnx 'texinfo-defun-index 'texinfo-findex) | |
3768 | |
3769 (put 'defun 'texinfo-format 'texinfo-format-defun) | |
3770 (put 'defunx 'texinfo-format 'texinfo-format-defunx) | |
3771 (put 'defun 'texinfo-end 'texinfo-end-defun) | |
3772 (put 'defun 'texinfo-defun-type '('defun-type "Function")) | |
3773 (put 'defunx 'texinfo-defun-type '('defun-type "Function")) | |
3774 (put 'defun 'texinfo-defun-index 'texinfo-findex) | |
3775 (put 'defunx 'texinfo-defun-index 'texinfo-findex) | |
3776 | |
3777 (put 'defmac 'texinfo-format 'texinfo-format-defun) | |
3778 (put 'defmacx 'texinfo-format 'texinfo-format-defunx) | |
3779 (put 'defmac 'texinfo-end 'texinfo-end-defun) | |
3780 (put 'defmac 'texinfo-defun-type '('defun-type "Macro")) | |
3781 (put 'defmacx 'texinfo-defun-type '('defun-type "Macro")) | |
3782 (put 'defmac 'texinfo-defun-index 'texinfo-findex) | |
3783 (put 'defmacx 'texinfo-defun-index 'texinfo-findex) | |
3784 | |
3785 (put 'defspec 'texinfo-format 'texinfo-format-defun) | |
3786 (put 'defspecx 'texinfo-format 'texinfo-format-defunx) | |
3787 (put 'defspec 'texinfo-end 'texinfo-end-defun) | |
3788 (put 'defspec 'texinfo-defun-type '('defun-type "Special form")) | |
3789 (put 'defspecx 'texinfo-defun-type '('defun-type "Special form")) | |
3790 (put 'defspec 'texinfo-defun-index 'texinfo-findex) | |
3791 (put 'defspecx 'texinfo-defun-index 'texinfo-findex) | |
3792 | |
3793 (put 'defvr 'texinfo-format 'texinfo-format-defun) | |
3794 (put 'defvrx 'texinfo-format 'texinfo-format-defunx) | |
3795 (put 'defvr 'texinfo-end 'texinfo-end-defun) | |
3796 (put 'defvr 'texinfo-defun-type '('deffn-type nil)) | |
3797 (put 'defvrx 'texinfo-defun-type '('deffn-type nil)) | |
3798 (put 'defvr 'texinfo-defun-index 'texinfo-vindex) | |
3799 (put 'defvrx 'texinfo-defun-index 'texinfo-vindex) | |
3800 | |
3801 (put 'defvar 'texinfo-format 'texinfo-format-defun) | |
3802 (put 'defvarx 'texinfo-format 'texinfo-format-defunx) | |
3803 (put 'defvar 'texinfo-end 'texinfo-end-defun) | |
3804 (put 'defvar 'texinfo-defun-type '('defun-type "Variable")) | |
3805 (put 'defvarx 'texinfo-defun-type '('defun-type "Variable")) | |
3806 (put 'defvar 'texinfo-defun-index 'texinfo-vindex) | |
3807 (put 'defvarx 'texinfo-defun-index 'texinfo-vindex) | |
3808 | |
3809 (put 'defconst 'texinfo-format 'texinfo-format-defun) | |
3810 (put 'defconstx 'texinfo-format 'texinfo-format-defunx) | |
3811 (put 'defconst 'texinfo-end 'texinfo-end-defun) | |
3812 (put 'defconst 'texinfo-defun-type '('defun-type "Constant")) | |
3813 (put 'defconstx 'texinfo-defun-type '('defun-type "Constant")) | |
3814 (put 'defconst 'texinfo-defun-index 'texinfo-vindex) | |
3815 (put 'defconstx 'texinfo-defun-index 'texinfo-vindex) | |
3816 | |
3817 (put 'defcmd 'texinfo-format 'texinfo-format-defun) | |
3818 (put 'defcmdx 'texinfo-format 'texinfo-format-defunx) | |
3819 (put 'defcmd 'texinfo-end 'texinfo-end-defun) | |
3820 (put 'defcmd 'texinfo-defun-type '('defun-type "Command")) | |
3821 (put 'defcmdx 'texinfo-defun-type '('defun-type "Command")) | |
3822 (put 'defcmd 'texinfo-defun-index 'texinfo-findex) | |
3823 (put 'defcmdx 'texinfo-defun-index 'texinfo-findex) | |
3824 | |
3825 (put 'defopt 'texinfo-format 'texinfo-format-defun) | |
3826 (put 'defoptx 'texinfo-format 'texinfo-format-defunx) | |
3827 (put 'defopt 'texinfo-end 'texinfo-end-defun) | |
3828 (put 'defopt 'texinfo-defun-type '('defun-type "User Option")) | |
3829 (put 'defoptx 'texinfo-defun-type '('defun-type "User Option")) | |
3830 (put 'defopt 'texinfo-defun-index 'texinfo-vindex) | |
3831 (put 'defoptx 'texinfo-defun-index 'texinfo-vindex) | |
3832 | |
3833 (put 'deftp 'texinfo-format 'texinfo-format-defun) | |
3834 (put 'deftpx 'texinfo-format 'texinfo-format-defunx) | |
3835 (put 'deftp 'texinfo-end 'texinfo-end-defun) | |
3836 (put 'deftp 'texinfo-defun-type '('deftp-type nil)) | |
3837 (put 'deftpx 'texinfo-defun-type '('deftp-type nil)) | |
3838 (put 'deftp 'texinfo-defun-index 'texinfo-tindex) | |
3839 (put 'deftpx 'texinfo-defun-index 'texinfo-tindex) | |
3840 | |
3841 ;;; Object-oriented stuff is a little hairier. | |
3842 | |
3843 (put 'defop 'texinfo-format 'texinfo-format-defun) | |
3844 (put 'defopx 'texinfo-format 'texinfo-format-defunx) | |
3845 (put 'defop 'texinfo-end 'texinfo-end-defun) | |
3846 (put 'defop 'texinfo-defun-type '('defop-type nil)) | |
3847 (put 'defopx 'texinfo-defun-type '('defop-type nil)) | |
3848 (put 'defop 'texinfo-defun-index 'texinfo-findex) | |
3849 (put 'defopx 'texinfo-defun-index 'texinfo-findex) | |
3850 | |
3851 (put 'defmethod 'texinfo-format 'texinfo-format-defun) | |
3852 (put 'defmethodx 'texinfo-format 'texinfo-format-defunx) | |
3853 (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
|
3854 (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
|
3855 (put 'defmethodx 'texinfo-defun-type '('defmethod-type "Method")) |
189 | 3856 (put 'defmethod 'texinfo-defun-index 'texinfo-findex) |
3857 (put 'defmethodx 'texinfo-defun-index 'texinfo-findex) | |
3858 | |
3859 (put 'defcv 'texinfo-format 'texinfo-format-defun) | |
3860 (put 'defcvx 'texinfo-format 'texinfo-format-defunx) | |
3861 (put 'defcv 'texinfo-end 'texinfo-end-defun) | |
3862 (put 'defcv 'texinfo-defun-type '('defop-type nil)) | |
3863 (put 'defcvx 'texinfo-defun-type '('defop-type nil)) | |
3864 (put 'defcv 'texinfo-defun-index 'texinfo-vindex) | |
3865 (put 'defcvx 'texinfo-defun-index 'texinfo-vindex) | |
3866 | |
3867 (put 'defivar 'texinfo-format 'texinfo-format-defun) | |
3868 (put 'defivarx 'texinfo-format 'texinfo-format-defunx) | |
3869 (put 'defivar 'texinfo-end 'texinfo-end-defun) | |
3870 (put 'defivar 'texinfo-defun-type '('defmethod-type "Instance variable")) | |
3871 (put 'defivarx 'texinfo-defun-type '('defmethod-type "Instance variable")) | |
3872 (put 'defivar 'texinfo-defun-index 'texinfo-vindex) | |
3873 (put 'defivarx 'texinfo-defun-index 'texinfo-vindex) | |
3874 | |
3875 ;;; Typed functions and variables | |
3876 | |
3877 (put 'deftypefn 'texinfo-format 'texinfo-format-defun) | |
3878 (put 'deftypefnx 'texinfo-format 'texinfo-format-defunx) | |
3879 (put 'deftypefn 'texinfo-end 'texinfo-end-defun) | |
3880 (put 'deftypefn 'texinfo-defun-type '('deftypefn-type nil)) | |
3881 (put 'deftypefnx 'texinfo-defun-type '('deftypefn-type nil)) | |
3882 (put 'deftypefn 'texinfo-defun-index 'texinfo-findex) | |
3883 (put 'deftypefnx 'texinfo-defun-index 'texinfo-findex) | |
3884 | |
3885 (put 'deftypefun 'texinfo-format 'texinfo-format-defun) | |
3886 (put 'deftypefunx 'texinfo-format 'texinfo-format-defunx) | |
3887 (put 'deftypefun 'texinfo-end 'texinfo-end-defun) | |
3888 (put 'deftypefun 'texinfo-defun-type '('deftypefun-type "Function")) | |
3889 (put 'deftypefunx 'texinfo-defun-type '('deftypefun-type "Function")) | |
3890 (put 'deftypefun 'texinfo-defun-index 'texinfo-findex) | |
3891 (put 'deftypefunx 'texinfo-defun-index 'texinfo-findex) | |
3892 | |
3893 (put 'deftypevr 'texinfo-format 'texinfo-format-defun) | |
3894 (put 'deftypevrx 'texinfo-format 'texinfo-format-defunx) | |
3895 (put 'deftypevr 'texinfo-end 'texinfo-end-defun) | |
3896 (put 'deftypevr 'texinfo-defun-type '('deftypefn-type nil)) | |
3897 (put 'deftypevrx 'texinfo-defun-type '('deftypefn-type nil)) | |
3898 (put 'deftypevr 'texinfo-defun-index 'texinfo-vindex) | |
3899 (put 'deftypevrx 'texinfo-defun-index 'texinfo-vindex) | |
3900 | |
3901 (put 'deftypevar 'texinfo-format 'texinfo-format-defun) | |
3902 (put 'deftypevarx 'texinfo-format 'texinfo-format-defunx) | |
3903 (put 'deftypevar 'texinfo-end 'texinfo-end-defun) | |
3904 (put 'deftypevar 'texinfo-defun-type '('deftypevar-type "Variable")) | |
3905 (put 'deftypevarx 'texinfo-defun-type '('deftypevar-type "Variable")) | |
3906 (put 'deftypevar 'texinfo-defun-index 'texinfo-vindex) | |
3907 (put 'deftypevarx 'texinfo-defun-index 'texinfo-vindex) | |
3908 | |
3909 | |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3910 ;;; @set, @clear, @ifset, @ifclear |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3911 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3912 ;; 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
|
3913 ;; 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
|
3914 ;; @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
|
3915 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3916 ;; 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
|
3917 ;; 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
|
3918 ;; @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
|
3919 ;; is the opposite of @ifset. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3920 |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3921 ;; If a flag is set to a string with @set FLAG, |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3922 ;; replace @value{FLAG} with the string. |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3923 ;; If a flag with a value is cleared, |
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3924 ;; @value{FLAG} is invalid, |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3925 ;; 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
|
3926 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3927 (put 'clear 'texinfo-format 'texinfo-clear) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3928 (defun texinfo-clear () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3929 "Clear the value of the flag." |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3930 (let* ((arg (texinfo-parse-arg-discard)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3931 (flag (car (read-from-string arg))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3932 (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
|
3933 (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
|
3934 (put flag 'texinfo-set-value ""))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3935 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3936 (put 'set 'texinfo-format 'texinfo-set) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3937 (defun texinfo-set () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3938 "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
|
3939 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
|
3940 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
|
3941 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
|
3942 (let* ((arg (texinfo-parse-arg-discard)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3943 (flag (car (read-from-string arg))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3944 (value (substring arg (cdr (read-from-string arg))))) |
37538
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
3945 (if (string-match "^[ \t]+" value) |
92c065fa43f6
(texinfo-format-parse-args): Don't
Gerd Moellmann <gerd@gnu.org>
parents:
36300
diff
changeset
|
3946 (setq value (substring value (match-end 0)))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3947 (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
|
3948 (put flag 'texinfo-set-value value))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3949 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3950 (put 'value 'texinfo-format 'texinfo-value) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3951 (defun texinfo-value () |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3952 "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
|
3953 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
|
3954 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
|
3955 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
|
3956 (let ((arg (texinfo-parse-arg-discard))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3957 (cond ((and |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3958 (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
|
3959 'flag-set) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3960 (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
|
3961 (insert (get (car (read-from-string arg)) 'texinfo-set-value))) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3962 ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3963 'flag-cleared) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3964 (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
|
3965 ((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
|
3966 (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
|
3967 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3968 (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
|
3969 (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
|
3970 (defun texinfo-if-set () |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
3971 "If set, continue formatting; else do not format region up to @end ifset." |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3972 (let ((arg (texinfo-parse-arg-discard))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3973 (cond |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3974 ((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
|
3975 'flag-set) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3976 ;; 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
|
3977 ()) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3978 ((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
|
3979 'flag-cleared) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3980 ;; 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
|
3981 (delete-region texinfo-command-start |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
3982 (re-search-forward "@end ifset[ \t]*\n"))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3983 ((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
|
3984 nil) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
3985 ;; In this case flag is neither set nor cleared. |
5118
eec34ce70181
(texinfo-if-set, texinfo-if-clear): Act appropriately when flat neither
Robert J. Chassell <bob@rattlesnake.com>
parents:
4982
diff
changeset
|
3986 ;; 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
|
3987 ())))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3988 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3989 (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
|
3990 (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
|
3991 (defun texinfo-if-clear () |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
3992 "If clear, continue formatting; if set, do not format up to @end ifset." |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3993 (let ((arg (texinfo-parse-arg-discard))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3994 (cond |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3995 ((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
|
3996 'flag-set) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
3997 ;; 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
|
3998 (delete-region texinfo-command-start |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
3999 (re-search-forward "@end ifclear[ \t]*\n"))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4000 ((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
|
4001 'flag-cleared) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4002 ;; 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
|
4003 ()) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4004 ((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
|
4005 nil) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
48932
diff
changeset
|
4006 ;; In this case flag is neither set nor cleared. |
5118
eec34ce70181
(texinfo-if-set, texinfo-if-clear): Act appropriately when flat neither
Robert J. Chassell <bob@rattlesnake.com>
parents:
4982
diff
changeset
|
4007 ;; 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
|
4008 ())))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4009 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4010 ;;; @ifeq |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4011 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4012 (put 'ifeq 'texinfo-format 'texinfo-format-ifeq) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4013 (defun texinfo-format-ifeq () |
17939
533508e3c425
(texinfo-extra-inter-column-width):
Richard M. Stallman <rms@gnu.org>
parents:
17938
diff
changeset
|
4014 "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
|
4015 Otherwise produces no output. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4016 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4017 Thus: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4018 @ifeq{ arg1 , arg1 , @code{foo}} bar |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4019 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4020 ==> `foo' bar. |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4021 but |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4022 @ifeq{ arg1 , arg2 , @code{foo}} bar |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4023 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4024 ==> bar |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4025 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4026 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
|
4027 the @ifeq command." |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4028 ;; 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
|
4029 (goto-char texinfo-command-end) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4030 (let* ((case-fold-search t) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4031 (stop (save-excursion (forward-sexp 1) (point))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4032 start end |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4033 ;; @ifeq{arg1, arg2, @command{optional-args}} |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4034 (arg1 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4035 (progn |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4036 (forward-char 1) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4037 (skip-chars-forward " ") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4038 (setq start (point)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4039 (search-forward "," stop t) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4040 (skip-chars-backward ", ") |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
4041 (buffer-substring-no-properties start (point)))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4042 (arg2 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4043 (progn |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4044 (search-forward "," stop t) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4045 (skip-chars-forward " ") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4046 (setq start (point)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4047 (search-forward "," stop t) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4048 (skip-chars-backward ", ") |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
4049 (buffer-substring-no-properties start (point)))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4050 (texinfo-command |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4051 (progn |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4052 (search-forward "," stop t) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4053 (skip-chars-forward " ") |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4054 (setq start (point)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4055 (goto-char (1- stop)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4056 (skip-chars-backward " ") |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
4057 (buffer-substring-no-properties start (point))))) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4058 (delete-region texinfo-command-start stop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4059 (if (equal arg1 arg2) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4060 (insert texinfo-command)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4061 (goto-char texinfo-command-start))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4062 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4063 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4064 ;;; Process included files: `@include' command |
189 | 4065 |
4066 ;; Updated 19 October 1990 | |
4067 ;; In the original version, include files were ignored by Info but | |
4068 ;; incorporated in to the printed manual. To make references to the | |
4069 ;; included file, the Texinfo source file has to refer to the included | |
14040 | 4070 ;; files using the `(filename)nodename' format for referring to other |
189 | 4071 ;; Info files. Also, the included files had to be formatted on their |
4072 ;; own. It was just like they were another file. | |
4073 | |
4074 ;; Currently, include files are inserted into the buffer that is | |
4075 ;; formatted for Info. If large, the resulting info file is split and | |
4076 ;; tagified. For current include files to work, the master menu must | |
4077 ;; refer to all the nodes, and the highest level nodes in the include | |
4078 ;; files must have the correct next, prev, and up pointers. | |
4079 | |
4080 ;; 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
|
4081 ;; but not an `\input texinfo' line. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4082 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4083 ;; Updated 24 March 1993 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4084 ;; 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
|
4085 ;; 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
|
4086 ;; 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
|
4087 ;; is treated like other @-commands. |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4088 (put 'include 'texinfo-format 'texinfo-format-noop) |
189 | 4089 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4090 ;; Original definition: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4091 ;; (defun texinfo-format-include () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4092 ;; (let ((filename (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4093 ;; (default-directory input-directory) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4094 ;; subindex) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4095 ;; (setq subindex |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4096 ;; (save-excursion |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4097 ;; (progn (find-file |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4098 ;; (cond ((file-readable-p (concat filename ".texinfo")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4099 ;; (concat filename ".texinfo")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4100 ;; ((file-readable-p (concat filename ".texi")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4101 ;; (concat filename ".texi")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4102 ;; ((file-readable-p (concat filename ".tex")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4103 ;; (concat filename ".tex")) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4104 ;; ((file-readable-p filename) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4105 ;; filename) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4106 ;; (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
|
4107 ;; filename)))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4108 ;; (texinfo-format-buffer-1)))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4109 ;; (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
|
4110 ;; (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
|
4111 ;; (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
|
4112 ;; (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
|
4113 ;; (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
|
4114 ;; (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
|
4115 ;; |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4116 ;;(defun texinfo-subindex (indexvar file content) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4117 ;; (set indexvar (cons (list 'recurse file content) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4118 ;; (symbol-value indexvar)))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4119 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4120 ;; Second definition: |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4121 ;; (put 'include 'texinfo-format 'texinfo-format-include) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4122 ;; (defun texinfo-format-include () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4123 ;; (let ((filename (concat input-directory |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4124 ;; (texinfo-parse-arg-discard))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4125 ;; (default-directory input-directory)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4126 ;; (message "Reading: %s" filename) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4127 ;; (save-excursion |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4128 ;; (save-restriction |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4129 ;; (narrow-to-region |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4130 ;; (point) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4131 ;; (+ (point) (car (cdr (insert-file-contents filename))))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4132 ;; (goto-char (point-min)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4133 ;; (texinfo-append-refill) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4134 ;; (texinfo-format-convert (point-min) (point-max)))) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4135 ;; (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
|
4136 ;; )) |
189 | 4137 |
4138 | |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4139 ;;; 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
|
4140 ;; 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
|
4141 |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4142 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4143 ;;; 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
|
4144 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4145 (put 'b 'texinfo-format 'texinfo-format-noop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4146 (put 'i 'texinfo-format 'texinfo-format-noop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4147 (put 'r 'texinfo-format 'texinfo-format-noop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4148 (put 't 'texinfo-format 'texinfo-format-noop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4149 (put 'w 'texinfo-format 'texinfo-format-noop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4150 (put 'asis 'texinfo-format 'texinfo-format-noop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4151 (put 'dmn 'texinfo-format 'texinfo-format-noop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4152 (put 'math 'texinfo-format 'texinfo-format-noop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4153 (put 'titlefont 'texinfo-format 'texinfo-format-noop) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4154 (defun texinfo-format-noop () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4155 (insert (texinfo-parse-arg-discard)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4156 (goto-char texinfo-command-start)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4157 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4158 ;; @hyphenation command discards an argument within braces |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4159 (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
|
4160 (defun texinfo-discard-command-and-arg () |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4161 "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
|
4162 (goto-char texinfo-command-end) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4163 (forward-list 1) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4164 (setq texinfo-command-end (point)) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4165 (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
|
4166 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4167 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4168 ;;; 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
|
4169 ;; 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
|
4170 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4171 (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
|
4172 (put 'smallbook 'texinfo-format 'texinfo-discard-line) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4173 (put 'finalout 'texinfo-format 'texinfo-discard-line) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4174 (put 'overfullrule 'texinfo-format 'texinfo-discard-line) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4175 (put 'smallbreak 'texinfo-format 'texinfo-discard-line) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4176 (put 'medbreak 'texinfo-format 'texinfo-discard-line) |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4177 (put 'bigbreak 'texinfo-format 'texinfo-discard-line) |
48063
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
4178 (put 'afourpaper 'texinfo-format 'texinfo-discard-line) |
48755
a4aa559a2dec
Fix typos found by TAKAHASHI Kaoru <kaoru@kaisei.org>.
Robert J. Chassell <bob@rattlesnake.com>
parents:
48697
diff
changeset
|
4179 (put 'afivepaper 'texinfo-format 'texinfo-discard-line) |
a4aa559a2dec
Fix typos found by TAKAHASHI Kaoru <kaoru@kaisei.org>.
Robert J. Chassell <bob@rattlesnake.com>
parents:
48697
diff
changeset
|
4180 (put 'afourlatex 'texinfo-format 'texinfo-discard-line) |
a4aa559a2dec
Fix typos found by TAKAHASHI Kaoru <kaoru@kaisei.org>.
Robert J. Chassell <bob@rattlesnake.com>
parents:
48697
diff
changeset
|
4181 (put 'afourwide 'texinfo-format 'texinfo-discard-line) |
17937
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4182 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4183 |
4a8e23659626
(texinfmt-version): New function and variable.
Richard M. Stallman <rms@gnu.org>
parents:
15985
diff
changeset
|
4184 ;;; 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
|
4185 |
189 | 4186 (put 'c 'texinfo-format 'texinfo-discard-line-with-args) |
4187 (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
|
4188 (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
|
4189 (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
|
4190 (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
|
4191 (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
|
4192 (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
|
4193 (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
|
4194 (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
|
4195 (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
|
4196 (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
|
4197 (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
|
4198 |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4199 ;; @novalidate suppresses cross-reference checking and auxiliary file |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4200 ;; 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
|
4201 ;; 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
|
4202 ;; is not invoked automatically, the @novalidate command is irrelevant |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4203 ;; and not supported by texinfmt.el |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4204 (put 'novalidate 'texinfo-format 'texinfo-discard-line-with-args) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4205 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4206 (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
|
4207 (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
|
4208 (put 'parindent 'texinfo-format 'texinfo-discard-line-with-args) |
189 | 4209 (put 'setchapternewpage 'texinfo-format 'texinfo-discard-line-with-args) |
4210 (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
|
4211 |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4212 (put 'setcontentsaftertitlepage |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4213 'texinfo-format 'texinfo-discard-line-with-args) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4214 (put 'setshortcontentsaftertitlepage |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4215 'texinfo-format 'texinfo-discard-line-with-args) |
c47e86637371
(texinfmt-version): Update version.
Richard M. Stallman <rms@gnu.org>
parents:
22661
diff
changeset
|
4216 |
189 | 4217 (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
|
4218 (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
|
4219 (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
|
4220 (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
|
4221 (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
|
4222 (put 'input 'texinfo-format 'texinfo-discard-line-with-args) |
189 | 4223 |
48063
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
4224 (put 'documentlanguage 'texinfo-format 'texinfo-discard-line-with-args) |
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
4225 (put 'documentencoding 'texinfo-format 'texinfo-discard-line-with-args) |
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
4226 |
4cef5030d270
(texinfo-format-ifplaintext): New function.
Juanma Barranquero <lekktu@gmail.com>
parents:
43808
diff
changeset
|
4227 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4228 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4229 ;;; Some commands cannot be handled |
189 | 4230 |
4231 (defun texinfo-unsupported () | |
4232 (error "%s is not handled by texinfo" | |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
4233 (buffer-substring-no-properties texinfo-command-start texinfo-command-end))) |
189 | 4234 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4235 ;;; Batch formatting |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4236 |
189 | 4237 (defun batch-texinfo-format () |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
4238 "Run `texinfo-format-buffer' on the files remaining on the command line. |
73729
581994501499
(batch-texinfo-format): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
71781
diff
changeset
|
4239 Must be used only with -batch, and kills Emacs on completion. |
189 | 4240 Each file will be processed even if an error occurred previously. |
4241 For example, invoke | |
4242 \"emacs -batch -funcall batch-texinfo-format $docs/ ~/*.texinfo\"." | |
4243 (if (not noninteractive) | |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
4244 (error "batch-texinfo-format may only be used -batch")) |
189 | 4245 (let ((version-control t) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4246 (auto-save-default nil) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4247 (find-file-run-dired nil) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4248 (kept-old-versions 259259) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4249 (kept-new-versions 259259)) |
189 | 4250 (let ((error 0) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4251 file |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4252 (files ())) |
189 | 4253 (while command-line-args-left |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4254 (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
|
4255 (cond ((not (file-exists-p file)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4256 (message ">> %s does not exist!" file) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4257 (setq error 1 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4258 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
|
4259 ((file-directory-p file) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4260 (setq command-line-args-left |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4261 (nconc (directory-files file) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4262 (cdr command-line-args-left)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4263 (t |
81631
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
4264 (push file files) |
67d88e663c87
(texinfo-raisesections-alist, texinfo-lowersections-alist): Merge definition
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
4265 (setq command-line-args-left (cdr command-line-args-left))))) |
189 | 4266 (while files |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4267 (setq file (car files) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4268 files (cdr files)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4269 (condition-case err |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4270 (progn |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4271 (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
|
4272 (find-file file) |
4769
d1b5ca8f5493
(texinfo-format-region texinfo-format-buffer): Add ###autoload cookies.
Brian Fox <bfox@gnu.org>
parents:
4396
diff
changeset
|
4273 (buffer-disable-undo (current-buffer)) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4274 (set-buffer-modified-p nil) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4275 (texinfo-mode) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4276 (message "texinfo formatting %s..." file) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4277 (texinfo-format-buffer nil) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4278 (if (buffer-modified-p) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4279 (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
|
4280 (save-buffer)))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4281 (error |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4282 (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
|
4283 (message ">> point at") |
48518
0eb01081d9f5
(texinfo-format-separate-node): Handle node names with
Robert J. Chassell <bob@rattlesnake.com>
parents:
48063
diff
changeset
|
4284 (let ((s (buffer-substring-no-properties (point) |
49700
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
4285 (min (+ (point) 100) |
176bfa5ffebf
(texinfo-format-iftex, texinfo-format-ifhtml)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49599
diff
changeset
|
4286 (point-max)))) |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4287 (tem 0)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4288 (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
|
4289 (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
|
4290 "\n>> " |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4291 (substring s (match-end 0))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4292 tem (1+ tem))) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4293 (message ">> %s" s)) |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4294 (setq error 1)))) |
189 | 4295 (kill-emacs error)))) |
657
fec3f9a1e3e5
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
258
diff
changeset
|
4296 |
4396
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4297 |
0ab53cbfac0e
Installed the version from the Texinfo package.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
4298 ;;; Place `provide' at end of file. |
3456 | 4299 (provide 'texinfmt) |
4300 | |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38044
diff
changeset
|
4301 ;;; texinfmt.el ends here |