Changeset 4284
- Timestamp:
- 10/23/09 14:53:10 (5 weeks ago)
- Files:
-
- 1 modified
-
trunk/Fortify/fortify.el (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Fortify/fortify.el
r4282 r4284 1771 1771 ;; If we fail, we simply hand back the string with the trailing backquotes removed. 1772 1772 (goto-char *fortify-region-start*) 1773 (cond ((search-forward str *fortify-region-end* t) 1774 (newfortify-region (- (point) (length str)) (- (point) 1))) 1775 (t (substring str 0 (+ 1 (or (position-if '(lambda (c) (not (= c ?\`))) str :from-end t) -1)))))) 1773 (let ((epos (+ 1 (or (position-if '(lambda (c) (not (= c ?\`))) str :from-end t) -1)))) 1774 (cond ((search-forward str *fortify-region-end* t) 1775 (newfortify-region (- (point) (length str)) (- (point) (- (length str) epos)))) 1776 (t (substring str 0 epos))))) 1776 1777 1777 1778 ;;; **************************************************************** … … 2202 2203 (push "" result) 2203 2204 (setq lns (cdr lns)) 2204 (while (and lns 2205 (or (not (string= (car lns) "}}}")) 2206 (> (position ?\} (car lns)) begin-indent))) 2207 (push (concat "\\lind{" (number-to-string (or curindent 0)) "}{\\tt" 2205 (do ((prefix (concat "\\lind{" (number-to-string (or curindent 0)) "}") 2206 "\\hfil\\break\\null")) 2207 ((or (null lns) 2208 (and (string= (fortress-trim-string (car lns)) "}}}") 2209 (not (> (position ?\} (car lns)) begin-indent))))) 2210 (push (concat prefix 2211 "{\\tt " 2208 2212 (fortress-render-string-contents 2209 2213 (fortress-trim-string-right 2210 2214 (substring (car lns) 2211 (if (string= ( car lns) "}}}")2215 (if (string= (fortress-trim-string (car lns)) "}}}") 2212 2216 (+ begin-indent 1) 2213 2217 (min begin-indent 2214 (or (position-if '(lambda (c) (not (= c ?\s))) (car lns))2218 (or (position-if-not '(lambda (c) (= c ?\s)) (car lns)) 2215 2219 (length (car lns)))))))) 2216 2220 "}") 2217 2221 result) 2218 2222 (setq lns (cdr lns))) 2223 (push (concat (pop result) " \\\\") result) 2219 2224 (setq hrule-last nil) 2220 2225 (setq continue-previous-line nil) … … 2416 2421 (assert (every '(lambda (x) (= x (car pipes))) pipes)) 2417 2422 (let* ((ncols (- col-from-right)) 2418 (header-seps (cons ( make-string (- min-initial-pipe-count 1) ?\|) most-header-seps))2423 (header-seps (cons (if (> min-initial-pipe-count 1) (make-string (- min-initial-pipe-count 1) ?\|) "@{}") most-header-seps)) 2419 2424 (semi-final-rows (fortress-convert-neutral-table-cells row-types rows)) 2420 2425 (best-column-types (fortress-best-column-types row-types semi-final-rows ncols))

