[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el |
Date: |
Fri, 24 Feb 2006 15:33:04 +0000 |
Index: emacs/lisp/progmodes/cc-cmds.el
diff -u emacs/lisp/progmodes/cc-cmds.el:1.43
emacs/lisp/progmodes/cc-cmds.el:1.44
--- emacs/lisp/progmodes/cc-cmds.el:1.43 Fri Feb 10 09:00:31 2006
+++ emacs/lisp/progmodes/cc-cmds.el Fri Feb 24 15:33:02 2006
@@ -1,7 +1,7 @@
;;; cc-cmds.el --- user level commands for CC Mode
-;; Copyright (C) 1985,1987,1992-2003, 2004, 2005, 2006
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2003, 2004, 2005, 2006 Free Software
+;; Foundation, Inc.
;; Authors: 1998- Martin Stjernholm
;; 1992-1999 Barry A. Warsaw
@@ -262,10 +262,17 @@
(boundp 'c-subword-mode)
(symbol-value 'c-subword-mode))
"w"
- ""))))
- (setq c-submode-indicators
+ "")))
+ (bare-mode-name (if (string-match "\\(^[^/]*\\)/" mode-name)
+ (substring mode-name (match-beginning 1) (match-end
1))
+ mode-name)))
+;; (setq c-submode-indicators
+;; (if (> (length fmt) 1)
+;; fmt))
+ (setq mode-name
(if (> (length fmt) 1)
- fmt))
+ (concat bare-mode-name fmt)
+ bare-mode-name))
(force-mode-line-update)))
(defun c-toggle-syntactic-indentation (&optional arg)
@@ -365,9 +372,9 @@
arg
(c-in-literal)))
(funcall c-backspace-function (prefix-numeric-value arg))
- (c-hungry-backspace)))
+ (c-hungry-delete-backwards)))
-(defun c-hungry-backspace ()
+(defun c-hungry-delete-backwards ()
"Delete the preceding character or all preceding whitespace
back to the previous non-whitespace character.
See also \\[c-hungry-delete-forward]."
@@ -378,6 +385,8 @@
(delete-region (point) here)
(funcall c-backspace-function 1))))
+(defalias 'c-hungry-backspace 'c-hungry-delete-backwards)
+
(defun c-electric-delete-forward (arg)
"Delete the following character or whitespace.
If `c-hungry-delete-key' is non-nil (indicated by \"/h\" on the mode
@@ -396,7 +405,7 @@
(defun c-hungry-delete-forward ()
"Delete the following character or all following whitespace
up to the next non-whitespace character.
-See also \\[c-hungry-backspace]."
+See also \\[c-hungry-delete-backwards]."
(interactive)
(let ((here (point)))
(c-skip-ws-forward)
@@ -436,7 +445,7 @@
(if (and (fboundp 'delete-forward-p)
(delete-forward-p))
(c-hungry-delete-forward)
- (c-hungry-backspace)))
+ (c-hungry-delete-backwards)))
(defun c-electric-pound (arg)
"Insert a \"#\".
@@ -648,7 +657,7 @@
numeric ARG hasn't been supplied, the command performs several electric
actions:
-\(a) If the auto-newline feature is turned on (indicated by \"/ln\" on
+\(a) If the auto-newline feature is turned on (indicated by \"/la\" on
the mode line) newlines are inserted before and after the brace as
directed by the settings in `c-hanging-braces-alist'.
@@ -752,7 +761,7 @@
"{"
"\\=")
nil t))
- (delete-region mbeg mend)
+ (delete-region (match-beginning 0) (match-end 0))
(insert-and-inherit "} else {"))
((and (memq 'brace-elseif-brace c-cleanup-list)
(progn
@@ -886,7 +895,7 @@
numeric ARG hasn't been supplied, the command performs several electric
actions:
-\(a) When the auto-newline feature is turned on (indicated by \"/ln\" on
+\(a) When the auto-newline feature is turned on (indicated by \"/la\" on
the mode line) a newline might be inserted. See the variable
`c-hanging-semi&comma-criteria' for how newline insertion is determined.
@@ -958,7 +967,7 @@
numeric ARG hasn't been supplied, the command performs several electric
actions:
-\(a) If the auto-newline feature is turned on (indicated by \"/ln\" on
+\(a) If the auto-newline feature is turned on (indicated by \"/la\" on
the mode line) newlines are inserted before and after the colon based on
the settings in `c-hanging-colons-alist'.