Mercurial > hg > xemacs-beta
comparison lisp/cc-mode/cc-cmds.el @ 173:8eaf7971accc r20-3b13
Import from CVS: tag r20-3b13
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:49:09 +0200 |
parents | 929b76928fce |
children | 2d532a89d707 |
comparison
equal
deleted
inserted
replaced
172:a38aed19690b | 173:8eaf7971accc |
---|---|
191 ;; be most disruptive. we'll blink it ourselves later on | 191 ;; be most disruptive. we'll blink it ourselves later on |
192 (old-blink-paren blink-paren-function) | 192 (old-blink-paren blink-paren-function) |
193 blink-paren-function | 193 blink-paren-function |
194 (insertion-point (point)) | 194 (insertion-point (point)) |
195 delete-temp-newline | 195 delete-temp-newline |
196 (preserve-p (eq 32 (char-syntax (char-before)))) | 196 (preserve-p (eq ? (char-syntax (char-before)))) |
197 ;; shut this up too | 197 ;; shut this up too |
198 (c-echo-syntactic-information-p nil) | 198 (c-echo-syntactic-information-p nil) |
199 (syntax (progn | 199 (syntax (progn |
200 ;; only insert a newline if there is | 200 ;; only insert a newline if there is |
201 ;; non-whitespace behind us | 201 ;; non-whitespace behind us |
636 (c-keep-region-active)) | 636 (c-keep-region-active)) |
637 | 637 |
638 | 638 |
639 ;; set up electric character functions to work with pending-del, | 639 ;; set up electric character functions to work with pending-del, |
640 ;; (a.k.a. delsel) mode. All symbols get the t value except | 640 ;; (a.k.a. delsel) mode. All symbols get the t value except |
641 ;; c-electric-delete which gets 'supersede. | 641 ;; the functions which delete, which gets 'supersede. |
642 (mapcar | 642 (mapcar |
643 (function | 643 (function |
644 (lambda (sym) | 644 (lambda (sym) |
645 (put sym 'delete-selection t) ; for delsel (Emacs) | 645 (put sym 'delete-selection t) ; for delsel (Emacs) |
646 (put sym 'pending-delete t))) ; for pending-del (XEmacs) | 646 (put sym 'pending-delete t))) ; for pending-del (XEmacs) |
649 c-electric-slash | 649 c-electric-slash |
650 c-electric-star | 650 c-electric-star |
651 c-electric-semi&comma | 651 c-electric-semi&comma |
652 c-electric-lt-gt | 652 c-electric-lt-gt |
653 c-electric-colon)) | 653 c-electric-colon)) |
654 (put 'c-electric-delete 'delete-selection 'supersede) ; delsel | 654 (put 'c-electric-delete 'delete-selection 'supersede) ; delsel |
655 (put 'c-electric-delete 'pending-delete 'supersede) ; pending-del | 655 (put 'c-electric-delete 'pending-delete 'supersede) ; pending-del |
656 (put 'c-electric-backspace 'delete-selection 'supersede) ; delsel | |
657 (put 'c-electric-backspace 'pending-delete 'supersede) ; pending-del | |
656 | 658 |
657 | 659 |
658 ;; This is used by indent-for-comment to decide how much to indent a | 660 ;; This is used by indent-for-comment to decide how much to indent a |
659 ;; comment in C code based on its context. | 661 ;; comment in C code based on its context. |
660 (defun c-comment-indent () | 662 (defun c-comment-indent () |