Mercurial > emacs
diff lisp/progmodes/cc-cmds.el @ 101002:3b3c7e10cd97
Replace last-command-char with last-command-event.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 09 Jan 2009 04:15:52 +0000 |
parents | a9dc0e7c3f2b |
children | 0685234e527d |
line wrap: on
line diff
--- a/lisp/progmodes/cc-cmds.el Fri Jan 09 03:57:12 2009 +0000 +++ b/lisp/progmodes/cc-cmds.el Fri Jan 09 04:15:52 2009 +0000 @@ -476,7 +476,7 @@ (bolp (bolp))) (beginning-of-line) (delete-horizontal-space) - (insert last-command-char) + (insert last-command-event) (and (not bolp) (goto-char (- (point-max) pos))) ))) @@ -735,7 +735,7 @@ ;; `}': clean up empty defun braces (when (c-save-buffer-state () (and (memq 'empty-defun-braces c-cleanup-list) - (eq last-command-char ?\}) + (eq last-command-event ?\}) (c-intersect-lists '(defun-close class-close inline-close) syntax) (progn @@ -751,14 +751,14 @@ ;; `}': compact to a one-liner defun? (save-match-data (when - (and (eq last-command-char ?\}) + (and (eq last-command-event ?\}) (memq 'one-liner-defun c-cleanup-list) (c-intersect-lists '(defun-close) syntax) (c-try-one-liner)) (setq here (- (point-max) pos)))) ;; `{': clean up brace-else-brace and brace-elseif-brace - (when (eq last-command-char ?\{) + (when (eq last-command-event ?\{) (cond ((and (memq 'brace-else-brace c-cleanup-list) (re-search-backward @@ -812,7 +812,7 @@ )))) ;; blink the paren - (and (eq last-command-char ?\}) + (and (eq last-command-event ?\}) (not executing-kbd-macro) old-blink-paren (save-excursion @@ -849,7 +849,7 @@ (when (and (not arg) (eq literal 'c) (memq 'comment-close-slash c-cleanup-list) - (eq last-command-char ?/) + (eq last-command-event ?/) (looking-at (concat "[ \t]*\\(" (regexp-quote comment-end) "\\)?$")) ; (eq c-block-comment-ender "*/") ; C-style comments ALWAYS end in */ @@ -865,7 +865,7 @@ (setq indentp (and (not arg) c-syntactic-indentation c-electric-flag - (eq last-command-char ?/) + (eq last-command-event ?/) (eq (char-before) (if literal ?* ?/)))) (self-insert-command (prefix-numeric-value arg)) (if indentp @@ -939,10 +939,10 @@ (let ((pos (- (point-max) (point)))) (if (c-save-buffer-state () (and (or (and - (eq last-command-char ?,) + (eq last-command-event ?,) (memq 'list-close-comma c-cleanup-list)) (and - (eq last-command-char ?\;) + (eq last-command-event ?\;) (memq 'defun-close-semi c-cleanup-list))) (progn (forward-char -1) @@ -1097,7 +1097,7 @@ <-pos) (when c-recognize-<>-arglists - (if (eq last-command-char ?<) + (if (eq last-command-event ?<) (when (and (progn (backward-char) (= (point) @@ -1220,7 +1220,7 @@ ;; clean up brace-elseif-brace (when (and (memq 'brace-elseif-brace c-cleanup-list) - (eq last-command-char ?\() + (eq last-command-event ?\() (re-search-backward (concat "}" "\\([ \t\n]\\|\\\\\n\\)*" @@ -1238,7 +1238,7 @@ ;; clean up brace-catch-brace (when (and (memq 'brace-catch-brace c-cleanup-list) - (eq last-command-char ?\() + (eq last-command-event ?\() (re-search-backward (concat "}" "\\([ \t\n]\\|\\\\\n\\)*" @@ -1259,7 +1259,7 @@ ;; space-before-funcall clean-up? ((and (memq 'space-before-funcall c-cleanup-list) - (eq last-command-char ?\() + (eq last-command-event ?\() (save-excursion (backward-char) (skip-chars-backward " \t") @@ -1277,7 +1277,7 @@ ;; compact-empty-funcall clean-up? ((c-save-buffer-state () (and (memq 'compact-empty-funcall c-cleanup-list) - (eq last-command-char ?\)) + (eq last-command-event ?\)) (save-excursion (c-safe (backward-char 2)) (when (looking-at "()") @@ -1306,7 +1306,7 @@ (when (c-save-buffer-state () (and c-electric-flag c-syntactic-indentation - (not (eq last-command-char ?_)) + (not (eq last-command-event ?_)) (= (save-excursion (skip-syntax-backward "w") (point))