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
ebd3fa6b
Commit
ebd3fa6b
authored
Sep 10, 2007
by
Michaël Cadilhac
Browse files
(meta-indent-unfinished-line): Do not say that a `%' in a string is
a comment-start. (meta-indent-previous-line): Fix style.
parent
89c19c1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/progmodes/meta-mode.el
lisp/progmodes/meta-mode.el
+7
-3
No files found.
lisp/ChangeLog
View file @
ebd3fa6b
...
...
@@ -5,6 +5,8 @@
(meta-comment-indent, meta-indent-previous-line)
(meta-indent-unfinished-line, meta-beginning-of-defun)
(meta-end-of-defun, meta-common-initialization): Handle \f.
(meta-indent-unfinished-line): Do not handle a `%' in a string as
a comment-start.
* files.el (file-modes-char-to-who, file-modes-char-to-right)
(file-modes-rights-to-number): Auxiliary functions for symbolic to
...
...
lisp/progmodes/meta-mode.el
View file @
ebd3fa6b
...
...
@@ -652,15 +652,19 @@ If the list was changed, sort the list and remove duplicates first."
;; Ignore comments.
(
while
(
and
(
looking-at
comment-start
)
(
not
(
bobp
)))
(
skip-chars-backward
"\n\t\f "
)
(
if
(
not
(
bobp
))
(
move-to-column
(
current-indentation
)))))
(
when
(
not
(
bobp
))
(
move-to-column
(
current-indentation
)))))
(
defun
meta-indent-unfinished-line
()
"Tell if the current line of code ends with an unfinished expression."
(
save-excursion
(
end-of-line
)
;; Skip backward the comments.
(
while
(
search-backward
comment-start
(
point-at-bol
)
t
))
(
let
((
point-not-in-string
(
point
)))
(
while
(
search-backward
comment-start
(
point-at-bol
)
t
)
(
unless
(
meta-indent-in-string-p
)
(
setq
point-not-in-string
(
point
))))
(
goto-char
point-not-in-string
))
;; Search for the end of the previous expression.
(
if
(
search-backward
";"
(
point-at-bol
)
t
)
(
progn
(
while
(
and
(
meta-indent-in-string-p
)
...
...
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