Mercurial > emacs
comparison lisp/progmodes/cc-cmds.el @ 77041:831765c54f39
(c-electric-paren): clean-up space-before-funcall: only insert space when on
identifier, etc. Patch by David Hansen.
----------------------------------------------------------------------
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Sat, 07 Apr 2007 19:50:06 +0000 |
parents | 72a276765477 |
children | 93765c8a2ed2 |
comparison
equal
deleted
inserted
replaced
77040:175f158c7c2f | 77041:831765c54f39 |
---|---|
1260 (eq last-command-char ?\() | 1260 (eq last-command-char ?\() |
1261 (save-excursion | 1261 (save-excursion |
1262 (backward-char) | 1262 (backward-char) |
1263 (skip-chars-backward " \t") | 1263 (skip-chars-backward " \t") |
1264 (setq beg (point)) | 1264 (setq beg (point)) |
1265 (c-save-buffer-state () (c-on-identifier)) | 1265 (and (c-save-buffer-state () (c-on-identifier)) |
1266 ;; Don't add a space into #define FOO().... | 1266 ;; Don't add a space into #define FOO().... |
1267 (not (and (c-beginning-of-macro) | 1267 (not (and (c-beginning-of-macro) |
1268 (c-forward-over-cpp-define-id) | 1268 (c-forward-over-cpp-define-id) |
1269 (eq (point) beg))))) | 1269 (eq (point) beg)))))) |
1270 (save-excursion | 1270 (save-excursion |
1271 (delete-region beg end) | 1271 (delete-region beg end) |
1272 (goto-char beg) | 1272 (goto-char beg) |
1273 (insert ?\ ))) | 1273 (insert ?\ ))) |
1274 | 1274 |