diff options
| author | Richard M. Stallman | 1995-04-13 17:04:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-04-13 17:04:57 +0000 |
| commit | 7be313ea3b46a5877b0f2b2ee6639f1c3d660fef (patch) | |
| tree | 48415c0f01e0f5d8491a59edec6f129b532787f0 /lisp/tabify.el | |
| parent | 7af318194c2b9ade7c15e0e7f427041388e4a483 (diff) | |
| download | emacs-7be313ea3b46a5877b0f2b2ee6639f1c3d660fef.tar.gz emacs-7be313ea3b46a5877b0f2b2ee6639f1c3d660fef.zip | |
(tabify): Include entire first line in narrowing.
Diffstat (limited to 'lisp/tabify.el')
| -rw-r--r-- | lisp/tabify.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/tabify.el b/lisp/tabify.el index aab939550c2..62d50aa0331 100644 --- a/lisp/tabify.el +++ b/lisp/tabify.el | |||
| @@ -57,7 +57,11 @@ The variable `tab-width' controls the spacing of tab stops." | |||
| 57 | (interactive "r") | 57 | (interactive "r") |
| 58 | (save-excursion | 58 | (save-excursion |
| 59 | (save-restriction | 59 | (save-restriction |
| 60 | (narrow-to-region start end) | 60 | ;; Include the beginning of the line in the narrowing |
| 61 | ;; since otherwise it will throw off current-column. | ||
| 62 | (goto-char start) | ||
| 63 | (beginning-of-line) | ||
| 64 | (narrow-to-region (point) end) | ||
| 61 | (goto-char start) | 65 | (goto-char start) |
| 62 | (while (re-search-forward "[ \t][ \t][ \t]*" nil t) | 66 | (while (re-search-forward "[ \t][ \t][ \t]*" nil t) |
| 63 | (let ((column (current-column)) | 67 | (let ((column (current-column)) |