Fix latex-tsv-to-table
This commit is contained in:
parent
6ff2c8e007
commit
eb3b61a9ef
@ -157,12 +157,12 @@
|
|||||||
(defun latex-tsv-to-table ()
|
(defun latex-tsv-to-table ()
|
||||||
"Converts tab-seperated-values to a LaTeX table."
|
"Converts tab-seperated-values to a LaTeX table."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((beg (region-beginning)) (lines (count-lines (region-beginning) (region-end))))
|
(let ((beg (region-beginning)) (end-line (line-number-at-pos (region-end))))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char beg)
|
(goto-line end-line)
|
||||||
(indent-region beg (point))
|
(indent-region beg (point-at-eol))
|
||||||
(replace-regexp "\t" " & " nil beg (point))
|
(replace-regexp "\t" " & " nil beg (point-at-eol))
|
||||||
(replace-regexp "$" " \\\\\\\\" nil beg (point))
|
(replace-regexp "$" " \\\\\\\\" nil beg (point-at-eol))
|
||||||
(align beg (point))))))
|
(align beg (point))))))
|
||||||
(use-package fasd
|
(use-package fasd
|
||||||
:config
|
:config
|
||||||
|
Loading…
Reference in New Issue
Block a user