changeset 18843:6e04c0670f55

Require cc-defs for the c-add-syntax macro. (c-electric-backspace): Must get 'supercede property values to work with delsel and pending-del. (c-electric-brace): Fix ebola eradication consequence in the preserve-p test.
author Richard M. Stallman <rms@gnu.org>
date Fri, 18 Jul 1997 02:10:48 +0000
parents 72c2475ece1c
children 6b269c4ad2eb
files lisp/progmodes/cc-cmds.el
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-cmds.el	Fri Jul 18 02:09:34 1997 +0000
+++ b/lisp/progmodes/cc-cmds.el	Fri Jul 18 02:10:48 1997 +0000
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.12
+;; Version:    5.13
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -27,6 +27,9 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+(eval-when-compile
+  (require 'cc-defs))
+
 
 (defun c-calculate-state (arg prevstate)
   ;; Calculate the new state of PREVSTATE, t or nil, based on arg. If
@@ -193,7 +196,7 @@
 	    blink-paren-function
 	    (insertion-point (point))
 	    delete-temp-newline
-	    (preserve-p (eq 32 (char-syntax (char-before))))
+	    (preserve-p (eq ?\  (char-syntax (char-before))))
 	    ;; shut this up too
 	    (c-echo-syntactic-information-p nil)
 	    (syntax (progn
@@ -638,7 +641,7 @@
 
 ;; set up electric character functions to work with pending-del,
 ;; (a.k.a. delsel) mode.  All symbols get the t value except
-;; c-electric-delete which gets 'supersede.
+;; the functions which delete, which gets 'supersede.
 (mapcar
  (function
   (lambda (sym)
@@ -651,8 +654,10 @@
    c-electric-semi&comma
    c-electric-lt-gt
    c-electric-colon))
-(put 'c-electric-delete 'delete-selection 'supersede) ; delsel
-(put 'c-electric-delete 'pending-delete   'supersede) ; pending-del
+(put 'c-electric-delete    'delete-selection 'supersede) ; delsel
+(put 'c-electric-delete    'pending-delete   'supersede) ; pending-del
+(put 'c-electric-backspace 'delete-selection 'supersede) ; delsel
+(put 'c-electric-backspace 'pending-delete   'supersede) ; pending-del
 
 
 ;; This is used by indent-for-comment to decide how much to indent a