diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2014-05-27 14:56:10 (GMT) |
|---|---|---|
| committer | Ravikiran Rajagopal <aine.marina@gmail.com> | 2014-05-27 14:56:10 (GMT) |
| commit | bd580c768b7a7eaf9cf5ad2da7a3d7d58ba11834 (patch) | |
| tree | abae81c31abf262801d99c91ef8ca5f56427eb17 | |
| parent | 6f892cb95981d78d72cbecbc4b2b794afbde65af (diff) | |
| download | dotemacs-bd580c768b7a7eaf9cf5ad2da7a3d7d58ba11834.zip dotemacs-bd580c768b7a7eaf9cf5ad2da7a3d7d58ba11834.tar.gz dotemacs-bd580c768b7a7eaf9cf5ad2da7a3d7d58ba11834.tar.bz2 | |
Handle nested parantheses
| -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:]]*") |
