aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert J. Chassell2006-07-07 16:36:29 +0000
committerRobert J. Chassell2006-07-07 16:36:29 +0000
commit1a3e2c5912f4affb4d4ec10ef37a5d0473ec181e (patch)
tree93a2479139ad4f09de059e1eed3879b22e562538
parente0b4be6cc0e9ca0ff1e5fe8c8e3c042cccdc76e7 (diff)
downloademacs-1a3e2c5912f4affb4d4ec10ef37a5d0473ec181e.tar.gz
emacs-1a3e2c5912f4affb4d4ec10ef37a5d0473ec181e.zip
* textmodes/texinfmt.el (texinfo-format-separate-node):
Insert a string before point, which fits documentation, not after. (texinfo-multitable-item): In a multitable row, insert any additional needed @tabs and spaces.
-rw-r--r--lisp/textmodes/texinfmt.el17
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 8794ebddc15..95c1cba3b7e 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -1555,7 +1555,9 @@ The node is constructed automatically."
1555 " Node: " node-name "-Footnotes, Up: " node-name "\n") 1555 " Node: " node-name "-Footnotes, Up: " node-name "\n")
1556 (setq start (point)) 1556 (setq start (point))
1557 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg)) 1557 (insert (format "\n(%d) %s\n" texinfo-footnote-number arg))
1558 (fill-region start (point)))))) 1558 (narrow-to-region (save-excursion (goto-char start) (point)) (point))
1559 (fill-region (point-min) (point-max))
1560 (widen)))))
1559 1561
1560(defun texinfo-format-end-node () 1562(defun texinfo-format-end-node ()
1561 "Format footnote in the End of node style, with notes at end of node." 1563 "Format footnote in the End of node style, with notes at end of node."
@@ -2118,11 +2120,18 @@ This command is executed when texinfmt sees @item inside @multitable."
2118 (insert unformated-row) 2120 (insert unformated-row)
2119 (goto-char (point-min)) 2121 (goto-char (point-min))
2120;; 1. Check for correct number of @tab in line. 2122;; 1. Check for correct number of @tab in line.
2121 (let ((tab-number 1)) ; one @tab between two columns 2123 (let ((tab-number 1)) ; one @tab between two columns
2122 (while (search-forward "@tab" nil t) 2124 (while (search-forward "@tab" nil t)
2123 (setq tab-number (1+ tab-number))) 2125 (setq tab-number (1+ tab-number)))
2124 (if (/= tab-number (length table-widths)) 2126 (let ((needed-tabs (- (length table-widths) tab-number)))
2125 (error "Wrong number of @tab's in a @multitable row"))) 2127 (when (> needed-tabs 0)
2128 (goto-char (point-min))
2129 (end-of-line)
2130 (while (> needed-tabs 0)
2131 (insert "@w{ }\n@tab")
2132 (setq needed-tabs (1- needed-tabs))
2133 (message
2134 "Added @tabs and empty spaces to a @multitable row")))))
2126 (goto-char (point-min)) 2135 (goto-char (point-min))
2127;; 2. Format each cell, and copy to a rectangle 2136;; 2. Format each cell, and copy to a rectangle
2128 ;; buffer looks like this: A1 @tab A2 @tab A3 2137 ;; buffer looks like this: A1 @tab A2 @tab A3