comparison lisp/modes/cc-mode.el @ 153:25f70ba0133c r20-3b3

Import from CVS: tag r20-3b3
author cvs
date Mon, 13 Aug 2007 09:38:25 +0200
parents cca96a509cfe
children 43dd3413c7c7
comparison
equal deleted inserted replaced
152:4c132ee2d62b 153:25f70ba0133c
1033 (define-key c-mode-map "\eq" 'c-fill-paragraph)) 1033 (define-key c-mode-map "\eq" 'c-fill-paragraph))
1034 (define-key c-mode-map "\C-c\C-n" 'c-forward-conditional) 1034 (define-key c-mode-map "\C-c\C-n" 'c-forward-conditional)
1035 (define-key c-mode-map "\C-c\C-p" 'c-backward-conditional) 1035 (define-key c-mode-map "\C-c\C-p" 'c-backward-conditional)
1036 (define-key c-mode-map "\C-c\C-u" 'c-up-conditional) 1036 (define-key c-mode-map "\C-c\C-u" 'c-up-conditional)
1037 (define-key c-mode-map "\t" 'c-indent-command) 1037 (define-key c-mode-map "\t" 'c-indent-command)
1038 (define-key c-mode-map "\177" 'c-electric-delete) 1038 ;; GDF - don't rebind the DEL key
1039 ;; (define-key c-mode-map "\177" 'c-electric-delete)
1039 ;; these are new keybindings, with no counterpart to BOCM 1040 ;; these are new keybindings, with no counterpart to BOCM
1040 (define-key c-mode-map "," 'c-electric-semi&comma) 1041 (define-key c-mode-map "," 'c-electric-semi&comma)
1041 (define-key c-mode-map "*" 'c-electric-star) 1042 (define-key c-mode-map "*" 'c-electric-star)
1042 (define-key c-mode-map "\C-c\C-q" 'c-indent-defun) 1043 (define-key c-mode-map "\C-c\C-q" 'c-indent-defun)
1043 (define-key c-mode-map "\C-c\C-\\" 'c-backslash-region) 1044 (define-key c-mode-map "\C-c\C-\\" 'c-backslash-region)
1425 1426
1426 Key bindings: 1427 Key bindings:
1427 \\{c-mode-map}" 1428 \\{c-mode-map}"
1428 (interactive) 1429 (interactive)
1429 (kill-all-local-variables) 1430 (kill-all-local-variables)
1431 (make-local-hook 'backspace-or-delete-hook)
1432 (add-hook 'backspace-or-delete-hook 'c-electric-delete nil t)
1430 (set-syntax-table c-mode-syntax-table) 1433 (set-syntax-table c-mode-syntax-table)
1431 (setq major-mode 'c-mode 1434 (setq major-mode 'c-mode
1432 mode-name "C" 1435 mode-name "C"
1433 local-abbrev-table c-mode-abbrev-table) 1436 local-abbrev-table c-mode-abbrev-table)
1434 (use-local-map c-mode-map) 1437 (use-local-map c-mode-map)
1951 (funcall c-delete-function (prefix-numeric-value arg)) 1954 (funcall c-delete-function (prefix-numeric-value arg))
1952 (let ((here (point))) 1955 (let ((here (point)))
1953 (skip-chars-backward " \t\n") 1956 (skip-chars-backward " \t\n")
1954 (if (/= (point) here) 1957 (if (/= (point) here)
1955 (delete-region (point) here) 1958 (delete-region (point) here)
1956 (funcall c-delete-function 1) 1959 (funcall c-delete-function 1))))
1957 )))) 1960 t)
1958 1961
1959 (defun c-electric-pound (arg) 1962 (defun c-electric-pound (arg)
1960 "Electric pound (`#') insertion. 1963 "Electric pound (`#') insertion.
1961 Inserts a `#' character specially depending on the variable 1964 Inserts a `#' character specially depending on the variable
1962 `c-electric-pound-behavior'. If a numeric ARG is supplied, or if 1965 `c-electric-pound-behavior'. If a numeric ARG is supplied, or if