From: Richard M. Stallman Date: Fri, 18 Jul 1997 02:10:48 +0000 (+0000) Subject: Require cc-defs for the c-add-syntax macro. X-Git-Tag: emacs-20.1~1103 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c93a62d8c1d3649e516169ada7eccb4372810653;p=emacs.git 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. --- diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 62e89522bbb..5abbd1f0a5b 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -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 @@ the brace is inserted inside a literal." 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 @@ comment." ;; 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 @@ comment." 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