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