# HG changeset patch # User Micha¸«³l Cadilhac # Date 1189445148 0 # Node ID 7fda0653647011c47b82a0782760a58d6a113181 # Parent 81f5348502a39ee0dcdd8cc09ce8a92bd0a8f6ec (meta-indent-unfinished-line): Do not say that a `%' in a string is a comment-start. (meta-indent-previous-line): Fix style. diff -r 81f5348502a3 -r 7fda06536470 lisp/progmodes/meta-mode.el --- a/lisp/progmodes/meta-mode.el Mon Sep 10 14:21:31 2007 +0000 +++ b/lisp/progmodes/meta-mode.el Mon Sep 10 17:25:48 2007 +0000 @@ -652,15 +652,19 @@ ;; 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)