diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-06-28 21:25:06 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-06-28 21:25:06 +0000 |
commit | cf67e20546a6963186caed6f636e8746567d1f02 (patch) | |
tree | 237bd27eeb7afd07b27cf31be5866e1f1e77f38d /lisp | |
parent | c0c3d9c990f2baff609ce30d4ba79f7ac7ec98ac (diff) | |
download | emacs-cf67e20546a6963186caed6f636e8746567d1f02.tar.gz |
(electric-c++-terminator): Fix logic for handling colon.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/cplus-md.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/progmodes/cplus-md.el b/lisp/progmodes/cplus-md.el index 647f08ba493..8c93118d91b 100644 --- a/lisp/progmodes/cplus-md.el +++ b/lisp/progmodes/cplus-md.el @@ -301,15 +301,15 @@ no args if that value is non-nil." ;; So quickly rule out most other uses of colon ;; and do no indentation for them. (and (eq last-command-char ?:) - (not (looking-at "case[ \t]")) - (save-excursion - (forward-word 1) - (skip-chars-forward " \t") - (< (point) end)) - ;; Do re-indent double colons - (save-excursion - (end-of-line 1) - (looking-at ":"))) + (or (not (or (looking-at "case[ \t]") + (save-excursion + (forward-word 1) + (skip-chars-forward " \t") + (>= (point) end)))) + ;; Do re-indent double colons + (save-excursion + (end-of-line 1) + (looking-at ":")))) (progn (beginning-of-defun) (let ((pps (parse-partial-sexp (point) end))) |