diff options
| -rw-r--r-- | ravi-init-cpp.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ravi-init-cpp.el b/ravi-init-cpp.el index 2d47008..1690a91 100644 --- a/ravi-init-cpp.el +++ b/ravi-init-cpp.el @@ -326,7 +326,9 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named (unless (looking-at "(") (message "Logic error; opening paren not found")) (when (looking-back "\\b\\(for\\|while\\|if\\|switch\\|catch\\)") (insert-char ?\s))) - (if (looking-at " ") (forward-char) (insert-char ?\s)) + (if (and (looking-at " ") (not (looking-at " )"))) + (forward-char) + (insert-char ?\s)) ) ) ((looking-back ")[[:space:]]*") |
