Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
3c5a4839
Commit
3c5a4839
authored
Jan 20, 2014
by
Juri Linkov
Browse files
* lisp/indent.el (indent-line-to): Use backward-to-indentation
instead of back-to-indentation. Fixes: debbugs:16461
parent
21cf4545
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/indent.el
lisp/indent.el
+2
-2
No files found.
lisp/ChangeLog
View file @
3c5a4839
2014-01-20 Juri Linkov <juri@jurta.org>
* indent.el (indent-line-to): Use backward-to-indentation
instead of back-to-indentation. (Bug#16461)
2014-01-20 Paul Eggert <eggert@cs.ucla.edu>
Revert some of the CANNOT_DUMP fix (Bug#16494).
...
...
lisp/indent.el
View file @
3c5a4839
...
...
@@ -265,7 +265,7 @@ indentation by specifying a large negative ARG."
"Indent current line to COLUMN.
This function removes or adds spaces and tabs at beginning of line
only if necessary. It leaves point at end of indentation."
(
back-to-indentation
)
(
back
ward
-to-indentation
0
)
(
let
((
cur-col
(
current-column
)))
(
cond
((
<
cur-col
column
)
(
if
(
>=
(
-
column
(
*
(
/
cur-col
tab-width
)
tab-width
))
tab-width
)
...
...
@@ -274,7 +274,7 @@ only if necessary. It leaves point at end of indentation."
(
indent-to
column
))
((
>
cur-col
column
)
; too far right (after tab?)
(
delete-region
(
progn
(
move-to-column
column
t
)
(
point
))
(
progn
(
back-to-indentation
)
(
point
)))))))
(
progn
(
back
ward
-to-indentation
0
)
(
point
)))))))
(
defun
current-left-margin
()
"Return the left margin to use for this line.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment