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
9f25c0d2
Commit
9f25c0d2
authored
Feb 11, 2007
by
Richard M. Stallman
Browse files
(indent-sexp): Clean up termination condition -- don't fail to stop at endpos.
parent
531309eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
lisp/ChangeLog
lisp/ChangeLog
+8
-0
lisp/emacs-lisp/lisp-mode.el
lisp/emacs-lisp/lisp-mode.el
+12
-6
No files found.
lisp/ChangeLog
View file @
9f25c0d2
2007-02-11 Richard Stallman <rms@gnu.org>
* loadhist.el (unload-feature): Handle (t . SYMBOL) entries
in load history.
* emacs-lisp/lisp-mode.el (indent-sexp): Clean up termination
condition -- don't fail to stop at endpos.
2007-02-11 Carsten Dominik <dominik@science.uva.nl>
* textmodes/org.el (org-agenda-get-todos)
lisp/emacs-lisp/lisp-mode.el
View file @
9f25c0d2
...
...
@@ -1130,19 +1130,25 @@ ENDPOS is encountered."
(
make-list
(
-
next-depth
)
nil
))
last-depth
(
-
last-depth
next-depth
)
next-depth
0
)))
(
or
outer-loop-done
endpos
(
setq
outer-loop-done
(
<=
next-depth
0
)))
(
if
outer-loop-done
(
forward-line
1
)
(
forward-line
1
)
;; Decide whether to exit.
(
if
endpos
;; If we have already reached the specified end,
;; give up and do not reindent this line.
(
if
(
<=
endpos
(
point
))
(
setq
outer-loop-done
t
))
;; If no specified end, we are done if we have finished one sexp.
(
if
(
<=
next-depth
0
)
(
setq
outer-loop-done
t
)))
(
unless
outer-loop-done
(
while
(
>
last-depth
next-depth
)
(
setq
indent-stack
(
cdr
indent-stack
)
last-depth
(
1-
last-depth
)))
(
while
(
<
last-depth
next-depth
)
(
setq
indent-stack
(
cons
nil
indent-stack
)
last-depth
(
1+
last-depth
)))
;; Now
go to
the next line
and indent it
according
;; Now
indent
the next line according
;; to what we learned from parsing the previous one.
(
forward-line
1
)
(
setq
bol
(
point
))
(
skip-chars-forward
" \t"
)
;; But not if the line is blank, or just a comment
...
...
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